News for hackers. Stuff that matters.
Re:Tree-sitter: an incremental parsing system for programmin... by e12e on Monday February 22, 2021 @01:38PM (#26228450)
> Not a ruby developer here: that sounds terrifying! Does it make it harder to have a proper mental model of the language

It is a little terrifying in the sense that I'd not want to write language level tools (eg: syntax highlighter).

But if you have scheme on one end and natural language on the other, ruby leans à bit towards natural language - but in a good way. In some ways ruby isn't that different from Smalltalk - but it has a lot (sometimes I think too many, sometimes not) conveniences.

Parantheses and brackets are largely optional "where it makes sense". Conditionals support postfix, eg these are equivalent:

  if should_send?() 
    send_mail({to: '[email protected]'}) 
  end

  send_mail to: '[email protected]' if should_send?

There are no comments on this comment yet.