HN user

_8ea7

459 karma
Posts0
Comments3
View on HN
No posts found.
How to Parse Ruby 13 years ago

> That does not mean they're opposite goals. Having parsing ambiguities means insufficient thought has been given to parsing, or the language has been defined as "as implemented" with an ad-hoc and organically grown parser (other examples of such case: Perl, PHP)

Of course they're not opposite, but you have to choose what to focus on.

> You prefer that languages have broken, inane or completely missing grammars? So you like PHP even more than Ruby?

Sorry if it wasn't clear, I was comparing easy parsing to developer happiness. That is, I prefer a language tries to make me happy rather than be easy to parse. (this goes back to your point above)

How to Parse Ruby 13 years ago

I'm interested in how this compares to other languages with reference implementations. Is ruby the odd one out here, not providing a formal grammar, or is that the norm?

Ruby has a stated design goal of making developers happy. As far as I'm aware, it hasn't been designed to be easily parsed.

I, as an end user (i.e. programmer), prefer it this way. If ease of parsing is important for you, maybe you should use something like LISP.