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

Stopped reading when I saw the `end` keyword... the most annoying part of Ruby.

Edit: I'm getting hella downvoted but I'm leaving this here. Ruby fanboys can't silence me!!! ;)



The syntax of a language is about the least interesting thing about them. I don't care about curly braces, end keywords or semicolons as long as it is consistent (and fairly easy to parse, so there can be good tooling). The interesting parts are in the semantics, type systems and runtime features.

Choosing a programming language based on the syntax is like choosing your significant other based on looks alone. You're going to be spending a lot of time together, what's inside is what counts.


I've heard this said numerous times, so I'm going to disagree on the record. I think syntax of a programming language is a very important characteristic.

A language with a nice syntax is easier to learn, easier to read and understand, and delightful to write.

Crystal's syntax is a great differentiator between it and its statically typed, garbage-collecting competition.


Exactly! I guess people used to the Ruby syntax are just desensitized or don't know how much of a joy programming can be without having to type 'end' everywhere.


The end keywords is just a minor detail and can be inserted by a smart editor anyway.

Things like list comprehensions and do notation are examples of nice syntactic sugar.

Sensitive whitespace like Python can be nice to write and read, but it's hard(er) to write a parser for it and that's why Python's tooling hasn't been great in the past.

That said, Ruby is even harder to parse and I don't like it aesthetically either.


I think the same could be said about the joy of not having to have perfect whitespace.


Or judging the performance of a sports car by its colour.


We (think we) have good reasons for that: https://github.com/crystal-lang/crystal/wiki/FAQ#why-isnt-th...


I wonder how Lua can get by, being embedded in literally every game that supports scripting, in databases and many other tools.

It's a personal preference of course.


Yes, it's my preference. I also don't like reading/writing Lua. Python doesn't need end, neither does Crystal.


Python has "significant white spaces", Crystal doesn't.


You don't have to use do; end or do |a,b|; end in Ruby; you can use { } and {|a,b| }, even for multiline. There are options.




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

Search: