Does D have too many features?

Timon Gehr timon.gehr at gmx.ch
Sun Apr 29 06:28:31 PDT 2012


On 04/29/2012 02:26 PM, David Nadlinger wrote:
> TokenString: [...]Regarding TokenString(i.e. q{}) – it is certainly a very
> nice idea, especially regarding syntax highlighting, and I occasionally
> use them for CTFE code generation. But without any kind of support for
> string interpolation, I typically find myself using normal strings for
> everything except small self-contained portions of code (where mixin
> templates would probably be cleaner). The problem is that can't just
> »interrupt« q{}s strings to do something like »q{…} ~ identifierName ~
> q{…}«, because there will most likely be unmatched braces – but this is
> needed in assembling mixin strings all the time…
>

Lack of string interpolation is not a reason to kill the token string, 
because CTFE lets you provide the interpolation manually. I use token 
strings often in this fashion for code generation.

> - Floating point comparison operators like !<>= (yes, that _is_ valid D
> code): I must admit that I seldom write code relying on the finer
> details of IEEE-754 semantics, but can't they just be »lowered« to a
> combination of the more common ones?
>

I kinda like those ;D.




More information about the Digitalmars-d mailing list