Andrei Alexandrescu

Results 104 comments of Andrei Alexandrescu

>However, this is personally not a question of what's possible but of what's at all convenient and likely that developers are gonna use and in the long-term what's gonna attract...

Awkward, but simple and can be simplified and packaged further: https://run.dlang.io/is/NLOSNA

good to keep in mind that it's a quick and dirty proof of concept

See also: https://github.com/dlang/druntime/pull/3172. Need to fix the associative arrays first.

@WalterBright Thanks, that didn't work with: ```d template RTTypeid(T) if (is(T == int)) { ... } ``` I get a bunch of errors such as: ``` Error: cannot interpret RTTypeid!(const(char[]))...

Even simpler to eliminate all possibilities of error: ```d struct neverusedbyanyone {} template RTTypeid(T) if (is(T == neverusedbyanyone)) { } ``` causes the same errors

Oh, even simpler: ```d template RTTypeid(T) if (false) { } ``` This also causes errors. That's the simplest baseline.

Cool! A promise made by the spec finally fulfilled. This will allow smaller and faster functions for most cases. We'll need a changelog entry as well.

@WalterBright I'll approve pending the unittester, I suppose this needs a bit of work.