5 ms·
"Extremely complex grammar, makes barrier to entry for implementation much higher" Compared to... what?
by darrencauthon 14y ago
"Extremely complex grammar, makes barrier to entry for implementation much higher"
Compared to... what?
- regularfry 14y agoThe average, or even more-complex-than-average, alternative language. He's right, the grammar is a complete pig.
- darrencauthon 14y agoExample? I don't understand what is meant by this.
- batiste 14y agoPython grammar http://docs.python.org/2/reference/grammar.html http://docs.python.org/2/reference/grammar.html Ruby grammar is hard to find but there it is http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_2...
- sepeth 14y agoIt seems that Ruby uses GNU Bison: http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?view=markup http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?vi... It is not so clear for documentation purposes, but grammar rules are in between 850-4988 lines. File/Line size does not tell much about Grammar complexity, but anyway, the whole parse.y file is bigger than cpython/Parser directory. BTW, Ruby's parse.y file is just the input to Bison.
- ch0wn 14y agoOne of my favorite things about Python 3 is that the grammar actually got smaller: http://docs.python.org/3/reference/grammar.html http://docs.python.org/3/reference/grammar.html It's only three lines, but still.
- wmoxam 14y agoWhat is meant is that Ruby is difficult to parse compared to most languages. By comparison Lisp is easy to parse
- kyllo 14y agoWhen he says the complex grammar is a barrier to entry for implementation I think he is referring not to the difficulty of writing code in Ruby, but to the difficulty of writing a Ruby interpreter.