Library Typedefs are fundamentally broken
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 22 18:19:05 PDT 2014
On Mon, 22 Sep 2014 16:06:42 -0700
Andrei Alexandrescu via Digitalmars-d <digitalmars-d at puremagic.com>
wrote:
> On 9/22/14, 11:52 AM, ketmar via Digitalmars-d wrote:
> > seems that Andrei talking about 'idiomatic D' and we are talking
> > about 'hacky typedef replacement'. that's why we can't settle the
> > issue: we are both right! ;-)
> That I'd agree with.
yeah, and then your resistance to turn 'idiomatic D' to 'hacky typedef'
is completely understandable. it took me a while to realise that we are
talking about different things here.
> > and that's why we need 'typedef' revived, methinks.
> Sorry, no.
"Typedef" is elegant and "typedef" is handy. why can't we have both? at
least until AST macros arrives (and then we'll make "typedef",
"deftype" and "gimmeacheese" ;-). let's limit "typedef" to simple
numeric types and pointers to simple numeric types to ease
implementation. sure, we'll be able to multiple money by money but not
money by float then, but i found this acceptable, we always can write a
free function which multiples our money. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140923/41b044a4/attachment.sig>
More information about the Digitalmars-d
mailing list