June 13, 2013 Re: Inability to dup/~ for const arrays of class objects | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | "Michel Fortin" <michel.fortin@michelf.ca> wrote in message news:kp9s6b$29lq$1@digitalmars.com... > > If you can manage to patch DMD as you suggest, then it'll be theoretically more sound and there's chances the resulting code in the compiler (at the semantic level at least) will be cleaner than what I did, so I'm all for it. > > I fail to see how getting a "non-reference" type for the class (through U in this template) would be useful though. You can't use that type directly, all you can do is add a 'ref' after it. > > My fear is that you'll just move some weird behaviour from the semantic to the syntactic level. You'll have a true reference type that'll be implicitly there but optional at the same time. Well, maybe. That's just a feeling I have. By all means, give it a try so we know how it fares. > Yeah, I can't really say much for sure until I've implemented it. Let's hope it all works as well in practise as it does in theory. |
Copyright © 1999-2021 by the D Language Foundation