Re: Descent 0.5.5 released

2009-05-21 Thread Lutger
Sweet, thank you!

Re: Descent 0.5.5 released

2009-05-21 Thread Saaa
For this release Robert Fraser made an excelent addition: when compiling programs using an external tool such as dsss, rebuild, dmd, gdc, ldc, gdmd or bud, there are now links to the files in the console output for warnings and errors. I think this one was pretty requested. So say thanks

Re: Descent 0.5.5 released

2009-05-21 Thread Ary Borenszweig
Saaa wrote: For this release Robert Fraser made an excelent addition: when compiling programs using an external tool such as dsss, rebuild, dmd, gdc, ldc, gdmd or bud, there are now links to the files in the console output for warnings and errors. I think this one was pretty requested. So say

Re: Descent 0.5.5 released

2009-05-21 Thread Robert Fraser
Saaa wrote: Is the executable name any of bud or bud.exe? I think that's what the process name is for Eclipse, and the links are associated to the process name (not to the name you choose for the external tool). :) May I suggest adjusting the filter to bud*.exe or add a note on dsource as I

Taunting

2009-05-21 Thread Ary Borenszweig
http://www.youtube.com/watch?v=rtYCFVPfx4M

Re: Taunting

2009-05-21 Thread grauzone
Ary Borenszweig wrote: http://www.youtube.com/watch?v=rtYCFVPfx4M How about posting a link to something everyone can play? Like an actual video file? Thank you.

Re: Taunting

2009-05-21 Thread BCS
Reply to Ary, http://www.youtube.com/watch?v=rtYCFVPfx4M The clunk you just heard is my jaw bouncing on the floor G NICE!

Re: Taunting

2009-05-21 Thread Ary Borenszweig
Leandro Lucarella escribió: BCS, el 22 de mayo a las 00:01 me escribiste: Reply to Ary, http://www.youtube.com/watch?v=rtYCFVPfx4M The clunk you just heard is my jaw bouncing on the floor G NICE! That's what happens when you have a turing complete language inside another! There is no

Re: Taunting

2009-05-21 Thread Jason House
Ary Borenszweig Wrote: grauzone escribió: Ary Borenszweig wrote: http://www.youtube.com/watch?v=rtYCFVPfx4M How about posting a link to something everyone can play? Like an actual video file? Thank you. Awww, but that made the tauting much better. :-(

Re: the last change for ranges

2009-05-21 Thread Brad Roberts
Andrei Alexandrescu wrote: dsimcha wrote: Please, please, please PLEASE, PRETTY PLEASE FOR THE LOVE OF GOD ALMIGHTY tell me you're not serious!!! Isn't changing the interface such that forward ranges are no longer effectively a subtype of input ranges a bit drastic? Or do you have some

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Walter Bright
Andrei Alexandrescu wrote: Daniel Keep wrote: Andrei Alexandrescu wrote: Apparently the entire talk has been filmed, and the conference organizers have edited the footage a bit and will make it available soon. Stay tuned. Andrei Why do you taunt us so? Coming soon: something awesome you

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Christopher Wright
Nick Sabalausky wrote: Christopher Wright dhase...@gmail.com wrote in message news:gv29vn$7a...@digitalmars.com... Nick Sabalausky wrote: Christopher Wright dhase...@gmail.com wrote in message news:gv0p4e$uv...@digitalmars.com... Nick Sabalausky wrote: I can see certain potential benefits to

Re: the last change for ranges

2009-05-21 Thread Jason House
dsimcha Wrote: == Quote from Jason House (jason.james.ho...@gmail.com)'s article dsimcha Wrote: == Quote from Jason House (jason.james.ho...@gmail.com)'s article IMHO, D should have a type with low size and function call overhead like a struct as well as reference semantics

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Steven Schveighoffer
On Wed, 20 May 2009 23:40:54 -0400, Nick Sabalausky a...@a.a wrote: Christopher Wright dhase...@gmail.com wrote in message news:gv29vn$7a...@digitalmars.com... Nick Sabalausky wrote: Christopher Wright dhase...@gmail.com wrote in message news:gv0p4e$uv...@digitalmars.com... Nick Sabalausky

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Jeremie Pelletier
Walter Bright Wrote: Andrei Alexandrescu wrote: Daniel Keep wrote: Andrei Alexandrescu wrote: Apparently the entire talk has been filmed, and the conference organizers have edited the footage a bit and will make it available soon. Stay tuned. Andrei Why do you taunt us so?

