UDAs - Restrict to User Defined Types?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Thu Nov 8 19:45:05 PST 2012


On Thu, 08 Nov 2012 10:05:30 +0100
Jacob Carlborg <doob at me.com> wrote:
> 
> I think we should only allow user defined types marked with
> @attribute, i.e.
> 
> @attribute struct foo {}
> @attribute class foo {}
> @attribute interface foo {}
> @attribute enum foo {}
> 
> And so on.
> 

I completely agree. I really hate when languages "play it loose" and
leave things up to arbitrary convention. It's like duck/structural
typing: the *one* thing I hate about D ranges is that they don't force
you to explicitly say "Yes, I *intend* this to be an InputRange" (what
are we, Go users?). I don't want to see the same unhelpful sloppiness
here.



More information about the Digitalmars-d mailing list