Annoyance: 'Shadowing declaration is deprecated'+ mixins

Don Clugston dac at nospam.com.au
Wed Jul 25 04:32:39 PDT 2007


Jari-Matti Mäkelä wrote:
> Don Clugston wrote:
>> Jari-Matti Mäkelä wrote:
> 
>>> I hope that when macros come there will be a possibility to choose
>>> between hygienic and unhygienic versions. I've started to think string
>>> mixins are a big design mistake.
>> My post was actually to indicate that this lack of hygiene is a genuine
>> nuisance (not merely aesthetically undesirable). I wonder when an
>> unhygienic macro would actually be useful.
> 
> Speaking of aesthetics makes it sound like it's only some academic nonsense
> not applicable in "real world".

Yup. I've heard "hygienic" used as if it was purely academic. It's certainly not.

> Most other languages solve the problem using similar techniques so I just
> wanted to tell there's no need to reimplement the wheel this time.

Maybe. I hope macros can do it. It's going to be very hard to match the power of 
mixins, though. In particular, the case where symbol names are embedded in a 
string seems to be useful, important, and difficult.



More information about the Digitalmars-d mailing list