Hacker News new | ask | show | jobs
by ed25519FUUU 1387 days ago
I guess beauty is in the eye of the beholder because I look at that syntax and cringe.
1 comments

What about it makes you cringe?
This kind of thing

            End
          End
        End
      End
    End
While it is not completely impossible to end up (pun intended) with something like this, you usually follow a coding style that avoids it. Kind of like in Ruby.

You have the option to define named methods that yield or to use the short one-parameter syntax where this:

  method do |param|
    param.some_method
  end
becomes

  method &.some_method