On Wednesday, January 26, 2011 10:25:29 Ellery Newcomer wrote:
> just out of curiosity, does anyone use these and actually mean them to
> be strings? It seems like I'm invariably writing
>
> cast(ubyte[]) x"..."
That's legal? I thought that x went in front of hex literals, not strings. I
wouldn't have thought that that code would compile, and I certainly have no clue
what you're trying to do. So, I certainly don't fall in the category of anyone
using it - regardless of whether it's meant to be a string or not.
- Jonathan M Davis

On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
> Jonathan M Davis:
> > That's legal?
>
> They are a part of D language, search for "Hex Strings" here:
> http://www.digitalmars.com/d/2.0/lex.html
It always seems like there's at least one more thing in the language that I have
no idea is there...
- Jonathan M Davis

On 01/26/2011 01:35 PM, Jonathan M Davis wrote:
> On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
>> Jonathan M Davis:
>>> That's legal?
>>
>> They are a part of D language, search for "Hex Strings" here:
>> http://www.digitalmars.com/d/2.0/lex.html
>
> It always seems like there's at least one more thing in the language that I have
> no idea is there...
>
> - Jonathan M Davis
helps to have written a D lexer or two. weren't you going to do that?

Ellery Newcomer <ellery-newcomer@utulsa.edu> wrote:
> just out of curiosity, does anyone use these and actually mean them to
> be strings? It seems like I'm invariably writing
>
> cast(ubyte[]) x"..."
Never used them, tbh. But shouldn't that be
cast(ubyte[]) x"...".dup
?
--
Simen

On 01/26/2011 02:16 PM, Simen kjaeraas wrote:
> Ellery Newcomer <ellery-newcomer@utulsa.edu> wrote:
>
>> just out of curiosity, does anyone use these and actually mean them to
>> be strings? It seems like I'm invariably writing
>>
>> cast(ubyte[]) x"..."
>
> Never used them, tbh. But shouldn't that be
>
> cast(ubyte[]) x"...".dup
>
> ?
>
yeah, strictly speaking. but that (or cast(immutable(ubyte[]))) would be
even uglier.

On Wednesday 26 January 2011 11:53:32 Ellery Newcomer wrote:
> On 01/26/2011 01:35 PM, Jonathan M Davis wrote:
> > On Wednesday, January 26, 2011 11:29:59 bearophile wrote:
> >> Jonathan M Davis:
> >>> That's legal?
> >>
> >> They are a part of D language, search for "Hex Strings" here:
> >> http://www.digitalmars.com/d/2.0/lex.html
> >
> > It always seems like there's at least one more thing in the language that
> > I have no idea is there...
> >
> > - Jonathan M Davis
>
> helps to have written a D lexer or two. weren't you going to do that?
I've been working on it off and on, but I've been busy enough that I haven't made
as much progress on it as I'd like. Even so though, I might have already run
into it there and totally forgot about it, because it's a feature that I've
never used and have no use for.
- Jonathan M Davis