Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "syntax"


Designing a Good DSL

  • There’s nothing tricky going on, but it’s way too hard to read than it needs to be.
  • Not a problem while writing, but consider this: you just walking by that code and want to make simple modification (change short month to full month) or even fool-proof that it uses padded 24-hour for hours.
  • Clojure started as a language that assigned contextual meaning to a few language-defined syntax structures: vector might be a let-binding in let expression, function arguments list in fn and just a data structure.
  • You cover most of your users’ needs (that’s the primary value of your DSL anyway) and let users figure the rest in plain old code—best of both worlds.
  • The thing with special cases, same as with multiple syntaxes, is that you have to learn them, remember about them and recognize them.

save | comments | report | share on