Hacker News new | ask | show | jobs
by jlouis 4632 days ago
DSLs are not the antithesis of static typing. Beware of using the word strong when discussing type classification. That word is highly muddled and doesn't mean the same thing to everyone.

Haskell, for instance, is statically typed and does DSLs very very well. In fact, you use the type system as an augmentor of the DSL: it sets up the rules for how to embed the DSL in the code base itself. And it disallows a class of programs which would not work at all.

The right way to view types is that they allow a far richer description of what your code is doing because you can discriminate values on their types.

And before you lynch me: my professional work job is in Erlang which is a dynamically typed language.

1 comments

You're right. Strong and static occur so often together (Go is both strong and static (mostly), for example) that I fell into the trap of glomming them both together. I've edited my post.

EDIT: And when I said 'the antithesis of static typing' I meant purely in the Ruby context, which is famous for its DSLs.