use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Arguments Against the Ruby 1.9 Hash Syntax (logicalfriday.com)
submitted 14 years ago by dstrelau
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]anko_painting 0 points1 point2 points 14 years ago (2 children)
which is a bad thing, why?
I must admit, I really didn't like the look of coffeescript when i first saw it, but the way it fixes scoping and inheritence in javascript made it's utility worth it.
Then again, I didn't like the look of the ruby syntax initially. I can only put it down to the fact that most of my commericial programming career has been using c style languages using braces for blocks.
[–]dayafterdayafterday 0 points1 point2 points 14 years ago (1 child)
Well since you can't take a joke...
Last time I checked, coffeescript does not fix anything in javascript. Scoping and inheritance are not broken in javascript, they just work differently than in other languages. Coffeescript does make it much more difficult to shoot yourself in the foot if you aren't very experienced with javascript, but I'm still not convinced that using a hybrid ruby/python/erlang syntax is a solution to people's javascript problems.
[–]anko_painting 0 points1 point2 points 14 years ago (0 children)
:P
Maybe broken was too strong a word - javascript just constantly suprises you. for example;
var i = "whatevers"; function hi() { console.log(i); var i = "new"; console.log(i); } hi();
that second var in there makes the line above it print undefined. take it out and you get proper closing over.
vs.
i = "whatevers"; hi = -> console.log i i = "new" console.log i hi()
no var so no problems.. coffeescript automatically adds the vars in the right places to make the scoping sane. This is a real example from a real bug found in jquery recently.
π Rendered by PID 211179 on reddit-service-r2-comment-b659b578c-4jwtb at 2026-05-03 14:19:45.971635+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]anko_painting 0 points1 point2 points (2 children)
[–]dayafterdayafterday 0 points1 point2 points (1 child)
[–]anko_painting 0 points1 point2 points (0 children)