Nathan Wiger wrote:
> Ok, here goes. First off, I *did* read the RFC. I never respond before

Thanks, this response is more like it.

> reading. Personally, I wish people would quit coming up with these silly
> "let's drop the prefixes" RFC's that everyone on this list is completely
> familiar with.

Well there was the Highlander one but nothing else was obvious. Of course
the RFC list could do with a search engine.


> Yeah, and isn't it cool that Perl gives you easy access to using and
> understanding such complex data structures:
> 
>    print @{ $cars->{$model} };
> 
> That "junk" makes it easy to see that you're derefencing a hashref that
> contains a key which is pointing to an array. How is this:

it's a list of stuff - but a list of WHAT stuff? The @ is essentially
useless.

>    print cars->model;
> 
> any clearer? Nicer to look at? Maybe for some. Not for me, I like the

yep. yep, and easier to teach.

> former. Maybe it doesn't let you know exactly what you're getting, but
> you're a lot closer. And this:
> 
>    print "Welcome back, $fullname, to $website!\n";
> 
> is MUCH better than this:
> 
>    print "Welcome back " . fullname . " to " . website . "!\n";

I agree. That's why I believe in retaining the $. The distinction between
variable and non-variable is still useful.


> > Those days are gone. Perl 5 introduced the idea of Objects
> > and now any variable can be one of ten million possible
> > types all of very different behaviours.
> 
> Not true!! Only $scalars can hold objects. Now, @arrays and %hashes can
> hold groups of objects, but only $scalars can hold objects.

"Groups" is a meaningless concept. You have particular objects which store stuff.
Is an image of a distant galaxy singular (one image) or plural (ten zillion pixels).
My argument, based on my practical experience, is that all the @% are essentially
useless now.


> However, if you have object polymorphism, then you don't have this
> problem. Objects are automatically converted to numbers and strings
> on-demand. The internals people are doing some really interesting stuff
> along these lines.

There is already overloaded stringify. Why does RFC49 not discuss this?

> 
> To summarize, you should read RFC's 49, 73, 28, and the link to TomC's
> email I sent you. These address the real problems, and not the symptoms.

Yes. And I read TomC's stuff on those lines at least 6 years ago. Which
was why I got annoyed.

The point remains - why treat hashes and arrays as special prefix types?
It just confuses the language to have to use $ for one kind of collection
and @ for another.

ok we could use @ for everything - but @ implies 1D ness.

Karl

Reply via email to