digitalmars.D.bugs - [Issue 9029] New: Built-in types treated specially for alias parameters
- d-bugmail puremagic.com (24/24) Nov 15 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (10/10) Nov 15 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (11/11) Nov 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (15/15) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (8/22) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (11/13) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (8/14) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (8/18) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (12/14) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (7/7) Nov 29 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (10/24) Nov 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
- d-bugmail puremagic.com (10/14) Nov 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9029
http://d.puremagic.com/issues/show_bug.cgi?id=9029 Summary: Built-in types treated specially for alias parameters Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2012-11-15 02:13:29 PST --- DMD 2.060: template Foo(alias a){ } struct S{} alias S X; // ok alias int Y; // ok mixin Foo!S; // ok mixin Foo!int; // not ok The code should compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 15 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 yebblies <yebblies gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |galaxylang gmail.com --- Comment #1 from yebblies <yebblies gmail.com> 2012-11-15 22:23:02 EST --- *** Issue 8491 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 15 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 Manu <turkeyman gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |turkeyman gmail.com --- Comment #2 from Manu <turkeyman gmail.com> 2012-11-26 11:51:04 PST --- I'm suffering from this problem too. Fix would be nice! :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 26 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #3 from Don <clugdbug yahoo.com.au> 2012-11-29 02:15:11 PST --- This is one of those perennial issues, that everybody discovers. Previous enhancement requests identical to this one include bug 1100, bug 3116, bug 4639. I remember requesting it once, as well. It goes back even further. Here's a discussion from July 2004 (template alias parameters were first implemented in Jan 2004, so this is the dawn of time): http://digitalmars.com/d/archives/digitalmars/D/6063.html Interestingly one thing which _was_ changed in D2 is that template alias parameters can now include expressions. Late in the history of D1, local variables were also added as template alias parameters. But still not basic types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #4 from Manu <turkeyman gmail.com> 2012-11-29 03:37:32 PST --- (In reply to comment #3)This is one of those perennial issues, that everybody discovers. Previous enhancement requests identical to this one include bug 1100, bug 3116, bug 4639. I remember requesting it once, as well. It goes back even further. Here's a discussion from July 2004 (template alias parameters were first implemented in Jan 2004, so this is the dawn of time): http://digitalmars.com/d/archives/digitalmars/D/6063.html Interestingly one thing which _was_ changed in D2 is that template alias parameters can now include expressions. Late in the history of D1, local variables were also added as template alias parameters. But still not basic types.There was a proposal recently on the NG suggesting builtin types should have entries in the symbol table. Sounded fairly reasonable. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 Jacob Carlborg <doob me.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |doob me.com --- Comment #5 from Jacob Carlborg <doob me.com> 2012-11-29 04:13:50 PST --- (In reply to comment #4)There was a proposal recently on the NG suggesting builtin types should have entries in the symbol table. Sounded fairly reasonable.Yeah, this is what the dragon book suggests as well. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #6 from Don <clugdbug yahoo.com.au> 2012-11-29 08:08:00 PST --- (In reply to comment #5)(In reply to comment #4)Huh? There is no technical difficulty whatsoever, AFAIK it was _never_ thought to be difficult to implement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------There was a proposal recently on the NG suggesting builtin types should have entries in the symbol table. Sounded fairly reasonable.Yeah, this is what the dragon book suggests as well.
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #7 from Manu <turkeyman gmail.com> 2012-11-29 10:01:54 PST --- (In reply to comment #6)(In reply to comment #5)When did the difficulty come in to question? Something to do with this 'dragon book' that I don't understand? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------(In reply to comment #4)Huh? There is no technical difficulty whatsoever, AFAIK it was _never_ thought to be difficult to implement.There was a proposal recently on the NG suggesting builtin types should have entries in the symbol table. Sounded fairly reasonable.Yeah, this is what the dragon book suggests as well.
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #8 from Jacob Carlborg <doob me.com> 2012-11-29 11:58:16 PST --- (In reply to comment #7)When did the difficulty come in to question? Something to do with this 'dragon book' that I don't understand?I don't know. There's a book called "Compilers: Principles, Techniques, and Tools" which is also referred to as "the dragon book". It's basically the bible for compiler construction. If I recall correctly, Walter has said that DMD doesn't contain any fancy code, just the standard algorithms present in the dragon book. http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #9 from Manu <turkeyman gmail.com> 2012-11-29 12:22:15 PST --- I ran into this bug again today twice. In one case the alias was to receive 'void' which it didn't like either. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 29 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #10 from Don <clugdbug yahoo.com.au> 2012-11-30 04:00:37 PST --- (In reply to comment #7)(In reply to comment #6)The comments you guys have made indicated to me that you don't realize that the reason this isn't part of the language is simply because Walter has seen it as undesirable. (Not that it would make the compiler ugly or complicated or anything like that). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------(In reply to comment #5)When did the difficulty come in to question? Something to do with this 'dragon book' that I don't understand?(In reply to comment #4)Huh? There is no technical difficulty whatsoever, AFAIK it was _never_ thought to be difficult to implement.There was a proposal recently on the NG suggesting builtin types should have entries in the symbol table. Sounded fairly reasonable.Yeah, this is what the dragon book suggests as well.
Nov 30 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9029 --- Comment #11 from Manu <turkeyman gmail.com> 2012-11-30 06:59:54 PST --- (In reply to comment #10)The comments you guys have made indicated to me that you don't realize that the reason this isn't part of the language is simply because Walter has seen it as undesirable. (Not that it would make the compiler ugly or complicated or anything like that).Ah okay, yeah I have no idea about the implementation, just commenting on a conversation I saw which sounded sensible :) It'd be nice to have some sort of fix regardless. Any changes to make D more orthogonal in general are surely good. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 30 2012