Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Rails Is A Ghetto

Name: Zed A. Shaw 2012-02-22 22:05

This is exactly what makes Rails a ghetto. A bunch of half-trained former PHP morons who never bother to sit down and really learn the computer science they were too good to study in college. BTW, this is true about Kevin as he’s an English major or something stupid (and it shows).
http://web.archive.org/web/20080103072111/http://www.zedshaw.com/rants/rails_is_a_ghetto.html

Name: Anonymous 2012-02-23 15:33

>>9
1. In 95% of cases, blocks are just single-shot callbacks, so the do ... end syntax is optimized for that at the expense of the minority case.
2. The proc keyword just lets you reify a block so you can pass it explicitly instead of implicitly. This is necessary if a method takes multiple block arguments. The weird part is that this isn't just a syntax change. Implicit blocks have a special calling convention and a special way of being passed on the stack that's inexplicably different from all other types of arguments.
3. Ruby doesn't really have functions. All values are objects and all objects have methods. The lambda keyword basically creates a singleton (anonymous class) object whose call method invokes a block. In practice this isn't different from proc in any useful way, except for certain edge cases involving Ruby's fucked up scope rules.
4. Curly braces are just alternative syntax for do ... end and the -> arrow is just an alternative for lambda.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List