ch-ch-update: series, closed-form series, and strides

Ary Borenszweig ary at esperanto.org.ar
Sat Jan 31 13:00:57 PST 2009


Andrei Alexandrescu escribió:
> Christopher Wright wrote:
>> Andrei Alexandrescu wrote:
>>> The truth is, the reasons against using strings for short functions 
>>> are shrinking. I mean, you don't want to not use strings just to not 
>>> use strings, right? I hope I convinced you that strings are 
>>> unbeatable for short functions that don't need access to local state, 
>>> their efficiency is exemplary, and their error messages are not half 
>>> bad.
>>
>> Yes, but they don't interact with an IDE.
> 
> It's the IDE that doesn't yet interact with them.

Hmm... How can the IDE tell that some T in a template, if it's a string, 
must have "a" and "n" as their parameters in expressions, their type, etc.?

Anyway, I like the usage of strings if it's short and doesn't local 
state, you've convinced me. :-)

As for the errors, the compiler should hold a stack of template 
instances invocations (same for string mixins), and add those in any 
error message report. I'll try to do that in Descent to see if it's enough.



More information about the Digitalmars-d mailing list