Re: "the last change" for ranges

2009-05-20 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

Re: Iterators Must Go video to come online soon

2009-05-20 Thread Andrei Alexandrescu
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 want to see but can't yet. J

Re: Iterators Must Go video to come online soon

2009-05-20 Thread Daniel Keep
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 want to see but can't yet. Just remindin

Iterators Must Go video to come online soon

2009-05-20 Thread Andrei Alexandrescu
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

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:gv2hj8$k1...@digitalmars.com... dsimcha wrote: Consider: struct R { bool empty(); ref int front(); void popFront(); } ref int popNext(ref R fwdRange) { auto result = & fwdRange.front(); fwdRange.popFront;

Re: "the last change" for ranges

2009-05-20 Thread Robert Fraser
Andrei Alexandrescu wrote: struct R { bool empty(); ref int front(); void popFront(); } ref int popNext(ref R fwdRange) { auto result = & fwdRange.front(); fwdRange.popFront; return *result; } void main() { R r; int x = r.popNext; } This should work, I just noti

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Daniel Keep
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 sour

Re: "the last change" for ranges

2009-05-20 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:gv2hj8$k1...@digitalmars.com... > dsimcha wrote: > > Consider: > > struct R > { > bool empty(); > ref int front(); > void popFront(); > } > > ref int popNext(ref R fwdRange) > { > auto result = & fwdRange.front(); > fwdRange.popFront

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Nick Sabalausky
"Bill Baxter" wrote in message news:mailman.151.1242855932.13405.digitalmar...@puremagic.com... > On Wed, May 20, 2009 at 1:09 PM, Andrei Alexandrescu > wrote: >> Yigal Chripun wrote: >>> >>> I think you miss the point here. >>> Generics and code generation are two separate and orthogonal featur

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Nick Sabalausky
"Christopher Wright" wrote in message news:gv29vn$7a...@digitalmars.com... > Nick Sabalausky wrote: >> "Christopher Wright" wrote in message >> news:gv0p4e$uv...@digitalmars.com... >>> Nick Sabalausky wrote: I can see certain potential benefits to the general way C# does generics, bu

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article MLT wrote: One needs something like a lazy semi-infinite range, that only calls a certain function when it reaches an unexplored part. That's a great abstraction, but we can't afford to impose that to ev

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
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 magic up your sleeve that, given a

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > MLT wrote: > > One needs something like a lazy semi-infinite range, that only calls > > a certain function when it reaches an unexplored part. > That's a great abstraction, but we can't afford to impose that to > everybod

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > MLT wrote: > > One needs something like a lazy semi-infinite range, that only calls > > a certain function when it reaches an unexplored part. > That's a great abstraction, but we can't afford to impose that to > everybod

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
MLT wrote: One needs something like a lazy semi-infinite range, that only calls a certain function when it reaches an unexplored part. That's a great abstraction, but we can't afford to impose that to everybody. There must be an abstraction for a one-pass go through an arbitrarily long stream

Re: "the last change" for ranges

2009-05-20 Thread MLT
Andrei Alexandrescu Wrote: > MLT wrote: > > I think that if > >> R last = r; > > then after > >> r.popFront; > > the order of elements in "last" should not change, no matter what > > type of range you are dealing with. (That means that input operations > > would be buffered to the leftmost range t

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Christopher Wright
Nick Sabalausky wrote: "Christopher Wright" wrote in message news:gv0p4e$uv...@digitalmars.com... Nick Sabalausky wrote: I can see certain potential benefits to the general way C# does generics, but until the old (and I do mean old) issue of "There's an IComparable, so why the hell won't MS g

Re: "the last change" for ranges

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 5:11 PM, Jason House wrote: > Bill Baxter Wrote: > >> On Wed, May 20, 2009 at 4:03 PM, 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 >> > struc

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== 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 like a class.

Re: "the last change" for ranges

2009-05-20 Thread Jason House
Andrei Alexandrescu Wrote: > MLT wrote: > > I think that if > >> R last = r; > > then after > >> r.popFront; > > the order of elements in "last" should not change, no matter what > > type of range you are dealing with. (That means that input operations > > would be buffered to the leftmost range t

Re: "the last change" for ranges

2009-05-20 Thread Jason House
Bill Baxter Wrote: > On Wed, May 20, 2009 at 4:03 PM, 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 like a class. > > > > What's

Re: "the last change" for ranges

2009-05-20 Thread Jason House
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 like a class. > > What's wrong with a pointer to a heap-allocated struct? I sometimes need

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
MLT wrote: I think that if R last = r; then after r.popFront; the order of elements in "last" should not change, no matter what type of range you are dealing with. (That means that input operations would be buffered to the leftmost range that still extsts.) If I understood the logic of range

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Lutger
Andrei Alexandrescu wrote: ... > > So we're looking at a number of problems here. One is that we'd need to > change the language in several places to accommodate an ill-conceived > feature. Another is that I can't seem to get some very simple points > across such as the difference between a to

Re: "the last change" for ranges

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 4:03 PM, 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 like a class. > > What's wrong with a pointer to a heap-alloca

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== 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 like a class. What's wrong with a pointer to a heap-allocated struct? I sometimes need what you describe, too, an

Re: "the last change" for ranges

2009-05-20 Thread Steven Schveighoffer
On Wed, 20 May 2009 13:35:14 -0400, Andrei Alexandrescu wrote: Jason House wrote: I feel like there are too many differences between input and forward ranges for such a minor difference. Many range functions are written assuming no side effects on the caller. This can restrict the use of hel

Re: "the last change" for ranges

2009-05-20 Thread MLT
Andrei Alexandrescu Wrote: > In wake of a few discussion I've witnessed, I'm thinking of a last > change for ranges. (In fact there's one more, but that's minor.) > > The problem is that input ranges and forward ranges have the same > syntactic interface, but different semantic interfaces. Cons

Re: "the last change" for ranges

2009-05-20 Thread Jason House
Bill Baxter Wrote: > On Wed, May 20, 2009 at 12:05 PM, dsimcha wrote: > > == Quote from Bill Baxter (wbax...@gmail.com)'s article > >> On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu > >> wrote: > >> > Jason House wrote: > >> >> > >> >> Andrei Alexandrescu Wrote: > >> >> > >> >>> Jason Hou

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 1:09 PM, Andrei Alexandrescu wrote: > Yigal Chripun wrote: >> >> I think you miss the point here. >> Generics and code generation are two separate and orthogonal features that >> where conflated together by C++. > > It's kind of odd, then, that for example the Generative Pr

Re: "the last change" for ranges

2009-05-20 Thread Jason House
dsimcha Wrote: > == Quote from Bill Baxter (wbax...@gmail.com)'s article > > On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu > > wrote: > > > Jason House wrote: > > >> > > >> Andrei Alexandrescu Wrote: > > >> > > >>> Jason House wrote: > > > > I feel like there are too many differ

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread BCS
Reply to Yigal, D templates provide mostly cosmetic changes to this. If you think D's templates are C++'s template with a few "cosmetic changes" than you aren't paying attention. A few cosmetic changes aren't going to allow 1.4MB of c++ header files to be anywhere near duplicated in 2000

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread BCS
Reply to Yigal, BCS wrote: minor point; I said you have to give the compiler all the source files. You might not actually nned to compile them all, but without some external meta data, it still needs to be handled the full because it can't find them on it's own. And at that point you might as

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Jacob Carlborg
dsimcha wrote: == Quote from Ary Borenszweig (a...@esperanto.org.ar)'s article dsimcha escribió: == Quote from Christopher Wright (dhase...@gmail.com)'s article Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:gus0lu$1sm...@digitalmars.com... I've repeatedly failed to fig

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Andrei Alexandrescu
dsimcha wrote: Not sure I agree. C++ templates were probably intended to be something like generics initially and became Turing-complete almost by accident. That is factually correct. It was quite a hubbub on the C++ standardization committee when Erwin Unruh wrote a C++ program that wrote p

Re: "the last change" for ranges

2009-05-20 Thread Kristian Kilpi
On Wed, 20 May 2009 21:02:02 +0300, Andrei Alexandrescu wrote: Robert Jacques wrote: Bicycle shed: Well, since output ranges use 'put', how about 'get' for input ranges? Nice color :o). In fact, "put" is a poor choice because it doesn't reflect advancement. Probably putNext and getNext

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread dsimcha
== Quote from Yigal Chripun (yigal...@gmail.com)'s article > Andrei Alexandrescu wrote: > > Lutger wrote: > >> Andrei Alexandrescu wrote: > >> > >> ... > What the heck do you need generics for when you have real > templates? To me, > generics seem like just a lame excuse for templat

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Andrei Alexandrescu
Yigal Chripun wrote: I think you miss the point here. Generics and code generation are two separate and orthogonal features that where conflated together by C++. It's kind of odd, then, that for example the Generative Programming book (http://www.generative-programming.org) chose to treat the

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Yigal Chripun
Andrei Alexandrescu wrote: Lutger wrote: Andrei Alexandrescu wrote: ... What the heck do you need generics for when you have real templates? To me, generics seem like just a lame excuse for templates. I agree. Then, templates aren't easy to implement and they were understandably already bus

Re: "the last change" for ranges

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 12:05 PM, dsimcha wrote: > == Quote from Bill Baxter (wbax...@gmail.com)'s article >> On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu >> wrote: >> > Jason House wrote: >> >> >> >> Andrei Alexandrescu Wrote: >> >> >> >>> Jason House wrote: >> >> I feel like

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Yigal Chripun
BCS wrote: > minor point; I said you have to give the compiler all the source files. You might not actually nned to compile them all, but without some external meta data, it still needs to be handled the full because it can't find them on it's own. And at that point you might as well compile

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Nick Sabalausky
"Christopher Wright" wrote in message news:gv0p4e$uv...@digitalmars.com... > Nick Sabalausky wrote: >> I can see certain potential benefits to the general way C# does generics, >> but until the old (and I do mean old) issue of "There's an IComparable, >> so why the hell won't MS give us an IAri

Re: "the last change" for ranges

2009-05-20 Thread Robert Jacques
On Wed, 20 May 2009 14:02:02 -0400, Andrei Alexandrescu wrote: Robert Jacques wrote: Bicycle shed: Well, since output ranges use 'put', how about 'get' for input ranges? Nice color :o). In fact, "put" is a poor choice because it doesn't reflect advancement. Probably putNext and getNext

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Bill Baxter (wbax...@gmail.com)'s article > On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu > wrote: > > Jason House wrote: > >> > >> Andrei Alexandrescu Wrote: > >> > >>> Jason House wrote: > > I feel like there are too many differences between input and forward > >>

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Bill Baxter (wbax...@gmail.com)'s article > On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu > wrote: > > Jason House wrote: > >> > >> Andrei Alexandrescu Wrote: > >> > >>> Jason House wrote: > > I feel like there are too many differences between input and forward > >>

Re: "the last change" for ranges

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 11:44 AM, Andrei Alexandrescu wrote: > Jason House wrote: >> >> Andrei Alexandrescu Wrote: >> >>> Jason House wrote: I feel like there are too many differences between input and forward ranges for such a minor difference. Many range functions are written

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Jason House (jason.james.ho...@gmail.com)'s article > Andrei Alexandrescu Wrote: > > Jason House wrote: > > > I feel like there are too many differences between input and forward > > > ranges for such a minor difference. Many range functions are written > > > assuming no side effects

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Jason House wrote: Andrei Alexandrescu Wrote: Jason House wrote: I feel like there are too many differences between input and forward ranges for such a minor difference. Many range functions are written assuming no side effects on the caller. This can restrict the use of helper functions. It m

Re: "the last change" for ranges

2009-05-20 Thread Jason House
Andrei Alexandrescu Wrote: > Jason House wrote: > > I feel like there are too many differences between input and forward > > ranges for such a minor difference. Many range functions are written > > assuming no side effects on the caller. This can restrict the use of > > helper functions. It may be

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Robert Fraser wrote: dsimcha wrote: Also, while we're fine tuning input ranges vs. forward ranges, I think the concept of iterables as a catch-all for ranges, opApply, builtins, etc. needs to be introduced and fine tuned, too. We've shown on this NG previously that, while ranges are usually p

Re: "the last change" for ranges

2009-05-20 Thread Robert Fraser
dsimcha wrote: Also, while we're fine tuning input ranges vs. forward ranges, I think the concept of iterables as a catch-all for ranges, opApply, builtins, etc. needs to be introduced and fine tuned, too. We've shown on this NG previously that, while ranges are usually preferable for the flexi

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > In wake of a few discussion I've witnessed, I'm thinking of a last > change for ranges. (In fact there's one more, but that's minor.) > The problem is that input ranges and forward ranges have the same > syntactic interfa

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Robert Jacques wrote: Bicycle shed: Well, since output ranges use 'put', how about 'get' for input ranges? Nice color :o). In fact, "put" is a poor choice because it doesn't reflect advancement. Probably putNext and getNext are better. Andrei

Re: "the last change" for ranges

2009-05-20 Thread Robert Jacques
On Wed, 20 May 2009 13:04:42 -0400, Andrei Alexandrescu wrote: Bill Baxter wrote: On Wed, May 20, 2009 at 9:19 AM, Andrei Alexandrescu wrote: I'm thinking a better design is to require any range that's forward or better to define a function save(). Ranges that don't implement it are input

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Jason House wrote: I feel like there are too many differences between input and forward ranges for such a minor difference. Many range functions are written assuming no side effects on the caller. This can restrict the use of helper functions. It may be best to make their usage different... So

Re: "the last change" for ranges

2009-05-20 Thread Jason House
I feel like there are too many differences between input and forward ranges for such a minor difference. Many range functions are written assuming no side effects on the caller. This can restrict the use of helper functions. It may be best to make their usage different... Andrei Alexandrescu W

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
Bill Baxter wrote: On Wed, May 20, 2009 at 9:19 AM, Andrei Alexandrescu wrote: I'm thinking a better design is to require any range that's forward or better to define a function save(). Ranges that don't implement it are input ranges; those that do, will guarantee a brand new range is returned

Re: "the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Denis Koroskin (2kor...@gmail.com)'s article Why not r.dup? .dup is supposed to imply copying of the range's contents, not copying of the range's iteration state. Yes, for arrays save() is: T[] save(T)(T[] r) { return r; } Andrei

Re: "the last change" for ranges

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 9:19 AM, Andrei Alexandrescu wrote: > I'm thinking a better design is to require any range that's forward or > better to define a function save(). Ranges that don't implement it are input > ranges; those that do, will guarantee a brand new range is returned from > save().

Re: "the last change" for ranges

2009-05-20 Thread BLS
Andrei Alexandrescu wrote: In wake of a few discussion I've witnessed, I'm thinking of a last change for ranges. (In fact there's one more, but that's minor.) The problem is that input ranges and forward ranges have the same syntactic interface, but different semantic interfaces. Consider the

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Frits van Bommel
Kagamin wrote: Frits van Bommel Wrote: That's the difference. You can't fold templates because they're binary incompatible as opposite to generics. They're not always binary-incompatible. For instance, if a template only works with pointers or references (this includes object references) to p

Re: "the last change" for ranges

2009-05-20 Thread dsimcha
== Quote from Denis Koroskin (2kor...@gmail.com)'s article > Why not r.dup? .dup is supposed to imply copying of the range's contents, not copying of the range's iteration state.

Re: "the last change" for ranges

2009-05-20 Thread Denis Koroskin
On Wed, 20 May 2009 20:23:27 +0400, Denis Koroskin <2kor...@gmail.com> wrote: > On Wed, 20 May 2009 20:19:30 +0400, Andrei Alexandrescu > wrote: > >> In wake of a few discussion I've witnessed, I'm thinking of a last >> change for ranges. (In fact there's one more, but that's minor.) >> >> The

Re: "the last change" for ranges

2009-05-20 Thread Denis Koroskin
On Wed, 20 May 2009 20:19:30 +0400, Andrei Alexandrescu wrote: > In wake of a few discussion I've witnessed, I'm thinking of a last > change for ranges. (In fact there's one more, but that's minor.) > > The problem is that input ranges and forward ranges have the same > syntactic interface,

"the last change" for ranges

2009-05-20 Thread Andrei Alexandrescu
In wake of a few discussion I've witnessed, I'm thinking of a last change for ranges. (In fact there's one more, but that's minor.) The problem is that input ranges and forward ranges have the same syntactic interface, but different semantic interfaces. Consider the problem of finding the firs

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Andrei Alexandrescu
KennyTM~ wrote: Andrei Alexandrescu wrote: Denis Koroskin wrote: On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a person (not you, at least you foresee so

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Kagamin
Frits van Bommel Wrote: > > That's the difference. You can't fold templates because they're binary > > incompatible as opposite to generics. > > They're not always binary-incompatible. For instance, if a template only > works > with pointers or references (this includes object references) to p

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Andrei Alexandrescu
Jason House wrote: bearophile Wrote: Andrei Alexandrescu: I don't plan to discuss minor features on this group anymore. That's a real pity. I had a lot of respect for you and your perpetual inclusion of the D community (both announcing features and getting design feedback). Very early on in

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Andrei Alexandrescu
Bill Baxter wrote: On Wed, May 20, 2009 at 7:28 AM, Andrei Alexandrescu wrote: Denis Koroskin wrote: On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a perso

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread KennyTM~
Andrei Alexandrescu wrote: Denis Koroskin wrote: On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a person (not you, at least you foresee some potential prob

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Bill Baxter
On Wed, May 20, 2009 at 7:28 AM, Andrei Alexandrescu wrote: > Denis Koroskin wrote: >> >> On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu >> wrote: >> >>> It's an awful idea. It's a non-idea. If "idea" had an antonym, that >>>  would be it. >>> >>> I can't fathom what's on the mind of a p

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread bearophile
Denis Koroskin: > It also gracefully solves an issue with uniform distribution > uniform(0..int.max) - exclusive > uniform(0...int.max) - inclusive (can't be replaced with 0..int.max+1) To avoid the possible confusion caused by ... Chapel uses ..# uniform(0 .. int.max) - exclusive uniform(0 ..#

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Andrei Alexandrescu
Ary Borenszweig wrote: This is easily solved by making the lexer not allow the "" token, or "." token, etc. (maximum 3 dots.) This way you are forced to insert a space there to make your intention clear, and you can never have bugs like that. I agree that things could be fixed. This

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Ary Borenszweig
Andrei Alexandrescu wrote: Denis Koroskin wrote: On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a person (not you, at least you foresee some potential prob

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Andrei Alexandrescu
Denis Koroskin wrote: On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: It's an awful idea. It's a non-idea. If "idea" had an antonym, that would be it. I can't fathom what's on the mind of a person (not you, at least you foresee some potential problems) who, even after patien

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Andrei Alexandrescu
Lutger wrote: Andrei Alexandrescu wrote: ... What the heck do you need generics for when you have real templates? To me, generics seem like just a lame excuse for templates. I agree. Then, templates aren't easy to implement and they were understandably already busy implementing the using stat

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Jason House
bearophile Wrote: Andrei Alexandrescu: > I don't plan to discuss minor features on this group anymore. That's a real pity. I had a lot of respect for you and your perpetual inclusion of the D community (both announcing features and getting design feedback). Very early on in this thread, it be

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread dsimcha
== Quote from Ary Borenszweig (a...@esperanto.org.ar)'s article > dsimcha escribió: > > == Quote from Christopher Wright (dhase...@gmail.com)'s article > >> Nick Sabalausky wrote: > >>> "Andrei Alexandrescu" wrote in message > >>> news:gus0lu$1sm...@digitalmars.com... > >>> > I've repeatedly

Re: Why is !() need with default template arguments

2009-05-20 Thread Jeremie Pelletier
Tim Matthews Wrote: > On Wed, 20 May 2009 15:01:44 +1200, Jeremie Pelletier > wrote: > > > > I think it is so the parser knows how to make the difference between the > > template symbol and an instance symbol. > > > > > Can you explain a bit more on this? function templates dont require t

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread KennyTM~
bearophile wrote: Christopher Wright: The more common suggestion is: alias bar = foo; I can add this too: typedef Bar = Foo; This changes in typedef and alias can solve two of the small problems I have with D. Let's see if Walter accepts such ideas. (In the last days two more ideas have flo

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Denis Koroskin
On Wed, 20 May 2009 00:43:56 +0400, Andrei Alexandrescu wrote: > It's an awful idea. It's a non-idea. If "idea" had an antonym, that > would be it. > > I can't fathom what's on the mind of a person (not you, at least you > foresee some potential problems) who, even after patiently explained th

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread Alexander Pánek
Andrei Alexandrescu wrote: Robert Fraser wrote: Frank Benoit wrote: Alexander Pánek schrieb: Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Thank you for bringing a "real" example that gives something to work on. Awful!< Well, one of your cases was wrong. Using the +

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Frits van Bommel
bearophile wrote: Frits van Bommel: To do the latter transformation, the pass would need to be reimplemented to run when the code is closer to machine code. Can't this feature be asked to the LLVM developers? Sure, feel free to file a feature request: http://llvm.org/bugs/enter_bug.cgi?prod

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Christopher Wright
dsimcha wrote: == Quote from Christopher Wright (dhase...@gmail.com)'s article Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:gus0lu$1sm...@digitalmars.com... I've repeatedly failed to figure out the coolness of C#, and would appreciate a few pointers. Or references. Or d

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread bearophile
Frits van Bommel: > To do the latter transformation, the pass would need to be reimplemented to > run > when the code is closer to machine code. Can't this feature be asked to the LLVM developers? Bye, bearophile

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Christopher Wright
Nick Sabalausky wrote: I can see certain potential benefits to the general way C# does generics, but until the old (and I do mean old) issue of "There's an IComparable, so why the hell won't MS give us an IArithmetic so we can actually use arithmetic operators on generic code?" gets fixed (and

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread bearophile
Ary Borenszweig: > That's why generics doesn't suck: if there's something wrong in them, > the compiler tells you in compile-time. In D, you get the errors only > when instantiating that template. It's just like in dynamic languages, you need to unittest them a lot :-) So having a "static throws

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Ary Borenszweig
dsimcha escribió: == Quote from Christopher Wright (dhase...@gmail.com)'s article Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:gus0lu$1sm...@digitalmars.com... I've repeatedly failed to figure out the coolness of C#, and would appreciate a few pointers. Or references. O

Re: Why is !() need with default template arguments

2009-05-20 Thread Tim Matthews
On Wed, 20 May 2009 15:01:44 +1200, Jeremie Pelletier wrote: I think it is so the parser knows how to make the difference between the template symbol and an instance symbol. Can you explain a bit more on this? function templates dont require this by the way and I didn't think a templ

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Frits van Bommel
Denis Koroskin wrote: On Wed, 20 May 2009 13:09:37 +0400, Kagamin wrote: BCS Wrote: smaller object code? OTOH a good implementation will noice when I can fold together several template expansions That's the difference. You can't fold templates because they're binary incompatible as oppos

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Nick Sabalausky
"Lutger" wrote in message news:gv090o$22...@digitalmars.com... > Andrei Alexandrescu wrote: > > ... >>> What the heck do you need generics for when you have real templates? To >>> me, >>> generics seem like just a lame excuse for templates. >> >> I agree. Then, templates aren't easy to implemen

Re: Some memory safety

2009-05-20 Thread bearophile
Walter Bright: Sorry for raising this thread. While C# has purposes somewhat different from D, I think C# designers are right in their emphasys on safety. Modern programmers appreciate some safeties, and modern languages give them. The ideas I am talking about are already implemented in C#. D c

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Denis Koroskin
On Wed, 20 May 2009 13:09:37 +0400, Kagamin wrote: > BCS Wrote: > >> smaller object code? OTOH a good implementation will noice when I can >> fold >> together several template expansions > > That's the difference. You can't fold templates because they're binary > incompatible as opposite to g

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Frits van Bommel
Kagamin wrote: BCS Wrote: smaller object code? OTOH a good implementation will noice when I can fold together several template expansions That's the difference. You can't fold templates because they're binary incompatible as opposite to generics. They're not always binary-incompatible. For

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Kagamin
BCS Wrote: > smaller object code? OTOH a good implementation will noice when I can fold > together several template expansions That's the difference. You can't fold templates because they're binary incompatible as opposite to generics.

Re: "with" still sucks + removing features + adding features

2009-05-20 Thread bearophile
Christopher Wright: > The more common suggestion is: > alias bar = foo; I can add this too: typedef Bar = Foo; This changes in typedef and alias can solve two of the small problems I have with D. Let's see if Walter accepts such ideas. (In the last days two more ideas have floated in this newsg

Re: "with" should be deprecated with extreme prejudice

2009-05-20 Thread Don
Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:guscm2$2jf...@digitalmars.com... "Don" wrote in message news:gurkuo$17n...@digitalmars.com... Nick Sabalausky wrote: "Don" wrote in message news:gur1ec$18...@digitalmars.com... If warnings exist, libraries must not do anything t

Re: switch-case (bug, not a proposal)

2009-05-20 Thread Lionello Lunesu
heh: http://d.puremagic.com/issues/show_bug.cgi?id=596

switch-case (bug, not a proposal)

2009-05-20 Thread Lionello Lunesu
Why can we do string s; switch(s) { case "blah": break; default: } but not byte[] a; switch(a) { case [cast(byte)1,2,3]: break; default: } ?

Re: OT: on IDEs and code writing on steroids

2009-05-20 Thread Tim Matthews
On Wed, 20 May 2009 17:31:14 +1200, Jarrett Billingsley wrote: Just, uh, wow. Please dude, read up on this stuff first. This thread turned into a java vs .net argument. I'm sorry but I don't know the details of the JVM's just in time compiler. The virtual machine in the name plus the

  1   2   >