Re: TT's support for methods and complex structures. Why not?

Mark Stosberg <mark-WmyhgDpj2fCHT8/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
On 2005-07-18, Mark Stosberg <mark-WmyhgDpj2fCHT8/[email protected]> wrote:
>
>> I really dislike systems that try to collapse hash dereferences and
>> method calls into a single syntax.  Petal does this and it drives me
>> nuts - I can never figure out what I'm looking at from the template.
>> And it does matter because methods may have side-effects and hash
>> derefs don't.
>
> I can see your point here. Should we bring back the arrow for methods?
> That seems to be the most obvious (Until Perl6 gets here). 
>
> Or we could keep the dot notation because that's where Perl6 is going, 
> and bring back the bracket notation for hashes. 

I'm thought more about this. The arrow should be avoided because ">" is
not valid HTML.

More significantly, I've come back to advocating the dot notation for
both because from the user's perspective it's an implementation detail.

As a programmer, I think I can quickly check the top level name to see
what's going on. Already we have to look at $value and guess whether
it's a string, an arrayref or a hashref.  

    Mark

-- 
http://mark.stosberg.com/ 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.