Re: inheriting constructos

2009-12-04 Thread Lionello Lunesu
Perhaps reusing a constructor of an inherited class should be easier. Something like "alias this"? But how to refer to specific ctor overloads? L. On 30-11-2009 1:03, Andrei Alexandrescu wrote: Walter and I just discussed the matter of inheriting constructors. Our thought on the issue: a) If

Re: Dump special floating point operators

2009-12-04 Thread Don
Walter Bright wrote: !<>= <> <>= !<= !< !>= !> !>= http://www.digitalmars.com/d/2.0/expression.html#RelExpression While I like them a lot, it's time for them to go: 1. It's hard to remember which one does what 2. They've failed to catch on 3. No operator overloading for them 4. They are only r

Re: Breaking compatibilyt hurts

2009-12-04 Thread Daniel de Kok
On 2009-12-03 01:13:13 +0100, Jesse Phillips said: This has come up as one issue for adoption to D. D2.x is on its way, unstable, and D1.x is getting the ax. While Walter has said that the compiler will continue to get support, no one in the community knows what the library support will be lik

Re: Intel Threading building blocks for C++

2009-12-04 Thread Daniel de Kok
On 2009-12-03 04:34:31 +0100, Nick B <"nick_NOSPAM_.barbalich"@gmail.com> said: See http://www.threadingbuildingblocks.org/ Does any know anything about the library ? This library seems to do a lot of things that this community whats to do with D, although it is written in C++. It seems t

Re: TDPL draft updated on Safari Rough Cuts

