Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So why not create syntax that catches 99% of the cases for which you intend the language to be used

This just indicates the author is clueless about the substantive use of a DSL.

The only way to implement this is to vastly reduce the scope of that "intend." Basically equivalent to, "all you really need is Blub."

80% would be reasonable. But the last 20% is going to encompass some powerful stuff.



People don't seem to understand what the word "Domain" in "Domain Specific Language" means. It means this: http://domaindrivendesign.org/

Syntax extension (which in the case of macros is not about syntax at all, but about controlling when evaluation happens, something else that people do not understand about macros) is not about inventing a new, stupider way of writing for loops. It is about clearly expressing domain concepts.

For an article about "missing the point," the author manages to fail to understand both how syntax extension works and how it's used.


I'm not really sure why you bring up DSL's, unless you consider something like Python or Perl a DSL as well. In that case: are you saying that, for instance, Perl is only useful for 80% of the cases for which that language is intended to be used?


Nope. You can "do it all" in any Turing-complete language. But you can often do it more elegantly with a DSL. Once a language reaches a certain threshold of power, making a DSL is indistinguishable from ordinary coding.

It's obvious the author hasn't a Clue about that.


The point of the article was that creating a sufficiently powerful language, that doesn't offer easy ways[1] of extending the syntax, does not warrant the criticism that the language has 'too much syntax'. If anything, it demonstrates the power of being able to create syntax. I don't understand how your comment relates to that point.

[1] Of course you can "do it all" in any Turing-complete language, but theoretical possibilities are often much less interesting than practical impossibilities. In Python or Java, creating new syntax is so hard it might as well not be possible.


Exercise for the student -- find the contradiction here:

The point of the article was that creating a sufficiently powerful language, that doesn't offer easy ways[1] of extending the syntax, does not warrant the criticism that the language has 'too much syntax'.

Evidently, you are as inexperienced with DSLs as the author.

Of course you can "do it all" in any Turing-complete language, but theoretical possibilities are often much less interesting than practical impossibilities. In Python or Java, creating new syntax is so hard it might as well not be possible.

Insufficient knowledge is probably why you mistook the sense of the statement you are replying to by 180 degrees.


  Exercise for the student -- find the contradiction here:
You consider 'sufficiently powerful' and "doesn't offer easy ways of extending the syntax" to be contradictory. Does that mean you consider only Lisps 'sufficiently powerful'?

  Insufficient knowledge is probably why you mistook the
  sense of the statement you are replying to by 180 degrees.
Do you mean extending the syntax of Python or Java is easy? Otherwise I'm not sure what the knowledge is you think I'm lacking.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: