http://d.puremagic.com/issues/show_bug.cgi?id=3167
--- Comment #8 from Bill Baxter <wbax...@gmail.com> 2009-08-15 03:38:43 PDT --- (In reply to comment #7) > What if X is replaced by int? Should that work? I think it's a problem. Well, probably not, because 'int' is not a large struct. So the only reason to pass it 'ref' would be if you wanted to modify it. But then you get into a case like X add(X)(ref X a, ref X b) { return a + b; } where foo takes ref in order to accept large value types without inordinate amounts of copying. But someone might want to pass int too. It would be odd if that code worked for certain size arguments but not others. If you're going to change the D1 behavior anyway, the best solution in my opinion would be to give D1 a way to specify that you want to pass by reference for efficiency, but don't want to modify the value. Give it a weak form of const parameters like C has. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------