4 ms·
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
by welder 10y ago
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!!! ;)
- Svenskunganka 10y agoI 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.
- exDM69 10y agoThe 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.
- smnplk 10y agoOr judging the performance of a sports car by its colour.
- paxcoder 10y agoI'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.
- welder 10y agoExactly! 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.
- exDM69 10y agoThe 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.
- bdcravens 10y agoI think the same could be said about the joy of not having to have perfect whitespace.
- DHMO 10y agoYou 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.
- asterite 10y agoWe (think we) have good reasons for that: https://github.com/crystal-lang/crystal/wiki/FAQ#why-isnt-the-language-indentation-based https://github.com/crystal-lang/crystal/wiki/FAQ#why-isnt-th...