[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>

I'm really sorry if this isn't the place to talk about this. I've

25 messages 2005/03/21
[#4606] Re: New block syntax — "David A. Black" <dblack@...> 2005/03/21

Hi --

[#4629] Re: New block syntax — "Sean E. Russell" <ser@...> 2005/03/30

On Monday 21 March 2005 16:17, David A. Black wrote:

[#4648] about REXML::Encoding — speakillof <speakillof@...>

Hi.

15 messages 2005/03/31
[#4659] Re: about REXML::Encoding — "Sean E. Russell" <ser@...> 2005/04/04

On Thursday 31 March 2005 09:44, speakillof wrote:

Re: New block syntax

From: Mathieu Bouchard <matju@...>
Date: 2005-03-31 14:30:08 UTC
List: ruby-core #4647
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  /
   `-----------------------------------------------------------------'

In This Thread

Prev Next