Safer casts
Leandro Lucarella
llucax at gmail.com
Mon May 12 10:22:01 PDT 2008
Janice Caron, el 11 de mayo a las 12:53 me escribiste:
> On 11/05/2008, Yigal Chripun <yigal100 at gmail.com> wrote:
> > also, what if a doesn't actually have a "member" member? this is still
> > syntactically valid D code, but again I think the error would be
> > reported elsewhere.
>
> On that point, I concede. The reporting of template errors could
> certainly be improved. More than once I have wanted to see the "stack
> trace" of errors, working back from the innermost, to the line of code
> that ultimately triggered it.
>
> However, that it not an argument against templates, it is an argument
> for improved error reporting. And hopefully, one day we'll get that.
>
> This is not the first time that you've argued that some feature or
> strategy is bad because today's D compiler isn't good enough, but you
> need to remember that tomorrow's D compiler will be better. That's
> life on the cutting edge.
I think you can use Token Strings[1] in D2 to have better error reporting.
It justs do lexical analisys, but it's something:
sort!(q{a > b})(array);
[1] http://www.digitalmars.com/d/2.0/lex.html
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Señor, usted es militar? - No, no.
Tiene un hermano militar? - No, no, no.
Tiene algún pariente militar? - No, no, no, no.
Tiene algún amigo íntimo militar? - No, no, pero por qué me lo pregunta?
Porque me está pisando el pie.
-- Tato vs. Tato (1980, Gobierno de Videla)
More information about the Digitalmars-d
mailing list