From: Gregory Seidman Date: 2006-02-07T01:07:02+09:00 Subject: Re: Indentation vs. "end"s On Tue, Feb 07, 2006 at 12:38:20AM +0900, Lionel Thiry wrote: } Mark Volkmann a ?crit : } > On 2/3/06, Thomas Kirchner wrote: } > } >>* On Feb 3 13:07, MenTaLguY (ruby-talk@ruby-lang.org) wrote: } >> } >>>For what it's worth, I also strongly dislike it. It was one of my } >>>least favorite features of OCaml's syntax. } >>> } >>>But here, the biggest problem is that (relative to other block endings } >>>in pretty much any language I can think of), it's much harder to } >>>visually count ;;s if they are squashed together as in your example. } >>> } >>>I think this is largely because there aren't any visual cues to the } >>>boundary between tokens. The gap between two ;s within the same ;; and } >>>the gap between two ;s in adjacent ;; aren't visually distinguishable. } >> } >>I was going to write my own post, but it seems MenTaLguY did it for me! } >> } >>I am in total agreement; semicolons are an ugly way to end sections. } >>Curly braces I have a much easier time with. } > } > } > I'm not a fan of the curly braces, but if we do end up using them, I } > hope we don't allow this. } > } > def some_method(args) } > # some code } > } } > } > If we're going to use them, I think they need to be matched, so a { } > should appear at the end of the method argument list. } } def some_method = ->(args) { } # some code } } } } :-p You appear to be joking, but I'd kind of like that. I'd love to be able to enclose *all* my scopes in curly braces and never type do/is/end at all. I'm sure this comes of a C-syntax-centric worldview, but I'd love it. module Foo { def bar() { #... if (something) { } elif (something_else) { } else { } } #... } class Baz { include Foo #... } } Lionel Thiry --Greg