2009-12-04 Thread Daniel de Kok
On 2009-12-02 19:08:39 +0100, Andrei Alexandrescu said: After a very long delay, Safari finally updated the TDPL draft on their Rough Cuts service (http://my.safaribooksonline.com/roughcuts). They claim things will be back to normal now, and that another update (containing almost the entire

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Michal Minich
Hello Andrei, The way I was thinking of it is: int f() out(result) { } out(Exception e) { } body { } So you have a chance to assert what the world looks like in case you plan on returning a result, and what the world looks like if an exception is emerging from the function. So checked exceptio

Re: private (aka no-inherit) implementations for public methods

2009-12-04 Thread Bill Baxter
On Thu, Dec 3, 2009 at 10:15 PM, Kevin Bealer wrote: > I think I have a solution to some problems that occur in OO design.  The > problems occurs when a method can be implemented that provides a great > functionality for a specific class, but which it is not valid for its > subclasses without e

Re: Intel Threading building blocks for C++

2009-12-04 Thread Dejan Lekic
My thought exactly - STDC++ (I do not like to call it STL) should have this functionality inside, switchable with some macro definition, like "ENABLE_PARALLELISM" or something...

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Michel Fortin
On 2009-12-03 19:31:37 -0500, Andrei Alexandrescu said: Michel Fortin wrote: On 2009-12-03 17:16:11 -0500, Andrei Alexandrescu said: I found one more example. A function that transfers money from one account to another must provide a postcondition even in the case of failure: no matter

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Michel Fortin
On 2009-12-04 04:11:22 -0500, Michal Minich said: Hello Andrei, The way I was thinking of it is: int f() out(result) { } out(Exception e) { } body { } So you have a chance to assert what the world looks like in case you plan on returning a result, and what the world looks like if an exceptio

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Michal Minich
Hello Michel, if the function which throws exception is pure, then there is no world invariant to hold on after function exits (only return value is to be checked on success). Is there reason to have out(Exception ex) {} postcondition for pure function, or it should be compile time error to spec

Re: Breaking compatibilyt hurts

2009-12-04 Thread Leandro Lucarella
Daniel de Kok, el 4 de diciembre a las 09:38 me escribiste: > On 2009-12-03 01:13:13 +0100, Jesse Phillips > said: > >This has come up as one issue for adoption to D. D2.x is on its > >way, unstable, and D1.x is getting the ax. While Walter has said > >that the compiler will continue to get supp

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Leandro Lucarella
Michal Minich, el 4 de diciembre a las 13:13 me escribiste: > Hello Michel, > > >>if the function which throws exception is pure, then there is no > >>world invariant to hold on after function exits (only return value is > >>to be checked on success). Is there reason to have out(Exception ex) > >

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 16:35:57 +0300, Leandro Lucarella wrote: Michal Minich, el 4 de diciembre a las 13:13 me escribiste: Hello Michel, >>if the function which throws exception is pure, then there is no >>world invariant to hold on after function exits (only return value is >>to be checked

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 16:13:53 +0300, Michal Minich wrote: Hello Michel, if the function which throws exception is pure, then there is no world invariant to hold on after function exits (only return value is to be checked on success). Is there reason to have out(Exception ex) {} postcondition

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Michal Minich
Hello Leandro, I think postconditions should only be able to inspect (in a read-only manner) the exception; once the postcondition finished executing, the exception should be propagated as is. heating up the processor for no effect whatsoever?! Note also that it is possible, and desired, to

Re: Breaking compatibilyt hurts

2009-12-04 Thread Nick Sabalausky
"Leandro Lucarella" wrote in message news:20091204133103.gb27...@llucax.com.ar... > Daniel de Kok, el 4 de diciembre a las 09:38 me escribiste: >> On 2009-12-03 01:13:13 +0100, Jesse Phillips >> said: >> >This has come up as one issue for adoption to D. D2.x is on its >> >way, unstable, and D1

Re: Dump special floating point operators

2009-12-04 Thread Don
ZY.Zhou wrote: Andrei Alexandrescu Wrote: Sorry. So a !>= b is indeed semantically equivalent with isnan(a) || isnan(b) || a < b. However, if I read the table at http://www.digitalmars.com/d/2.0/expression.html#RelExpression correctly, !(a >= b) would throw if either is NaN. But there is a

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Andrei Alexandrescu
Michal Minich wrote: Hello Andrei, The way I was thinking of it is: int f() out(result) { } out(Exception e) { } body { } So you have a chance to assert what the world looks like in case you plan on returning a result, and what the world looks like if an exception is emerging from the function

Re: Dump special floating point operators

2009-12-04 Thread Sean Kelly
Don Wrote: > > Currently one use is in CTFE: > isNaN(x) doesn't work in CTFE at the moment, whereas x<>=0 does. But of > course isNaN should work in CTFE. Doesn't x!=x work just as well?

Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
Hello! How do I build DMD from sources? Do I have to buy and use Digital Mars C++ compiler only? Best Regards, Daniel

Re: Building DMD from sources

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 20:34:10 +0300, Daniel Ribeiro Maciel wrote: Hello! How do I build DMD from sources? Do I have to buy and use Digital Mars C++ compiler only? Best Regards, Daniel Digital Mars C++ compiler is free to use and is available for download on the same page with Digital

Re: Building DMD from sources

2009-12-04 Thread Alexander Suhoverhov
Daniel Ribeiro Maciel writes: > Hello! > > How do I build DMD from sources? Do I have to buy and use > Digital Mars C++ compiler only? > > Best Regards, > Daniel Which OS are you trying to build it on? gcc compiles the linux version with the linux.mak makefile. -- Best regards, Alexander Suhove

Re: Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
I'm trying to build it on windows. Alexander Suhoverhov Wrote: > Daniel Ribeiro Maciel writes: > > Hello! > > > > How do I build DMD from sources? Do I have to buy and use > > Digital Mars C++ compiler only? > > > > Best Regards, > > Daniel > > Which OS are you trying to build it on? gcc compil

Re: Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
Thank you for answering so fast. I'll try that. One more thing: I noticed I need to convert VS libraries from COFF format to OMF format so I can link them with my D software. I also noticed that coff2omf tool from Digital Mars is not free. Do you know any free tools that do that job? Best rega

Re: D piggyback style - is popularity really what D wants? If so...

2009-12-04 Thread BCS
Hello Walter, Clay Smith wrote: * D is ported to .Net Cristian Vlasceanu already ported D to .NET. Did he ever finish it? Is it mantained? Did he ever publish his code?

Re: Building DMD from sources

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 20:43:01 +0300, Daniel Ribeiro Maciel wrote: Thank you for answering so fast. I'll try that. One more thing: I noticed I need to convert VS libraries from COFF format to OMF format so I can link them with my D software. I also noticed that coff2omf tool from Digital Ma

Re: D piggyback style - is popularity really what D wants? If so...

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 20:46:53 +0300, BCS wrote: Hello Walter, Clay Smith wrote: * D is ported to .Net Cristian Vlasceanu already ported D to .NET. Did he ever finish it? Is it mantained? Did he ever publish his code? http://dnet.codeplex.com It's for D2.0, not sure what exactly ver

Re: Providing feedback for submitted patches [was: new version]

2009-12-04 Thread BCS
Hello Leandro, Walter Bright, el 2 de diciembre a las 14:46 me escribiste: Leandro Lucarella wrote: Walter Bright, el 2 de diciembre a las 13:29 me escribiste: I'd like to compare the user base and calculate the bugs/users ratio. I guess GCC's would be orders of magnitude smaller. And

Re: D piggyback style - is popularity really what D wants? If so...

2009-12-04 Thread BCS
Hello Denis, On Fri, 04 Dec 2009 20:46:53 +0300, BCS wrote: Hello Walter, Clay Smith wrote: * D is ported to .Net Cristian Vlasceanu already ported D to .NET. Did he ever finish it? Is it mantained? Did he ever publish his code? http://dnet.codeplex.com It's for D2.0, not sure what

Re: Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
Well, I tried to download it from: http://www.digitalmars.com/download/freecompiler.html But the link to the Extended Utilities Package is a link to DM Shop. Maybe we should document this stuff on DMD home page, perhaps include them on FAQ. Can I build DMD using mingw? Or link to mingw librarie

Re: Building DMD from sources

2009-12-04 Thread Denis Koroskin
On Fri, 04 Dec 2009 21:08:39 +0300, Daniel Ribeiro Maciel wrote: Well, I tried to download it from: http://www.digitalmars.com/download/freecompiler.html But the link to the Extended Utilities Package is a link to DM Shop. Maybe we should document this stuff on DMD home page, perhaps includ

Re: private (aka no-inherit) implementations for public methods

2009-12-04 Thread BCS
Hello Bill, Trouble is you have no idea exactly what behavior other classes are going to extend. It may not require reimplementing serialize, for instance. Like subclassing to implement ref-counting or something. I don't think you can determine up front which methods need to be overridden and

Re: Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
I just wanted coff2omf. I did not try to build dmd usind dmc yet. I was just wondering whether it could be built using mingw. Denis Koroskin Wrote: > On Fri, 04 Dec 2009 21:08:39 +0300, Daniel Ribeiro Maciel > wrote: > > > Well, I tried to download it from: > > > > http://www.digitalmars.com

Re: Breaking compatibilyt hurts

2009-12-04 Thread Leandro Lucarella
Nick Sabalausky, el 4 de diciembre a las 10:03 me escribiste: > > The second release with the change has the new/removed feature. That gives > > people time to fix their programs and try the new feature without breaking > > anything for several months (a minor Python version is released each ~9 >

Re: Building DMD from sources

2009-12-04 Thread BCS
Hello Daniel, Well, I tried to download it from: http://www.digitalmars.com/download/freecompiler.html try this link: http://www.digitalmars.com/download/dmcpp.html But the link to the Extended Utilities Package is a link to DM Shop. Maybe we should document this stuff on DMD home page, p

Re: should postconditions be evaluated even if Exception is thrown?

2009-12-04 Thread Leandro Lucarella
Michal Minich, el 4 de diciembre a las 14:13 me escribiste: > Hello Leandro, > > >I think postconditions should only be able to inspect (in a read-only > >manner) the exception; once the postcondition finished executing, the > >exception should be propagated as is. > > > > heating up the process

Re: Building DMD from sources

2009-12-04 Thread BCS
Hello BCS, Hello Daniel, Well, I tried to download it from: http://www.digitalmars.com/download/freecompiler.html try this link: http://www.digitalmars.com/download/dmcpp.html Oops, that's to DMC. got the threads mixed up. But the link to the Extended Utilities Package is a link to DM

Re: Building DMD from sources

2009-12-04 Thread Walter Bright
Daniel Ribeiro Maciel wrote: Thank you for answering so fast. I'll try that. One more thing: I noticed I need to convert VS libraries from COFF format to OMF format so I can link them with my D software. I also noticed that coff2omf tool from Digital Mars is not free. Do you know any free tools

Re: Building DMD from sources

2009-12-04 Thread Walter Bright
Daniel Ribeiro Maciel wrote: I'm trying to build it on windows. You will need DMC++. It can be built with the free download version of DMC++, but if you need the coff2omf, that needs to be purchased. It's part of the complete C/C++ development system, or comes with the Extended Utility Packa

Re: Dump special floating point operators

2009-12-04 Thread Don
Sean Kelly wrote: Don Wrote: Currently one use is in CTFE: isNaN(x) doesn't work in CTFE at the moment, whereas x<>=0 does. But of course isNaN should work in CTFE. Doesn't x!=x work just as well? Yes.

Traits problem

2009-12-04 Thread Daniel Ribeiro Maciel
Hello! I'm trying to use __traits in the following manner: import std.stdio; import std.traits; class Foo { void bla() { } void foo() { } } int main() { immutable string members[] = [ "bla", "foo" ]; writeln( typeid(typeof(__traits(getVirtualFunctions, Foo, members[0]) )) ); }

Re: Building DMD from sources

2009-12-04 Thread Daniel Ribeiro Maciel
Thanks a lot ppl. I got to build it on Linux. Gonna try to build on Windows @ home. Walter Bright Wrote: > Daniel Ribeiro Maciel wrote: > > I'm trying to build it on windows. > > You will need DMC++. It can be built with the free download version of > DMC++, but if you need the coff2omf, that

Re: Traits problem

2009-12-04 Thread bearophile
Daniel Ribeiro Maciel: Try this: import std.stdio: writeln; class Foo { float bla() { return 0.0; } void foo() {} } void main() { enum string[] members = ["bla", "foo"]; writeln( typeid(typeof(__traits(getVirtualFunctions, Foo, members[0]) )) ); } Output: (float()) You need enu

Re: D piggyback style - is popularity really what D wants? If so...

2009-12-04 Thread Jesse Phillips
BCS Wrote: > Hello Walter, > > > Clay Smith wrote: > > > >> * D is ported to .Net > >> > > Cristian Vlasceanu already ported D to .NET. > > > > Did he ever finish it? Is it mantained? Did he ever publish his code? > > Quite simply, the answer is yes: http://dnet.codeplex.com/ umm, but pr

Re: Dump special floating point operators

2009-12-04 Thread Phil Deets
On Fri, 04 Dec 2009 11:06:31 -0500, Don wrote: Here's a table of equivalences. a!<>=b (a!=a) || (b!=b) a<>b (a==a) && (b==b) && (a!=b) a!<>b (a!=a) || (b!=b) || (a!=b) a<>=b (a==a) && (b==b) a!<=b !(a<=b) a!=b !(a>=b) a!>b !(a>b)

Re: Traits problem

2009-12-04 Thread Daniel Ribeiro Maciel
Heya! Ok, let me explain what I want to do: import std.stdio: writeln; class Foo { float bla() { return 0.0; } void foo() {} } void main() { enum string[] members = __traits(allMembers, Foo ); foreach( member; members ) writeln( typeid(typeof(__traits(getVirt

Re: Dump special floating point operators

2009-12-04 Thread Don
Phil Deets wrote: On Fri, 04 Dec 2009 11:06:31 -0500, Don wrote: Here's a table of equivalences. a!<>=b (a!=a) || (b!=b) a<>b (a==a) && (b==b) && (a!=b) a!<>b (a!=a) || (b!=b) || (a!=b) a<>=b (a==a) && (b==b) a!<=b !(a<=b) a!=b !(a>=b) a!

the Python moratorium

2009-12-04 Thread Walter Bright
An interesting discussion of the issues involved in improving a language, pretty relevant to D. http://jessenoller.com/2009/12/04/pythons-moratorium-lets-think-about-this/