If you could make any changes to D, what would they look like?

Adam D Ruppe destructionator at gmail.com
Mon Oct 25 17:45:02 UTC 2021


On Monday, 25 October 2021 at 17:23:01 UTC, Dennis wrote:
> - opDispatch: suddenly member introspection 
> (`__traits(hasMember)`) succeeds when you don't expect it

Yea, I kinda wish it didn't affect hasMember. This is one place 
where I pretty consistently use a template constraint to at least 
prohibit "popFront" in there. Hacky i know.

My rule lately has also been opDispatch goes on its own thing. 
Like dom.d used to do

element.attribute

through opDispatch. Now it only allows it through

element.attrs.attribute

to help to contain it.

I still think it is cool tho lol

> Nowadays whenever I can express something with plain old 
> structs/functions/arrays/enums, I do that instead of anything 
> fancy, and I'm liking the result.

indeed, generally good strats.


More information about the Digitalmars-d mailing list