News for hackers. Stuff that matters.
Re:Ruby: A great language for shell scripts by codesnik on Sunday June 23, 2024 @06:38AM (#40766377)
if foo is a method then

`foo + bar` and `foo+bar` are `foo()+bar`, but `foo +bar` is `foo(+bar)`

ternary ? : also has some interesting whitespace dependent mixups with symbols, but I cannot remember what. I think that parser has many gotchas like that, but they are really really rare to bite you, because ruby's magic follows human intuition as much as possible.

Re:Ruby: A great language for shell scripts by p_l on Sunday June 23, 2024 @09:38AM (#40767394)
still less annoying than Python's semantic whitespace