From: Mathieu Bouchard Date: 2005-03-31T23:30:08+09:00 Subject: Re: New block syntax On Thu, 31 Mar 2005, Sean E. Russell wrote: > On Wednesday 30 March 2005 20:55, David A. Black wrote: >> I prefer that the constructor (and the person reading the code from >> left to right) know what it's doing as soon as its leftmost token >> appears. > If I may be allowed a brief ad hominem argument, by this logic, Perl has a > better syntax than Ruby, because the human can see by the first token of any > variable what type of variable it is. Perl's basic types may be scalar/array/hash, but after that there's another type system within scalars, that is, numbers vs strings vs pointers, that is not acknowledged by the Perl prefix system, and after that there's the whole class hierarchy that corresponds to a hierarchy of pointer types. Perl's $%@ prefixes made more sense in Perl 1, but in Perl 5 they really look like they're there for backward-compatibility with the habits of programmers -- which is a good thing and consistent with the values that Perl puts forward, but somehow you can get tired of the $%@ system as it doesn't help and just gets in the way. If you redesign Perl without that feature, and still keeping the rest of Perl 5, then you've almost got Ruby in your hands, plus or minus slightly exotic features [1] Because Perl's types of variables are far from reflecting the whole type hierarchy that grew in the last decade of Perl, I don't think that, even by that logic, Perl has a better syntax than Ruby. --- [1] i'm thinking of abstract containers (Perl-only) and backtracking method-lookup (was Ruby-only but Perl 5.8 got a "SUPER" keyword). (PS: But I'd rather type $ all over again than having to go in Java typecast hell that makes any program in Java have more parentheses than the equivalent Lisp program, notwithstanding the zillion other tokens) .-----------------------------------------------------------------. / The Diagram is the Program (TM) ,--------------------------------} {----------------------------------" http://artengine.ca/matju / `-----------------------------------------------------------------'