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

Reply via email to