Re: why can't structs implement interfaces?

2009-11-25 Thread Don
bearophile wrote: Bill Baxter: The good thing is that since most of the machinery is there, the actual compiler changes required would mostly be just rewrites of new syntax in terms of existing functionality. I agree, this looks like something that can be added to D even after D2 comes out

Re: why can't structs implement interfaces?

2009-11-25 Thread Lars T. Kyllingstad
Don wrote: bearophile wrote: Bill Baxter: The good thing is that since most of the machinery is there, the actual compiler changes required would mostly be just rewrites of new syntax in terms of existing functionality. I agree, this looks like something that can be added to D even after

Re: why can't structs implement interfaces?

2009-11-25 Thread Rory McGuire
Saaa em...@needmail.com wrote: struct S : Pos {} Why is this not possible? Why do you want to use a struct for that, rather than a class?

Re: reading files from a directory

2009-11-25 Thread Rory McGuire
miriac 1234...@gmail.com wrote: Jesse Phillips Wrote: miriac Wrote: I'm trying to get my program to read all the files in a directory. dmd gives an errer that theis imports dont exist: tango.io.FileSystem, tango.io.FileRoots, Can someone please help me and tell me what i use to

Re: why can't structs implement interfaces?

2009-11-25 Thread bearophile
Don: That's been requested many times. I posted a patch to Walter to do exactly that. It was beautiful. It detected recursive template expansions, and gave really nice error messages. Silently rejected. Sigh. If your patch is well done, works with LDC too, I see no reason to refuse this

Re: why can't structs implement interfaces?

2009-11-25 Thread bearophile
Lars T. Kyllingstad: What's the bugzilla number? Should be upvoted. I think he refers to this one (searching something in Bugzilla seems a good way to spend a morning): http://d.puremagic.com/issues/show_bug.cgi?id=2816 In the comment 9, instead of: bug.d(2): Error: static assert (0) is

Re: why can't structs implement interfaces?

2009-11-25 Thread Don
bearophile wrote: Don: That's been requested many times. I posted a patch to Walter to do exactly that. It was beautiful. It detected recursive template expansions, and gave really nice error messages. Silently rejected. Sigh. If your patch is well done, works with LDC too, I see no reason

Re: why can't structs implement interfaces?

2009-11-25 Thread bearophile
Don: Please don't do that just yet. It's something that can wait until the D2 stuff is finished. It can be added at any time. Some of the other things are urgent. OK :-) You are right, as usual. Bye, bearophile