Re: Hmmm.... future of cons?
Johan Holmberg <[email protected]> Fri, 24 May 2002 14:54:06 +0200 (MEST)
| Newsgroups | gmane.comp.gnu.cons.general |
|---|---|
| Message-ID | <[email protected]> |
On 17 May 2002 [email protected] wrote: > > Yeah, I've been reading the cons source recently... I thought > I knew Perl, but it's not enough for cons. Just an example > (off the top of my head, I don't have the source here): > $obj->bind(find pkgname, $par); > How many parameters does bind & find take? In other places, > the call to find is spelled > find pkgname ($par1, $par2); > - I can't even find that in perldoc... > I haven't seen anyone commenting on this, so I just want to say: Cons makes frequent use of "indirect object syntax" (described on page 313-- in the current version of the Camel book). Every time we write Program $e 'foo', 'foo.c'; we use that syntax. The source code of Cons also uses that syntax (sometimes). I think this has been discussed before on the list, and people agreed that it would be a good idea to change to using "normal" -> syntax everywhere in the source. There is also an entry in the TODO file saying: Change the documentation (and code) to always use the arrow syntax instead of the sometimes-ambiguous indirect object syntax (i.e., use "$env->Program(...)" instead of "Program $env ...") Alex Jacques, 22 December 2000 Tony Kolarik, 23 December 2000 I think this would be a good idea, and make it easier for non-perl-experts to realize what is going on. Most people recognize "obj->method()" syntax from other OO-languages. /johan holmberg _______________________________________________ [email protected] http://mail.gnu.org/mailman/listinfo/cons-discuss Cons URL: http://www.dsmit.com/cons/