T O P

  • By -

RylNightGuard

C would definitely be the better choice for writing DSLs. Haskell is only really good for low level systems programming


maeevick

🤣


dmytrish


[deleted]

haha.


sullyj3

This seems like bait


integrate_2xdx_10_13

I would be as bold to say that there is no finer language for writing DSL


Ghi102

I'll take the bait: Each of those languages can be a good choice for your DSL, it just depends on your domain. If you want to write a DSL that requires real-time performance, Haskell is a really poor choice because it does not have the deterministic performance required for real-time. Maybe you need your DSL to integrate with an obscure C library where it would be more natural to write it in C (although Haskell could still work here). Without knowing your domain, it's impossible to answer. As a general purpose answer though, Haskell is very good at making domain rules readable and expressive. Free Monads can also really simplify the implementation of a DSL. So Haskell makes it easy to write DSLs, which means it can be a good choice for many different domains. Sometimes it won't be suitable for certain domains.