Re: To interface or not to interface

2010-05-24 Thread Kagamin
Recently I've hit a problem with collections in C#. Given classes class A {} class B {} And two collections Collection and Collection it's possible to concat them into an array A[]. The efficient way to do it is to use CopyTo(T[],int) method, but it accepts only array of exact collection item's t

Re: To interface or not to interface

2010-05-24 Thread Alex Makhotin
Walter Bright wrote: The extra complexity is in the container supporting very different ways to do the same thing. A I understand from the current discussion, interfaces meet a strong debate. And yes, I also understand that the interfaces are considered unnecessary bloat that makes execut

Re: Poll: Primary D version

2010-05-24 Thread Jonathan M Davis
Andrei Alexandrescu wrote: > > You both have a point. Clearly not a lot of individual applications > really need more than 4GB (though unfortunately, many are pushing up for > the wrong reasons), but then a whole category of them would greatly > benefit of expanded RAM availability. > > Andrei I

Installing D on MacOS X Leopard box

2010-05-24 Thread Duke Normandin
Hello list... I'm new to D, but not programming. I've followed the instructions on http://www.digitalmars.com/d/2.0/dmd-osx.html However, I keep on getting this error: dnormandin@ ~/programming/dmd2/code 04:38 pm >> dmd -w firstApp.d object.d: Error: module object is in file 'object.d' which ca

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Jesse Phillips
Andrei Alexandrescu wrote: > On 05/24/2010 05:20 PM, Walter Bright wrote: >> Andrei Alexandrescu wrote: >>> E.g. I can't install the .deb file on my 64-bit Linux. >> >> I think the current .deb files can be. > > Just tried again, same error message: > > Error: Wrong architecture 'i386' > > Let me

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Jason House wrote: 7. Compiler-assisted verification. For interfaces, the compile time checking is limited to verifying that functions with the right signature are supplied. Templates can go considerably beyond that with the constraint checking.

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread eles
installation instructions for linux (incl. 32-bit or 64 bit) are here: http://www.digitalmars.com/d/2.0/dmd-linux.html however, i would like to have it ported on 64-bit == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 05/24/2010 05:20 PM, Walter Bright wrote: > >

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread eles
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 05/24/2010 05:20 PM, Walter Bright wrote: > > Andrei Alexandrescu wrote: > >> E.g. I can't install the .deb file on my 64-bit Linux. > > > > I think the current .deb files can be. > Just tried again, same error message

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread sybrandy
On 05/24/2010 09:05 AM, dsimcha wrote: == Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article On 23/05/2010 01:45, Walter Bright wrote: Walter Bright wrote: Other toolchain problems are things like shared libraries, installation, bugzilla bugs, etc. Installation? What kind of

Re: To interface or not to interface

2010-05-24 Thread Jason House
Walter Bright Wrote: > Steven Schveighoffer wrote: > > I'd ask the naysayers of interfaces for dcollections, and also the > > supporters: what is the point of having interfaces in D? Are interfaces > > pretty much obsolete, and I am just nostalgic about their utility? > > Interfaces are for ru

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 05:20 PM, Walter Bright wrote: Andrei Alexandrescu wrote: E.g. I can't install the .deb file on my 64-bit Linux. I think the current .deb files can be. Just tried again, same error message: Error: Wrong architecture 'i386' Let me know how I can help. Andrei

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Walter Bright
Andrei Alexandrescu wrote: E.g. I can't install the .deb file on my 64-bit Linux. I think the current .deb files can be.

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Walter Bright
dsimcha wrote: On Windows there's been some talk of making an installer. Personally, I think this should be a very low priority. Unpacking a zip file may not be the most friendly installation method for someone who's completely computer illiterate, but we're talking about programmers here. Ev

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Steven Schveighoffer wrote: All an interface does is give an abstract representation of functions that are *already there*. Removing the interface does not remove the functions that implemented the interface. Then why do interfaces need to be part of the collection component? Why can't the u

Re: To interface or not to interface

2010-05-24 Thread Steven Schveighoffer
On Mon, 24 May 2010 17:11:49 -0400, Walter Bright wrote: Steven Schveighoffer wrote: It's a logical conclusion. You provide a map-type collection, call it a HashMap. Then, a UI designer wants to abstract his specific Map-like container that exposes his elements, so you provide him a Map

Re: To interface or not to interface

