std.algorithm.countUntil and alias

Anton Pastukhov caffeine9999 at mailbox.org
Thu Oct 24 10:44:32 UTC 2024


On Wednesday, 23 October 2024 at 18:39:15 UTC, H. S. Teoh wrote:
> The key here is to understand that "alias" != "macro".

Re-reading this topic today and indeed that was the missing 
piece. I was sure that alias is just a compile-time string 
replacement akin to C macros, just with some niceties such as 
type checking.

Thanks to everyone commenting in this topic. For my initial 
question, I just ditched aliases and use full names instead. The 
underlying issue was my misunderstanding of the meaning of 
`symbol` as independently-addressable entity, and another 
misunderstanding of how `alias` works in D (and the fact that 
it's actually not just a macro).


More information about the Digitalmars-d-learn mailing list