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

Jason House jason.james.house at gmail.com
Sat Jan 31 21:00:37 PST 2009


Andrei Alexandrescu Wrote:

> Derek Parnell wrote:
> > On Sat, 31 Jan 2009 07:22:17 -0800, 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.
> > 
> > And syntax-highlighting editors just love them ;-) Knowing which strings
> > contain code and which don't is a piece of cake, no?
> 
> The language can help here. q{stuff} is a "token string" which 
> presumably contains code, whereas the other strings presumably don't. In 
> my editor, q{code} comes off as highlighted.
> 
> So I think in the future it's a good bet for both programmers and 
> editors to consider q{} quotes as containing code.
> 
> 
> Andrei

I have never seen an std.algorithm example using q{}. I'd also expect such an example to lose some of its apeal.



More information about the Digitalmars-d mailing list