My reply to the message Aaron sent directly to me by mistake...

---------- Forwarded message ----------
From: Mark J. Reed <markjr...@gmail.com>
Date: Fri, Jul 10, 2009 at 7:23 PM
Subject: Re: Re-thinking file test operations
To: Aaron Sherman <a...@ajs.com>


You replied just to me, you know.

> In re-thinking it, we don't need to do either. It's already built in:
>
>  $str does Path;
>  if $str.e {
>   say("$str exists");
>  }

Sure, but I was thinking that particular case might be common enough
to warrant something with a better Huffman encoding.


>>  I think stringish classes are common and useful enough to have
>> special literal support available without having to customize the
>> grammar.  Maybe there's a registry of prefixes that can be put in
>> front of the opening quote, like p'....' for a pathname, or maybe you
>> have to use a q operator with a modifier.
>
> You've made contradictory statements, there.

No, I just wasn't clear.

>  Either you want to change the
> grammar to add new quoting styles (then the argument ensues: is YOUR key
> type common enough to deserve a quoting semantic?) or you think that you
> shouldn't have to customize the grammar.

No, what I was talking about was changing the default grammar, but in
a general way, so that users who wanted their own literal syntax for
such things wouldn't have to customize the grammar themselves.  That
is, I'm arguing for a change in the design to avoid programmers having
to customize the grammar for this particular case.

> I'm in favor of NOT customizing the grammar, but at the same time, I readily
> admit that strings aren't always strings, and might have much more semantic
> baggage that it would be good to be able to associate with them easily.

Agreed.
--
Mark J. Reed <markjr...@gmail.com>



-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to