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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jan 31 16:26:08 PST 2009


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



More information about the Digitalmars-d mailing list