User Defined Attributes

Leandro Lucarella luca at llucax.com.ar
Wed Nov 14 02:18:40 PST 2012


Walter Bright, el 13 de November a las 16:49 me escribiste:
> On 11/13/2012 2:55 PM, bearophile wrote:
> >Walter Bright:
> >
> >>consider the type "int". Different modules impute different meanings into it
> >>all the time, and it doesn't cause terrible compatibility problems between
> >>modules.
> >
> >The usage of naked basic types as int and double cause troubles.
> 
> I know that you can use custom types instead, and have better type
> checking, etc., and can be a pretty good idea for a lot of use
> cases. But D does not require that. It's up to the programmer.

What really amazes me is how you always defend the "will not be included until
real uses cases can be shown" and in this case you are doing the exact opposite.

Can you provide any real uses cases instead of talking about a completely
theoretical and hypothetical cases?

Can you provide one concrete case where it makes sense NOT to restrict UDAs to
types and it's different from restricting exception to classes derived from
Exception?

Thank you.

-- 


More information about the Digitalmars-d-announce mailing list