2010-05-24 Thread Marianne Gagnon
In my experience (not related to DCollections), having interfaces is useful to ensure reduced coupling, thus enabling the use of mock classes for unit tests (or simply to test your module, when your module needs to use services provided by another module that is being written by a colleague but

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Steven Schveighoffer wrote: It's a logical conclusion. You provide a map-type collection, call it a HashMap. Then, a UI designer wants to abstract his specific Map-like container that exposes his elements, so you provide him a Map interface. But HashMap implements all the required functions

Re: To interface or not to interface

2010-05-24 Thread Steven Schveighoffer
On Mon, 24 May 2010 16:27:40 -0400, Walter Bright wrote: Steven Schveighoffer wrote: On Mon, 24 May 2010 14:36:57 -0400, Walter Bright wrote: and on point 3, why is it not OK to *also* provide interfaces in addition to ranges as dcollections does? That is, take away dcollections' inte

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Steven Schveighoffer wrote: On Mon, 24 May 2010 14:36:57 -0400, Walter Bright wrote: and on point 3, why is it not OK to *also* provide interfaces in addition to ranges as dcollections does? That is, take away dcollections' interfaces, and you have essentially compile-time polymorphism, they

Re: To interface or not to interface

2010-05-24 Thread Steven Schveighoffer
On Mon, 24 May 2010 14:36:57 -0400, Walter Bright wrote: Steven Schveighoffer wrote: On Mon, 24 May 2010 14:10:26 -0400, Walter Bright wrote: Steven Schveighoffer wrote: I'd ask the naysayers of interfaces for dcollections, and also the supporters: what is the point of having interfac

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Steven Schveighoffer wrote: On Mon, 24 May 2010 14:10:26 -0400, Walter Bright wrote: Steven Schveighoffer wrote: I'd ask the naysayers of interfaces for dcollections, and also the supporters: what is the point of having interfaces in D? Are interfaces pretty much obsolete, and I am just no

Re: To interface or not to interface

2010-05-24 Thread Steven Schveighoffer
On Mon, 24 May 2010 14:10:26 -0400, Walter Bright wrote: Steven Schveighoffer wrote: I'd ask the naysayers of interfaces for dcollections, and also the supporters: what is the point of having interfaces in D? Are interfaces pretty much obsolete, and I am just nostalgic about their util

Re: To interface or not to interface

2010-05-24 Thread Walter Bright
Steven Schveighoffer wrote: I'd ask the naysayers of interfaces for dcollections, and also the supporters: what is the point of having interfaces in D? Are interfaces pretty much obsolete, and I am just nostalgic about their utility? Interfaces are for runtime polymorphism, rather than compil

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread dsimcha
== Quote from Leandro Lucarella (llu...@gmail.com)'s article > dsimcha, el 24 de mayo a las 13:05 me escribiste: > > == Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article > > > On 23/05/2010 01:45, Walter Bright wrote: > > > > Walter Bright wrote: > > > > > > > > Other toolchain p

To interface or not to interface

2010-05-24 Thread Steven Schveighoffer
A long discussion on the utility of interfaces has taken place on the announce newsgroup following my announcement of dcollections for D2. Dcollections supports interfaces peripherally. Meaning the types in dcollections are essentially concrete classes with interfaces tacked on for cases w

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Leandro Lucarella
dsimcha, el 24 de mayo a las 13:05 me escribiste: > == Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article > > On 23/05/2010 01:45, Walter Bright wrote: > > > Walter Bright wrote: > > > > > > Other toolchain problems are things like shared libraries, installation, > > > bugzilla bu

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Adam Ruppe
On 5/24/10, bearophile wrote: > Even faster than an installer, for people that just want to try the language > quickly it can be useful a single-file zero-install download-and-go thing That's exactly what the zip is. Unzip it and go. To uninstall, just delete the folder. On Linux, you could argue

Re: Bug fix week

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 11:53 AM, dennis luehring wrote: Am 24.05.2010 16:08, schrieb Don: > 4056 Template instantiation with bare parameter not documented why don't remove this feature? it isn't syntactic sugar just an "alternative" syntax (how many other alternative syntaxes needed?) FWIW I swear by

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread bearophile
dsimcha: > On Windows there's been some talk of making an installer. Personally, I think > this should be a very low priority. Unpacking a zip file may not be the most > friendly installation method for someone who's completely computer > illiterate, but > we're talking about programmers here.

Re: Bug fix week

2010-05-24 Thread dennis luehring
Am 24.05.2010 16:08, schrieb Don: > 4056 Template instantiation with bare parameter not documented why don't remove this feature? it isn't syntactic sugar just an "alternative" syntax (how many other alternative syntaxes needed?)

Re: Less than 30 days to bound copies of TDPL

2010-05-24 Thread Norbert Nemec
On 28/04/10 19:34, Andrei Alexandrescu wrote: On 04/28/2010 12:50 PM, Ezneh wrote: Andrei Alexandrescu Wrote: I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for previe

Re: Bug fix week

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 09:08 AM, Don wrote: Andrei Alexandrescu wrote: We've had a tremendous infusion of talent and energy in Phobos, and lately work has picked up in unprecedented ways, both in terms of new features and bug fixes. I can't say how happy I am about that! At the end of this starting week

Re: Bug fix week

2010-05-24 Thread Don
Andrei Alexandrescu wrote: We've had a tremendous infusion of talent and energy in Phobos, and lately work has picked up in unprecedented ways, both in terms of new features and bug fixes. I can't say how happy I am about that! At the end of this starting week, on Friday May 28, TDPL will be o

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 06:21 AM, Bruno Medeiros wrote: On 23/05/2010 01:45, Walter Bright wrote: Walter Bright wrote: Other toolchain problems are things like shared libraries, installation, bugzilla bugs, etc. Installation? What kind of problems are those? E.g. I can't install the .deb file on my 6

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread dsimcha
== Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article > On 23/05/2010 01:45, Walter Bright wrote: > > Walter Bright wrote: > > > > Other toolchain problems are things like shared libraries, installation, > > bugzilla bugs, etc. > Installation? What kind of problems are those? On

Re: To use opDispatch

2010-05-24 Thread bearophile
Pelle: > That's in phobos, :) > > http://digitalmars.com/d/2.0/phobos/std_traits.html#Select Right. I think a name like IF or If can be OK, I have called it If. Bye, bearophile

Re: 64-bit support (Was: Poll: Primary D version)

2010-05-24 Thread Bruno Medeiros
On 23/05/2010 01:45, Walter Bright wrote: Walter Bright wrote: Other toolchain problems are things like shared libraries, installation, bugzilla bugs, etc. Installation? What kind of problems are those? -- Bruno Medeiros - Software Engineer

Re: To use opDispatch

2010-05-24 Thread Pelle
On 05/23/2010 09:17 PM, BCS wrote: template If(bool b, T, F) { static if(b) alias T If; else alias F If; } That's in phobos, :) http://digitalmars.com/d/2.0/phobos/std_traits.html#Select