opCall and template functions

2009-05-21 Thread Steve Teale
Is this error intentional import std.stdio; class A { int a; double b = 22.4; string s = whatever; string opCall() { return s; } //T opCall(T = string)() { return cast(T) s; } T opCall(T)(T* dummy) { if (is(typeof(dummy) : int*)) return cast(T) a; else

Re: opCall and template functions

2009-05-21 Thread Jarrett Billingsley
On Thu, May 21, 2009 at 10:01 AM, Steve Teale steve.te...@britseyeview.com wrote: Is this error intentional import std.stdio; class A {   int a;   double b = 22.4;   string s = whatever;   string opCall() { return s; }   //T opCall(T = string)() { return cast(T) s; }   T opCall(T)(T*

Defining a version after it's tested for

2009-05-21 Thread Robert Clipsham
I recently came across this: version( BackendFoo ) {} else version( BackendBar ) {} else version( BackendCar ) {} else { pragma( msg, Warning: backend version undefined ); pragma( msg, Attempting to guess backend ); version( Windows ) { version = BackendFoo; pragma( msg, Selected

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Yigal Chripun
BCS wrote: in C# you almost never compile each source file separately, rather you compile a bunch of sources into an assembly all at once and you provide the list of other assemblies your code depends on. so the dependency is on the package level rather than on the file level. this make so much

Re: Defining a version after it's tested for

2009-05-21 Thread Tim Matthews
On Fri, 22 May 2009 02:45:24 +1200, Robert Clipsham rob...@octarineparrot.com wrote: If it's not possible to fix this, what way would you recommend I get around this? I think versions are powerfull enough so I created a wrapper around which makes best use of static asserts (attached)

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Yigal Chripun
Nick Sabalausky wrote: Maybe this is naive, but what about an AST-level template/generic? Couldn't that provide for the best of both worlds? For instance, suppose (purely hypothetically) that the .NET assembly system were changed to allow the source for a D/C++ style of source-level

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Andrei Alexandrescu
Yigal Chripun wrote: Nick Sabalausky wrote: I suppose that might make reverse-engineering easier which MS might not like, but I'm not suggesting this as something that MS should like or should even do, but rather suggesting it as (business issues completely aside) something that would

Re: Defining a version after it's tested for

2009-05-21 Thread Steven Schveighoffer
On Thu, 21 May 2009 10:45:24 -0400, Robert Clipsham rob...@octarineparrot.com wrote: I recently came across this: version( BackendFoo ) {} else version( BackendBar ) {} else version( BackendCar ) {} else { pragma( msg, Warning: backend version undefined ); pragma( msg, Attempting to

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread BCS
Reply to Yigal, BCS wrote: in C# you almost never compile each source file separately, rather you compile a bunch of sources into an assembly all at once and you provide the list of other assemblies your code depends on. so the dependency is on the package level rather than on the file level.

It's not always nice to share

2009-05-21 Thread Walter Bright
http://www.reddit.com/r/programming/comments/8m6p0/dobbs_code_talk_its_not_always_nice_to_share/

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Tim Matthews
On Fri, 22 May 2009 05:28:30 +1200, Walter Bright newshou...@digitalmars.com wrote: Jeremie Pelletier wrote: Walter Bright Wrote: Andrei Alexandrescu wrote: Daniel Keep wrote: Andrei Alexandrescu wrote: Apparently the entire talk has been filmed, and the conference organizers have

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Denis Koroskin
On Thu, 21 May 2009 21:43:07 +0400, Tim Matthews tim.matthe...@gmail.com wrote: On Fri, 22 May 2009 05:28:30 +1200, Walter Bright newshou...@digitalmars.com wrote: Jeremie Pelletier wrote: Walter Bright Wrote: Andrei Alexandrescu wrote: Daniel Keep wrote: Andrei Alexandrescu wrote:

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Yigal Chripun
BCS wrote: Reply to Yigal, BCS wrote: in C# you almost never compile each source file separately, rather you compile a bunch of sources into an assembly all at once and you provide the list of other assemblies your code depends on. so the dependency is on the package level rather than on the

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Andrei Alexandrescu
Denis Koroskin wrote: On Thu, 21 May 2009 21:43:07 +0400, Tim Matthews tim.matthe...@gmail.com wrote: On Fri, 22 May 2009 05:28:30 +1200, Walter Bright newshou...@digitalmars.com wrote: Jeremie Pelletier wrote: Walter Bright Wrote: Andrei Alexandrescu wrote: Daniel Keep wrote: Andrei

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Tim Matthews
On Fri, 22 May 2009 06:16:28 +1200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Denis Koroskin wrote: On Thu, 21 May 2009 21:43:07 +0400, Tim Matthews tim.matthe...@gmail.com wrote: On Fri, 22 May 2009 05:28:30 +1200, Walter Bright newshou...@digitalmars.com wrote:

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s Before I got into D, I was working on Enki. Enki was my own programming language and of course made D look like a piece of crap. In Enki, you had only very few primitives related to macro expansion, and you could construct all

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Denis Koroskin
On Thu, 21 May 2009 23:07:32 +0400, BCS a...@pathlink.com wrote: Reply to Yigal, BCS wrote: Reply to Yigal, if you compile each file separately than you parse all 4 files for each object file which is completely redundant and makes little sense since you'll need to recompile all of them

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Andrei Alexandrescu
dsimcha wrote: Bringing this analogy back to language design, if you make a language very highly configurable and don't provide good defaults, the barrier to entry will just be too high. If people have to understand a whole bunch of intricacies of the macro system to do anything more complex

Re: Defining a version after it's tested for

2009-05-21 Thread Robert Clipsham
Steven Schveighoffer wrote: Versions are intended to be predefined before usage. It's the same thing as using a variable before it's defined. The rational is, to flag errors to the user where he thinks forward referencing of versions works. Unfortunately, you have to do the following

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:gv3ubr$2u...@digitalmars.com... Yigal Chripun wrote: Nemerle's interesting, but it has its own issues. The largest one is that it will have to beat history: languages with configurable syntax have failed in droves in

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Andrei Alexandrescu
Nick Sabalausky wrote: There are many possible reasons for a failed language's failure. One of the biggest is lack of visibility. Who has ever heard of IMP72? Sure, that lack of visibility could have been because people hated that particular aspect of the language, but it could also have been

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread BCS
Reply to Denis, I assert that very rare that a programs NEEDS to use a DLL/so/DDL type of system. The only unavoidable reasons to use them that I see are: 1) you are forced to use code that can't be had at compile time (rare outside of plugins and they don't count because they are not your

Re: Iterators Must Go video to come online soon

2009-05-21 Thread BCS
Reply to Tim, On Fri, 22 May 2009 06:16:28 +1200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Denis Koroskin wrote: On Thu, 21 May 2009 21:43:07 +0400, Tim Matthews tim.matthe...@gmail.com wrote: On Fri, 22 May 2009 05:28:30 +1200, Walter Bright newshou...@digitalmars.com

ideas about ranges

2009-05-21 Thread Steven Schveighoffer
The thread discussing what to do for input ranges vs. forward ranges got me thinking. The range concept may be defined backwards in terms of which is more specialized. Consider that an input range is always usable as a stream. But a stream is not easy to use as an input range (the

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Andrei Alexandrescu
BCS wrote: Is there going to be a midnight release party? Rats, I almost forgot. I arranged with an old friend to hold a little party in conjunction to his. http://tinyurl.com/qgdolk Andrei P.S. In fact I'm only half kidding. According to the fellas on fatwallet.com that's a good deal.

Re: ideas about ranges

2009-05-21 Thread Jason House
Steven Schveighoffer Wrote: The thread discussing what to do for input ranges vs. forward ranges got me thinking. The range concept may be defined backwards in terms of which is more specialized. Consider that an input range is always usable as a stream. But a stream is not easy

Dithering about ranges

2009-05-21 Thread Georg Wrede
Not cosidering D or programming, the notion of a range implies a beginning and an end. So, in a certain sense, ranges could be conceptualized as slices. All's well, and everything. But, things like input streams don't really support the notion of range, or slice. They don't even want to.

Re: Iterators Must Go video to come online soon

2009-05-21 Thread Georg Wrede
Andrei Alexandrescu wrote: BCS wrote: Is there going to be a midnight release party? Rats, I almost forgot. I arranged with an old friend to hold a little party in conjunction to his. http://tinyurl.com/qgdolk Aww, geezz, the man must really be out of cash! P.S. In fact I'm

why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread nobody
$ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef std::vectorint intvec; typedef intvec* intvecp; int main() {

Re: the last change for ranges

2009-05-21 Thread Georg Wrede
Jason House wrote: Maybe I'm a bit cynical, but I never expect my posts to cause a change in D, or for my bug reports to even get a comment. For that, I must confess you've got a more mature attitude than most participants. My long posts with well thought out ideas either get no response

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Leandro Lucarella
nobody, el 22 de mayo a las 00:08 me escribiste: $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread dsimcha
== Quote from nobody (n...@where.com)'s article $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Georg Wrede
Nick Sabalausky wrote: Suppose (purely hypothetically) that the .NET assembly system were changed to allow the source for a D/C++ style of source-level template to be embedded into the assembly. Then they'd be able to do D/C++ style source-level template/code-generation. Right? I assume,

Re: Defining a version after it's tested for

2009-05-21 Thread Tim Matthews
On Fri, 22 May 2009 07:54:07 +1200, Robert Clipsham rob...@octarineparrot.com wrote: Steven Schveighoffer wrote: Versions are intended to be predefined before usage. It's the same thing as using a variable before it's defined. The rational is, to flag errors to the user where he thinks

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread nobody
You've probably hit a corner case for the garbage collector. When you allocate 20,000,000 Object instances and hold onto the references, the garbage collector probably runs about a zillion times and never finds anything to delete. If this is a bottleneck, you should temporarily disable

Re: It's not always nice to share

2009-05-21 Thread Tim Matthews
On Fri, 22 May 2009 05:37:42 +1200, Walter Bright newshou...@digitalmars.com wrote: http://www.reddit.com/r/programming/comments/8m6p0/dobbs_code_talk_its_not_always_nice_to_share/ Should this change the way pure functions work. for example: module test; int i; //tls pure void foo(int

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Robert Fraser
nobody wrote: $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef std::vectorint intvec; typedef intvec*

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Robert Fraser
Robert Fraser wrote: nobody wrote: $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef std::vectorint intvec;

Re: It's not always nice to share

2009-05-21 Thread Walter Bright
Tim Matthews wrote: Should this change the way pure functions work. for example: module test; int i; //tls pure void foo(int arg) { i = arg; } void main() { foo(2); } Error: pure function 'foo' cannot access mutable static data 'i' No. Pure functions cannot change global state,

Re: the last change for ranges

2009-05-21 Thread Jason House
Georg Wrede Wrote: Jason House wrote: I no longer try to work out the details and merely hope my efforts plant a seed for thought. It's far less frustrating that way. Sadly, ( /thoroughly/ sadly), this is like a party group. If you really want exposure, your first post should be no

Re: ideas about ranges

2009-05-21 Thread Steven Schveighoffer
On Thu, 21 May 2009 17:40:27 -0400, Jason House jason.james.ho...@gmail.com wrote: Steven Schveighoffer Wrote: So what I think we may need is a different range primitive: An iterable range defines: (name to be decided) bool empty() T popNext() An input range is an iterable range that

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Sean Kelly
nobody wrote: You've probably hit a corner case for the garbage collector. When you allocate 20,000,000 Object instances and hold onto the references, the garbage collector probably runs about a zillion times and never finds anything to delete. If this is a bottleneck, you should temporarily

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Yigal Chripun
BCS wrote: I assert that very rare that a programs NEEDS to use a DLL/so/DDL type of system. The only unavoidable reasons to use them that I see are: 1) you are forced to use code that can't be had at compile time (rare outside of plugins and they don't count because they are not your code)

Re: the last change for ranges

2009-05-21 Thread Georg Wrede
Jason House wrote: Georg Wrede Wrote: Jason House wrote: I no longer try to work out the details and merely hope my efforts plant a seed for thought. It's far less frustrating that way. Sadly, ( /thoroughly/ sadly), this is like a party group. If you really want exposure, your first post

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Georg Wrede
Yigal Chripun wrote: What I was saying was not specific for DWT but rather that _any_ reasonably big project will use such a system and it's simply not practical to do otherwise. how would you handle a project with a hundred files that takes 30 min. to compile without any tool whatsoever

Re: ideas about ranges

2009-05-21 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Thu, 21 May 2009 17:40:27 -0400, Jason House jason.james.ho...@gmail.com wrote: Steven Schveighoffer Wrote: So what I think we may need is a different range primitive: An iterable range defines: (name to be decided) bool empty() T popNext() An input range

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Yigal Chripun
Andrei Alexandrescu wrote: Yigal Chripun wrote: Nick Sabalausky wrote: I suppose that might make reverse-engineering easier which MS might not like, but I'm not suggesting this as something that MS should like or should even do, but rather suggesting it as (business issues completely aside)

Re: OT: on IDEs and code writing on steroids

2009-05-21 Thread Rainer Deyke
Yigal Chripun wrote: just so you'd understand the scale I'm talking about - our largest executable is 1.5 Gigs in size. How is 1.5 GB of dlls better than a 1.5 GB executable? (And don't forget, removing dead code across dll boundaries is a lot more difficult than removing it within a single

Re: Dithering about ranges

2009-05-21 Thread Andrei Alexandrescu
Georg Wrede wrote: Not cosidering D or programming, the notion of a range implies a beginning and an end. Actually, not. Infinity is a primitive notion with ranges. A range that defines empty like this: enum bool empty = false; is detected as infinite and treated accordingly by certain

Re: any html parser with d binding

2009-05-21 Thread Frank Benoit
Robert Fraser schrieb: reimi gibbons wrote: 2) how reliable is bcd to create binding for c libraries? C? Very reliable (unless it uses weird compiler directives). C++ is a bit trickier. Last time I used BCD, it had no support for bitfields and generated struct definition that do not match

Re: going beyond your bounds

2009-05-21 Thread Derek Parnell
On Thu, 21 May 2009 04:51:16 -0400, MLT wrote: After a discussion on digitalmars.D I played with arrays a bit. Look at the following code: int[] a = [1,2,3,4,5,6,7,8,9] ; int[] b = a ; a ~= 10 ; b ~= 11 ; b[0] = 12 ;

Re: going beyond your bounds

2009-05-21 Thread MLT
Because new elements are pre-initialized in D. Just by increasing the length, you 'create' a new element (from the 'b' point of view) so D initializes it. (We were talking about something like int a[] = [1,2,3,4,5] ; b = a ; a ~= 6 ; b.length = b.length+1;) Hmmm... yes, that has some

Re: going beyond your bounds

2009-05-21 Thread Derek Parnell
On Thu, 21 May 2009 05:58:04 -0400, MLT wrote: Because new elements are pre-initialized in D. Just by increasing the length, you 'create' a new element (from the 'b' point of view) so D initializes it. (We were talking about something like int a[] = [1,2,3,4,5] ; b = a ; a ~= 6 ;

Re: DMD Modifications

2009-05-21 Thread Daniel Keep
white_man wrote: Does it possible to modify DMD and publish it in that form. Of course with full information about authors. Does it legal? It depends. If you ONLY modify the front-end (front-end files are identified as being licensed under GPL [1]), then you can distribute the modified

Re: any html parser with d binding

2009-05-21 Thread Christopher Wright
BCS wrote: Hello reimi, i have 2 question here: 1) can anyone suggest good html parser with d binding? IIRC ANTLR can generate D The last supported version was 2.7.something. It depends on phobos, possibly a rather old version of it (I don't know).

Re: DMD Modifications

2009-05-21 Thread Spacen Jasset
Daniel Keep wrote: white_man wrote: Does it possible to modify DMD and publish it in that form. Of course with full information about authors. Does it legal? It depends. If you ONLY modify the front-end (front-end files are identified as being licensed under GPL [1]), then you can distribute

Class allocation from tuple

2009-05-21 Thread bearophile
I have a tuple of classes (D1 language), I'd like to instantiate one of them directly with new, but it seems I can't: template Tuple(T...) { alias T Tuple; } class Foo { static void foo(){} } class Bar {} alias Tuple!(Foo, Bar) ClassTuple; void main() { alias ClassTuple[0] Foo0; new

Re: Class allocation from tuple

2009-05-21 Thread bearophile
Jarrett Billingsley: When it tries to parse the type following 'new', it interprets the brackets as meaning an array type, I agree. But not even this works: new (ClassTuple[0]); Bye, bearophile

Re: Class allocation from tuple

2009-05-21 Thread Jarrett Billingsley
On Thu, May 21, 2009 at 11:13 AM, bearophile bearophileh...@lycos.com wrote: Jarrett Billingsley: When it tries to parse the type following 'new', it interprets the brackets as meaning an array type, I agree. But not even this works: new (ClassTuple[0]); Bye, bearophile Have you tried

Re: Class allocation from tuple

2009-05-21 Thread Robert Fraser
bearophile wrote: I have a tuple of classes (D1 language), I'd like to instantiate one of them directly with new, but it seems I can't: template Tuple(T...) { alias T Tuple; } class Foo { static void foo(){} } class Bar {} alias Tuple!(Foo, Bar) ClassTuple; void main() { alias

Theory question

2009-05-21 Thread BCS
Are there any cases where the following cases both compile but are not identical? A a; B b; a = b; a.Foo(); and A a; B b; a = b; b.Foo(); The reason I ask is I'm wondering if making the type (and value) of an assignment expression the right hand side rather than the left hand side

Determine if template argument is an array

2009-05-21 Thread Fractal
Hello Any body can explan me how to determine if a template argument is an array? Thanks

Re: Determine if template argument is an array

2009-05-21 Thread Fractal
Fractal Wrote: Hello Any body can explan me how to determine if a template argument is an array? ...And also if is an associative array Thanks

Re: Theory question

2009-05-21 Thread BCS
Reply to Frits, BCS wrote: Are there any cases where the following cases both compile but are not identical? A a; B b; a = b; a.Foo(); and A a; B b; a = b; b.Foo(); struct A { int i; void Foo() { i = 42; } } alias A B; The first case will set a.i to 42, the second will set b.i. I

Re: Determine if template argument is an array

2009-05-21 Thread Christopher Wright
Fractal wrote: Hello Any body can explan me how to determine if a template argument is an array? Thanks Have a look at std.traits or tango.core.Traits. The appropriate way to check is via the templates they define, since it's clearer. Looking at the source will tell you how to replicate

[Issue 2540] super can not be using in alias statement

2009-05-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2540 --- Comment #2 from Koroskin Denis 2kor...@gmail.com 2009-05-21 06:34:36 PDT --- Vote up! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 3015] Lookup of non-member not working

2009-05-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3015 Gide Nwawudu g...@nwawudu.com changed: What|Removed |Added Keywords||rejects-valid

[Issue 3013] Weird message with cryptic mangled name - implicit conversion error

2009-05-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3013 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com

[Issue 3015] Lookup of non-member not working

2009-05-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3015 Georg Wrede ge...@iki.fi changed: What|Removed |Added CC||ge...@iki.fi --- Comment

[Issue 3013] Weird message with cryptic mangled name - implicit conversion error

2009-05-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3013 ZHOU Zhenyu rin...@gmail.com changed: What|Removed |Added CC||rin...@gmail.com ---