On Thu, 22 Dec 2005, TSa wrote:

Luke Palmer wrote:
 Recently, I believe we decided that {} should, as a special case, be
 an empty hash rather than a do-nothing code, because that's more
 common.

Hmmm, OTOH a hash is a special kind of function, so it may also be convenient to think of { item => 1, other_item => 2 } as a special syntax for specifying a function from the UI POV, although it is obvious that the internal representation must be different.

In that case it should be allowed to dereference a hash(ref) with .() in addition .{} - possibly through a "promotion" behind the scenes, but that would lead us very far away in the direction of another language that is not Perl after all.

In fact on a deeper thought, (even in Perl6, in which the difference is more blurred for conversions happen automatically in most interesting/practical cases) one must still distinguish between a hash and a hashref. Which is yet another reason not to take too seriously what's hinted to above...

"So I why not just trash this mail instead of sending it?" you may ask! But it may also raise some interesting meditation, so I'm definitely posting it...


Michele
--
I guess I was saying that of the infix characters we had available to
choose, dot is the only one anybody uses.  All the others are dotless,
so our attempts would be pointless, period.
- Luke Palmer in p6l, "Re: $1 change issues ..."

Reply via email to