Re: D's auto keyword

2010-01-26 Thread Justin Johansson
downs wrote: Justin Johansson wrote: Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. If you're on gcc or a compiler that allows the typeof extension: #define DECL(A, B) typeof(B) A = B :) Thanks. I unc

Re: D's auto keyword

2010-01-18 Thread Nick Sabalausky
"downs" wrote in message news:hj1m0r$1k3...@digitalmars.com... > Justin Johansson wrote: >> Happy New Year 2010 Everybody. >> >> Having resumed C++ nationality for the last few months, I kind of miss >> D's auto keyword. >> > > If you&#x

Re: D's auto keyword

2010-01-18 Thread downs
Justin Johansson wrote: > Happy New Year 2010 Everybody. > > Having resumed C++ nationality for the last few months, I kind of miss D's > auto keyword. > If you're on gcc or a compiler that allows the typeof extension: #define DECL(A, B) typeof(B) A = B :)

Re: D's auto keyword

2010-01-13 Thread Nick Sabalausky
"Lutger" wrote in message news:hilifj$7u...@digitalmars.com... > On 01/13/2010 10:22 PM, Nick Sabalausky wrote: >> "Lutger" wrote in message >> news:hil6gr$2hm...@digitalmars.com... >>> >>> All ML derived languages do this much more extensively and they even >>> don't >>> need an auto keyword f

Re: D's auto keyword

2010-01-13 Thread Lutger
On 01/13/2010 08:46 PM, retard wrote: Wed, 13 Jan 2010 20:22:02 +0100, Lutger wrote: On 01/13/2010 05:49 PM, Justin Johansson wrote: Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. I am wondering, though, from

Re: D's auto keyword

2010-01-13 Thread Lutger
On 01/13/2010 10:22 PM, Nick Sabalausky wrote: "Lutger" wrote in message news:hil6gr$2hm...@digitalmars.com... All ML derived languages do this much more extensively and they even don't need an auto keyword for it. C# has var and VB.NET has Dim which mean the same thing. The nice thing with th

Re: D's auto keyword

2010-01-13 Thread Walter Bright
dsimcha wrote: One underappreciated thing auto gives is DRY for types. It makes it easier to change the type of some object in the place where it's initially decided, because those changes will automagically be propagated to everything that uses that object, as long as the new type supports the

Re: D's auto keyword

2010-01-13 Thread Nick Sabalausky
"Lutger" wrote in message news:hil6gr$2hm...@digitalmars.com... > > All ML derived languages do this much more extensively and they even don't > need an auto keyword for it. C# has var and VB.NET has Dim which mean the > same thing. The nice thing with those languages is that if you code in >

Re: D's auto keyword

2010-01-13 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:hiktil$20a...@digitalmars.com... > Happy New Year 2010 Everybody. > > Having resumed C++ nationality for the last few months, I kind of miss D's > auto keyword. > > I am wondering, though, from an OO/polymorphism

Re: D's auto keyword

2010-01-13 Thread Pelle Månsson
On 01/13/2010 06:19 PM, dsimcha wrote: == Quote from Justin Johansson (n...@spam.com)'s article Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. I am wondering, though, from an OO/polymorphism perspective, a

Re: D's auto keyword

2010-01-13 Thread retard
Wed, 13 Jan 2010 20:22:02 +0100, Lutger wrote: > On 01/13/2010 05:49 PM, Justin Johansson wrote: >> Happy New Year 2010 Everybody. >> >> Having resumed C++ nationality for the last few months, I kind of miss >> D's auto keyword. >> >> I am wondering,

Re: D's auto keyword

2010-01-13 Thread Lutger
On 01/13/2010 05:49 PM, Justin Johansson wrote: Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. I am wondering, though, from an OO/polymorphism perspective, and UML and sound software engineering perspective as

Re: D's auto keyword

2010-01-13 Thread Ali Çehreli
Justin Johansson wrote: > Do any other languages have an "auto" var idiom? C++0x has: http://www2.research.att.com/~bs/C++0xFAQ.html#auto Ali

Re: D's auto keyword

2010-01-13 Thread Simen kjaeraas
On Wed, 13 Jan 2010 17:52:41 +0100, Justin Johansson wrote: And sorry for saying btw twice in the same post. And sorry for posting this apology. JJ You are not forgiven. Post moar apologies. :p -- Simen

Re: D's auto keyword

2010-01-13 Thread Leandro Lucarella
bearophile, el 13 de enero a las 12:01 me escribiste: > > btw. Do any other languages have an "auto" var idiom? I don't remember > > Scala having such (and it's really modern), though perhaps my memory lapses. > > In C# it's named "var" that's one char shorter :-) Other languages have > somethi

Re: D's auto keyword

2010-01-13 Thread Andrei Alexandrescu
Justin Johansson wrote: Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. I am wondering, though, from an OO/polymorphism perspective, and UML and sound software engineering perspective as well, what does D's au

Re: D's auto keyword

2010-01-13 Thread dsimcha
== Quote from Justin Johansson (n...@spam.com)'s article > Happy New Year 2010 Everybody. > Having resumed C++ nationality for the last few months, I kind of miss D's > auto keyword. > I am wondering, though, from an OO/polymorphism perspective, and UML and sound software e

Re: D's auto keyword

2010-01-13 Thread bearophile
Justin Johansson: > I am wondering, though, from an OO/polymorphism perspective, and UML and > sound software engineering perspective as well, what does D's auto keyword > buy you except (perhaps) laziness (in keystrokes)? In functional/generic code you sometimes end having very

Re: D's auto keyword

2010-01-13 Thread Justin Johansson
And sorry for saying btw twice in the same post. And sorry for posting this apology. JJ

D's auto keyword

2010-01-13 Thread Justin Johansson
Happy New Year 2010 Everybody. Having resumed C++ nationality for the last few months, I kind of miss D's auto keyword. I am wondering, though, from an OO/polymorphism perspective, and UML and sound software engineering perspective as well, what does D's auto keyword buy you excep