Re: removal of cruft from D

2009-11-20 Thread Don
Leandro Lucarella wrote: Bill Baxter, el 20 de noviembre a las 15:43 me escribiste: octal(755)? What's the base-10 identity of that? decimal(493) or decimal(755)? base-16 etc. Fine. Make it octal!"755" if you prefer. The point is just that you can write a function that will convert a number

Re: Chaining exceptions

2009-11-20 Thread Chris Nicholson-Sauls
BCS wrote: Hello Jesse, On Wed, 18 Nov 2009 18:27:47 -0800, Andrei Alexandrescu wrote: Thanks! Question - is there a way to fetch the current Throwable from within a finally clause? Andrei I'm pretty sure you can't since finally isn't passed an exception. I also don't see anything in my qu

Re: Switch-case made less buggy, now with PATCH!

2009-11-20 Thread Leandro Lucarella
Tim Matthews, el 21 de noviembre a las 18:10 me escribiste: > Chad J wrote: > >http://d.puremagic.com/issues/show_bug.cgi?id=3536 > > > >So Walter, with this you can keep your beloved fall-through. > >Now can the rest of us be spared the nasty fall-through bugs, please > >please please?? > > > >Als

Re: removal of cruft from D

2009-11-20 Thread Lionello Lunesu
On 21-11-2009 9:50, Bill Baxter wrote: That's going to cause a little confusion. Mind if we call you Bruce? http://www.youtube.com/watch?v=_f_p0CgPeyA Thanks for that :) hadn't seen it earlier. L.

Re: Switch-case made less buggy, now with PATCH!

2009-11-20 Thread Tim Matthews
Chad J wrote: http://d.puremagic.com/issues/show_bug.cgi?id=3536 So Walter, with this you can keep your beloved fall-through. Now can the rest of us be spared the nasty fall-through bugs, please please please?? Also, about assert(0)... I'd be happy to change what I did if Walter and associates

Re: Class/Interface Modeling of Ranges

2009-11-20 Thread Andrei Alexandrescu
dsimcha wrote: I'm thinking about what the best way might be to model ranges in an OO/inheritance style for collections/containers, and needless to say it's pretty complicated and virtually impossible to model well. (As an aside, this is why I like duck typing, be it compile time or traditional,

Re: RPC and Dynamic function call

2009-11-20 Thread grauzone
Denis Koroskin wrote: type-safe manner anymore (well, one could create a set of trampolines for each of set of types involved in a call, but I don't think it's reasonable or even possible; I'll look into it, too, though). That's why Yes, it is possible. You'll have to pass the method as alias

Re: Conspiracy Theory #1

2009-11-20 Thread Rainer Deyke
dsimcha wrote: > == Quote from Rainer Deyke (rain...@eldwood.com)'s article >> Yes, but a moving GC needs to be 100% precise, not 99.9%. > > Not if you allow pinning, which we'd need anyhow for untyped, conservatively > scanned memory blocks. If you allow pinning then you no longer get the fu

RPC and Dynamic function call

2009-11-20 Thread Denis Koroskin
I am working on a prototype of PRC library and it involves a wide range of techniques that I also implement. I'd like to share my code, implementation details and issues I come across. I will split my report into a few posts. This one is mostly an introduction. RPC is a concept that allows

Re: removal of cruft from D

2009-11-20 Thread Leandro Lucarella
Bill Baxter, el 20 de noviembre a las 17:50 me escribiste: > On Fri, Nov 20, 2009 at 5:31 PM, Leandro Lucarella wrote: > > Bill Baxter, el 20 de noviembre a las 17:18 me escribiste: > >> On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella > >> wrote: > >> > Bill Baxter, el 20 de noviembre a las 1

Class/Interface Modeling of Ranges

2009-11-20 Thread dsimcha
I'm thinking about what the best way might be to model ranges in an OO/inheritance style for collections/containers, and needless to say it's pretty complicated and virtually impossible to model well. (As an aside, this is why I like duck typing, be it compile time or traditional, so much.) At th

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 6:01 PM, Justin Johansson wrote: > Bill Baxter Wrote: > >> On Fri, Nov 20, 2009 at 5:31 PM, Leandro Lucarella wrote: >> > Bill Baxter, el 20 de noviembre a las 17:18 me escribiste: >> >> On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella >> >> wrote: >> >> > Bill Baxter,

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Bill Baxter Wrote: > On Fri, Nov 20, 2009 at 5:31 PM, Leandro Lucarella wrote: > > Bill Baxter, el 20 de noviembre a las 17:18 me escribiste: > >> On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella > >> wrote: > >> > Bill Baxter, el 20 de noviembre a las 14:10 me escribiste: > >> >> On Fri, Nov

Re: Conspiracy Theory #1

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 5:50 PM, Justin Johansson wrote: > Walter Bright Wrote: > >> Andrei Alexandrescu wrote: >> > Walter Bright wrote: >> >> BCS wrote: >> >>> Even if you have network parallelism, CPU loads still costs money. >> >>> Many server farms are not space limited but power limited. The

Switch-case made less buggy, now with PATCH!

2009-11-20 Thread Chad J
http://d.puremagic.com/issues/show_bug.cgi?id=3536 So Walter, with this you can keep your beloved fall-through. Now can the rest of us be spared the nasty fall-through bugs, please please please?? Also, about assert(0)... I'd be happy to change what I did if Walter and associates feel that adding

Re: Conspiracy Theory #1

2009-11-20 Thread Justin Johansson
Walter Bright Wrote: > Andrei Alexandrescu wrote: > > Walter Bright wrote: > >> BCS wrote: > >>> Even if you have network parallelism, CPU loads still costs money. > >>> Many server farms are not space limited but power limited. They can't > >>> get enough power out of the power company to run m

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 5:31 PM, Leandro Lucarella wrote: > Bill Baxter, el 20 de noviembre a las 17:18 me escribiste: >> On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella wrote: >> > Bill Baxter, el 20 de noviembre a las 14:10 me escribiste: >> >> On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Bill Baxter Wrote: > On Fri, Nov 20, 2009 at 5:22 PM, Justin Johansson wrote: > > Andrei Alexandrescu Wrote: > > > >> Ellery Newcomer wrote: > >> > Nick Sabalausky wrote: > >> >> 2. Octal literals! I think it'd be great to have a new octal syntax, or > >> >> even > >> >> better, a general any-po

Re: removal of cruft from D

2009-11-20 Thread Leandro Lucarella
Bill Baxter, el 20 de noviembre a las 17:18 me escribiste: > On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella wrote: > > Bill Baxter, el 20 de noviembre a las 14:10 me escribiste: > >> On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe > >> wrote: > >> > On Fri, Nov 20, 2009 at 04:49:52PM -0500, Ni

Re: removal of cruft from D

2009-11-20 Thread Leandro Lucarella
Bill Baxter, el 20 de noviembre a las 15:43 me escribiste: > > octal(755)? > > > > What's the base-10 identity of that? > > > > decimal(493) or decimal(755)? > > > > base-16 etc. > > Fine. Make it octal!"755" if you prefer. > The point is just that you can write a function that will convert a > n

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 5:22 PM, Justin Johansson wrote: > Andrei Alexandrescu Wrote: > >> Ellery Newcomer wrote: >> > Nick Sabalausky wrote: >> >> 2. Octal literals! I think it'd be great to have a new octal syntax, or >> >> even >> >> better, a general any-positive-inter-base syntax. But until

Re: removal of cruft from D

2009-11-20 Thread Leandro Lucarella
Justin Johansson, el 21 de noviembre a las 09:42 me escribiste: > >It would definitely be a problem if octal literals disappeared > >from the language, even if only for a short while. They are pretty > >much the only sensible way to specify POSIX file permissions. > > > > import core.sys.posix.sys

Re: Conspiracy Theory #1

2009-11-20 Thread Andrei Alexandrescu
Walter Bright wrote: Andrei Alexandrescu wrote: Walter Bright wrote: BCS wrote: Even if you have network parallelism, CPU loads still costs money. Many server farms are not space limited but power limited. They can't get enough power out of the power company to run more servers. (And take a

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Andrei Alexandrescu Wrote: > Ellery Newcomer wrote: > > Nick Sabalausky wrote: > >> 2. Octal literals! I think it'd be great to have a new octal syntax, or > >> even > >> better, a general any-positive-inter-base syntax. But until that finally > >> happens, I don't want "010 == 8" preserved. An

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 5:09 PM, Leandro Lucarella wrote: > Bill Baxter, el 20 de noviembre a las 14:10 me escribiste: >> On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe >> wrote: >> > On Fri, Nov 20, 2009 at 04:49:52PM -0500, Nick Sabalausky wrote: >> >> 2. Octal literals! I think it'd be great t

Re: removal of cruft from D

2009-11-20 Thread Leandro Lucarella
Bill Baxter, el 20 de noviembre a las 14:10 me escribiste: > On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe > wrote: > > On Fri, Nov 20, 2009 at 04:49:52PM -0500, Nick Sabalausky wrote: > >> 2. Octal literals! I think it'd be great to have a new octal syntax, or > >> even > >> better, a general a

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 4:45 PM, Andrei Alexandrescu wrote: > Ellery Newcomer wrote: >> >> Nick Sabalausky wrote: >>> >>> "Yigal Chripun" wrote in message >>> news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D,

Re: Conspiracy Theory #1

2009-11-20 Thread Leandro Lucarella
Travis Boucher, el 20 de noviembre a las 16:45 me escribiste: > Leandro Lucarella wrote: > >dsimcha, el 20 de noviembre a las 16:24 me escribiste: > Right, but they can still be the target of false pointers. In this case, > false > pointers keep each instance of foo[] alive, leading t

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Bill Baxter wrote: On Fri, Nov 20, 2009 at 4:05 PM, Walter Bright wrote: Bill Baxter wrote: Right, but if you do define it (in order to do something extra upon initialization -- validate inputs or what have you) then it no longer works at compile time. Right, but the static initialization the

Re: Conspiracy Theory #1

2009-11-20 Thread Walter Bright
Andrei Alexandrescu wrote: Walter Bright wrote: BCS wrote: Even if you have network parallelism, CPU loads still costs money. Many server farms are not space limited but power limited. They can't get enough power out of the power company to run more servers. (And take a guess at what there po

Re: Can we drop static struct initializers?

2009-11-20 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:34 PM, Walter Bright wrote: Bill Baxter wrote: Here's one thing I just found: struct constructors don't work at compile-time: struct Struct { this(int _n, float _x) { n = _n; x = _x; } int n; float x; } enum A = Struct(1,2); //

Re: removal of cruft from D

2009-11-20 Thread Andrei Alexandrescu
Ellery Newcomer wrote: Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important

Re: Conspiracy Theory #1

2009-11-20 Thread Andrei Alexandrescu
Walter Bright wrote: BCS wrote: Even if you have network parallelism, CPU loads still costs money. Many server farms are not space limited but power limited. They can't get enough power out of the power company to run more servers. (And take a guess at what there power bills cost!) I've ofte

Re: opApply Vs. Ranges: What should take precedence?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 4:22 PM, Justin Johansson wrote: > Bill Baxter wrote: >> >> On Fri, Nov 20, 2009 at 3:36 PM, Walter Bright >> wrote: >>> >>> And here I was thinking perhaps opApply should just be dumped in favor of >>> ranges. >>> >> >> I think the opApply should take precedence. >> The o

Re: opApply Vs. Ranges: What should take precedence?

2009-11-20 Thread Justin Johansson
Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:36 PM, Walter Bright wrote: And here I was thinking perhaps opApply should just be dumped in favor of ranges. I think the opApply should take precedence. The only reason to define opApply is because foreach uses it. Ranges on the other hand are us

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 4:05 PM, Walter Bright wrote: > Bill Baxter wrote: >> >> Right, but if you do define it (in order to do something extra upon >> initialization -- validate inputs or what have you) then it no longer >> works at compile time. > > Right, but the static initialization then shou

Re: Deprecate static opCall for structs?

2009-11-20 Thread grauzone
Bill Baxter wrote: We now have struct constructors that do basically the same thing as a static opCall. Non-static opCall should still be ok, for implementing functors, but I think having static opCall is just too confusing given struct literals / struct constructors. Right now struct S; S(1,2)

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Bill Baxter wrote: Right, but if you do define it (in order to do something extra upon initialization -- validate inputs or what have you) then it no longer works at compile time. Right, but the static initialization then shouldn't work, either.

Re: removal of cruft from D

2009-11-20 Thread Travis Boucher
Yigal Chripun wrote: Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important and all successful languages do such cleanup for major releases (Python and Ruby come to mind). I'

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 3:53 PM, Justin Johansson wrote: > Bill Baxter wrote: >> >> On Fri, Nov 20, 2009 at 3:37 PM, Justin Johansson wrote: >>> >>> Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:10 PM, Lars T. Kyllingstad wrote: > > Nick Sabalausky wrote: >> >> "Yig

Re: opApply Vs. Ranges: What should take precedence?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 3:36 PM, Walter Bright wrote: > > And here I was thinking perhaps opApply should just be dumped in favor of > ranges. > I think the opApply should take precedence. The only reason to define opApply is because foreach uses it. Ranges on the other hand are useful in other si

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:37 PM, Justin Johansson wrote: Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:10 PM, Lars T. Kyllingstad wrote: Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a

Deprecate static opCall for structs?

2009-11-20 Thread Bill Baxter
We now have struct constructors that do basically the same thing as a static opCall. Non-static opCall should still be ok, for implementing functors, but I think having static opCall is just too confusing given struct literals / struct constructors. Right now struct S; S(1,2) ; could be 1) a stati

Re: Conspiracy Theory #1

2009-11-20 Thread Travis Boucher
Leandro Lucarella wrote: dsimcha, el 20 de noviembre a las 16:24 me escribiste: Right, but they can still be the target of false pointers. In this case, false pointers keep each instance of foo[] alive, leading to severe memory leaks. But the issue is more of a GC implementation issue then a l

Re: Making alloca more safe

2009-11-20 Thread Walter Bright
BCS wrote: With the pump shut off, you have a few seconds of fuel left in the carb. With no oil pressure, your engine is going to seize anyway. In a few minutes yes (and it will still run for some time after it's damaged beyond repair), more than long enough off get off the road. I'd put a bi

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 3:37 PM, Justin Johansson wrote: > Bill Baxter wrote: >> >> On Fri, Nov 20, 2009 at 3:10 PM, Lars T. Kyllingstad >> wrote: >>> >>> Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... > > Based on recent disc

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Bill Baxter wrote: On Fri, Nov 20, 2009 at 3:10 PM, Lars T. Kyllingstad wrote: Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct

Re: opApply Vs. Ranges: What should take precedence?

2009-11-20 Thread Walter Bright
And here I was thinking perhaps opApply should just be dumped in favor of ranges.

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 3:34 PM, Walter Bright wrote: > Bill Baxter wrote: >> >> Here's one thing I just found: >> struct constructors don't work at compile-time: >> >> struct Struct >> { >>    this(int _n, float _x) { >>        n = _n; x = _x; >>    } >>    int n; >>    float x; >> } >> >> enum A

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Bill Baxter wrote: Here's one thing I just found: struct constructors don't work at compile-time: struct Struct { this(int _n, float _x) { n = _n; x = _x; } int n; float x; } enum A = Struct(1,2); // Error: cannot evaluate ((Struct __ctmp1; // ) , __ctmp1).this(1,2F) at

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Yigal Chripun wrote: what about foreach_reverse ? No love for foreach_reverse?

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Justin Johansson wrote: Lars T. Kyllingstad wrote: It would definitely be a problem if octal literals disappeared from the language, even if only for a short while. They are pretty much the only sensible way to specify POSIX file permissions. import core.sys.posix.sys.stat; ... chmod("p

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 3:10 PM, Lars T. Kyllingstad wrote: > Nick Sabalausky wrote: >> >> "Yigal Chripun" wrote in message >> news:he6sqe$1dq...@digitalmars.com... >>> >>> Based on recent discussions on the NG a few features were >>> deprecated/removed from D, such as typedef and C style struct

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Lars T. Kyllingstad wrote: Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is impor

Re: removal of cruft from D

2009-11-20 Thread Lars T. Kyllingstad
Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important and all successful lang

Re: Short list with things to finish for D2

2009-11-20 Thread Justin Johansson
Stewart Gordon wrote: aarti_pl wrote: I agree. opDollar is not particularly fitting to D language operator concept. opLength/opSize would fit better. Why I believe opLength and opSize are also wrong names: http://www.digitalmars.com/d/archives/digitalmars/D/announce/Re_opDollar_12939.html

Re: removal of cruft from D

2009-11-20 Thread Ellery Newcomer
Nick Sabalausky wrote: > "Yigal Chripun" wrote in message > news:he6sqe$1dq...@digitalmars.com... >> Based on recent discussions on the NG a few features were >> deprecated/removed from D, such as typedef and C style struct >> initializers. >> >> IMO this cleanup and polish is important and all

Re: Conspiracy Theory #1

2009-11-20 Thread Walter Bright
BCS wrote: Even if you have network parallelism, CPU loads still costs money. Many server farms are not space limited but power limited. They can't get enough power out of the power company to run more servers. (And take a guess at what there power bills cost!) I've often wondered why the ser

Re: Short list with things to finish for D2

2009-11-20 Thread Stewart Gordon
aarti_pl wrote: I agree. opDollar is not particularly fitting to D language operator concept. opLength/opSize would fit better. Why I believe opLength and opSize are also wrong names: http://www.digitalmars.com/d/archives/digitalmars/D/announce/Re_opDollar_12939.html http://d.puremagic.com/i

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Bill Baxter wrote: On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe wrote: On Fri, Nov 20, 2009 at 04:49:52PM -0500, Nick Sabalausky wrote: 2. Octal literals! I think it'd be great to have a new octal syntax, or even better, a general any-positive-inter-base syntax. Both D and DMC accept 0b

Re: removal of cruft from D

2009-11-20 Thread Justin Johansson
Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important and all successful lang

Re: removal of cruft from D

2009-11-20 Thread Yigal Chripun
On 20/11/2009 23:49, Nick Sabalausky wrote: "Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important and

Re: Conspiracy Theory #1

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 2:05 PM, BCS wrote: > Hello Travis, > >> Andrei Alexandrescu wrote: >> >>> Today that reality is very visible already from certain spots. I've >>> recently switched fields from machine learning/nlp research to >>> web/industry. Although the fields are apparently very differ

Re: removal of cruft from D

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 2:12 PM, Adam D. Ruppe wrote: > On Fri, Nov 20, 2009 at 04:49:52PM -0500, Nick Sabalausky wrote: >> 2. Octal literals! I think it'd be great to have a new octal syntax, or even >> better, a general any-positive-inter-base syntax. > > Both D and DMC accept 0b as a binary

Re: Conspiracy Theory #1

2009-11-20 Thread BCS
Hello Travis, Andrei Alexandrescu wrote: Today that reality is very visible already from certain spots. I've recently switched fields from machine learning/nlp research to web/industry. Although the fields are apparently very different, they have a lot in common, along with the simple adage th

Re: removal of cruft from D

2009-11-20 Thread Adam D. Ruppe
On Fri, Nov 20, 2009 at 04:49:52PM -0500, Nick Sabalausky wrote: > 2. Octal literals! I think it'd be great to have a new octal syntax, or even > better, a general any-positive-inter-base syntax. Both D and DMC accept 0b as a binary literal. If 0x is hex, it seems logical that octal should be

Re: removal of cruft from D

2009-11-20 Thread Nick Sabalausky
"Yigal Chripun" wrote in message news:he6sqe$1dq...@digitalmars.com... > Based on recent discussions on the NG a few features were > deprecated/removed from D, such as typedef and C style struct > initializers. > > IMO this cleanup and polish is important and all successful languages do > such

Re: Making alloca more safe

2009-11-20 Thread BCS
Hello Walter, BCS wrote: (On my car, I installed an oil pressure switch that shuts off the electric fuel pump if the pressure drops. It might not translate to CS but there are good reasons that such a device doesn't come standard on cars; the first time one killed a car in rush hour traffic

Re: removal of cruft from D

2009-11-20 Thread Ellery Newcomer
Yigal Chripun wrote: > Based on recent discussions on the NG a few features were > deprecated/removed from D, such as typedef and C style struct initializers. > > IMO this cleanup and polish is important and all successful languages do > such cleanup for major releases (Python and Ruby come to min

Re: Can we drop static struct initializers?

2009-11-20 Thread grauzone
Travis Boucher wrote: Leandro Lucarella wrote: Walter Bright, el 19 de noviembre a las 23:53 me escribiste: It's not difficult to fix these compiler problems, but I'm just not sure if it's worth implementing. Maybe they should just be dropped? (The { field: value } style anyway). Funny, I've b

Re: And what will we do about package?

2009-11-20 Thread Yigal Chripun
Don wrote: To quote bugzilla 143: 'package' does not work at all But even if worked as advertised, it'd still be broken. Although it's a really useful concept that works great in Java, the existing 'package' doesn't fit with D's directory-based module system. As I see it, the problem is that,

Re: Can we drop static struct initializers?

2009-11-20 Thread Leandro Lucarella
Andrei Alexandrescu, el 20 de noviembre a las 10:42 me escribiste: > Walter Bright wrote: > >Andrei Alexandrescu wrote: > >>Would love to trim the book as well. My finger is on the Del > >>button. Just say a word. > > > >Unless someone comes up with "I really need field names", dump 'em > >(but sav

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 11:55 AM, Yigal Chripun wrote: > Bill Baxter wrote: >> >> On Fri, Nov 20, 2009 at 11:15 AM, Yigal Chripun >> wrote: >> >>> what about foreach_reverse ? >>> >> >> What about starting a different thread? > > Sorry. > I assumed we were discussing removals from D and therefore

removal of cruft from D

2009-11-20 Thread Yigal Chripun
Based on recent discussions on the NG a few features were deprecated/removed from D, such as typedef and C style struct initializers. IMO this cleanup and polish is important and all successful languages do such cleanup for major releases (Python and Ruby come to mind). I'm glad to see that D

Re: Conspiracy Theory #1

2009-11-20 Thread Leandro Lucarella
dsimcha, el 20 de noviembre a las 16:24 me escribiste: > > > Right, but they can still be the target of false pointers. In this case, > > > false > > > pointers keep each instance of foo[] alive, leading to severe memory > > > leaks. > > But the issue is more of a GC implementation issue then a

Re: Can we drop static struct initializers?

2009-11-20 Thread Yigal Chripun
Bill Baxter wrote: On Fri, Nov 20, 2009 at 11:15 AM, Yigal Chripun wrote: what about foreach_reverse ? What about starting a different thread? Sorry. I assumed we were discussing removals from D and therefore mentioned foreach_reverse as a prime candidate. I'll start a new thread.

Re: Short list with things to finish for D2

2009-11-20 Thread Stewart Gordon
Andrei Alexandrescu wrote: We're entering the finale of D2 and I want to keep a short list of things that must be done and integrated in the release. It is clearly understood by all of us that there are many things that could and probably should be done. What do you mean by finale, exactly?

Re: Can we drop static struct initializers?

2009-11-20 Thread Andrei Alexandrescu
Yigal Chripun wrote: Andrei Alexandrescu wrote: Walter Bright wrote: Andrei Alexandrescu wrote: Would love to trim the book as well. My finger is on the Del button. Just say a word. Unless someone comes up with "I really need field names", dump 'em (but save a backup of your work first!).

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 11:15 AM, Yigal Chripun wrote: > what about foreach_reverse ? > What about starting a different thread?

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 10:58 AM, Bill Baxter wrote: > On Fri, Nov 20, 2009 at 10:29 AM, Walter Bright > wrote: >> Bill Baxter wrote: >>> >>> 1) Struct literals don't work if you have an opCall for your struct. >>>    (Maybe that's not such a big deal now that structs have >>> constructors?  I ha

Re: Can we drop static struct initializers?

2009-11-20 Thread dsimcha
== Quote from Yigal Chripun (yigal...@gmail.com)'s article > Andrei Alexandrescu wrote: > > Walter Bright wrote: > >> Andrei Alexandrescu wrote: > >>> Would love to trim the book as well. My finger is on the Del button. > >>> Just say a word. > >> > >> Unless someone comes up with "I really need fi

Re: Can we drop static struct initializers?

2009-11-20 Thread Yigal Chripun
Andrei Alexandrescu wrote: Walter Bright wrote: Andrei Alexandrescu wrote: Would love to trim the book as well. My finger is on the Del button. Just say a word. Unless someone comes up with "I really need field names", dump 'em (but save a backup of your work first!). My RIP emails to you

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Thu, Nov 19, 2009 at 9:48 PM, Don wrote: > Now that we have struct literals, the old C-style struct initializers don't > seem to be necessary. > The variations with named initializers are not really implemented -- the > example in the spec doesn't work, and most uses of them cause compiler > se

Re: Conspiracy Theory #1

2009-11-20 Thread dsimcha
== Quote from Rainer Deyke (rain...@eldwood.com)'s article > dsimcha wrote: > > == Quote from Denis Koroskin (2kor...@gmail.com)'s article > > It would be negligible. The idea is that unions of reference and > > non-reference > > types are such a corner case that they could be handled conservativ

Re: Conspiracy Theory #1

2009-11-20 Thread Rainer Deyke
dsimcha wrote: > == Quote from Denis Koroskin (2kor...@gmail.com)'s article > It would be negligible. The idea is that unions of reference and > non-reference > types are such a corner case that they could be handled conservatively as a > special case, and then it's possible, at least in principl

Re: Can we drop static struct initializers?

2009-11-20 Thread KennyTM~
On Nov 21, 09 00:15, Andrei Alexandrescu wrote: Walter Bright wrote: Don wrote: Now that we have struct literals, the old C-style struct initializers don't seem to be necessary. The variations with named initializers are not really implemented -- the example in the spec doesn't work, and most u

Re: Making alloca more safe

2009-11-20 Thread Walter Bright
BCS wrote: (On my car, I installed an oil pressure switch that shuts off the electric fuel pump if the pressure drops. It might not translate to CS but there are good reasons that such a device doesn't come standard on cars; the first time one killed a car in rush hour traffic and set off a 50

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Fri, Nov 20, 2009 at 10:29 AM, Walter Bright wrote: > Bill Baxter wrote: >> >> 1) Struct literals don't work if you have an opCall for your struct. >>    (Maybe that's not such a big deal now that structs have >> constructors?  I haven't had a chance to look into struct constructors >> yet...)

Re: Conspiracy Theory #1

2009-11-20 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > dsimcha wrote: > > == Quote from Walter Bright (newshou...@digitalmars.com)'s article > >> dsimcha wrote: > >>> Yes, and similarly, when I write code to do some complicated processing > >>> of gene > >>> expression data or DNA se

Re: Can we drop static struct initializers?

2009-11-20 Thread Andrei Alexandrescu
Walter Bright wrote: Andrei Alexandrescu wrote: Would love to trim the book as well. My finger is on the Del button. Just say a word. Unless someone comes up with "I really need field names", dump 'em (but save a backup of your work first!). My RIP emails to you (as with typedef) are my bac

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Bill Baxter wrote: 1) Struct literals don't work if you have an opCall for your struct. (Maybe that's not such a big deal now that structs have constructors? I haven't had a chance to look into struct constructors yet...) Worst case, you can still construct them dynamically. 2) The field

Re: Can we drop static struct initializers?

2009-11-20 Thread Walter Bright
Andrei Alexandrescu wrote: Would love to trim the book as well. My finger is on the Del button. Just say a word. Unless someone comes up with "I really need field names", dump 'em (but save a backup of your work first!).

Re: Conspiracy Theory #1

2009-11-20 Thread Walter Bright
dsimcha wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article dsimcha wrote: Yes, and similarly, when I write code to do some complicated processing of gene expression data or DNA sequences, and it uses RAM measured in gigabytes, I go to similar lengths to avoid GC for simil

Re: Chaining exceptions

2009-11-20 Thread BCS
Hello Jesse, On Wed, 18 Nov 2009 18:27:47 -0800, Andrei Alexandrescu wrote: Thanks! Question - is there a way to fetch the current Throwable from within a finally clause? Andrei I'm pretty sure you can't since finally isn't passed an exception. I also don't see anything in my quick search.

Re: Making alloca more safe

2009-11-20 Thread BCS
Hello Walter, BCS wrote: For some systems, once you hit a seg-v, things can't get any worse Oh, yes they can! For some cases they can, for others they can't. You could now be executing a virus. *Anything* the software is connected to can now do anything wrong or malicious. (On my car,

Re: Short list with things to finish for D2

2009-11-20 Thread Lutger
Andrei Alexandrescu wrote: > Kyle wrote: >> Andrei Alexandrescu Wrote: >> >>> 6. There must be many things I forgot to mention, or that cause grief to >>> many of us. Please add to/comment on this list. >> >> Uniform function call syntax. >> > > It's in the book. I'm adding this message as a r

Re: And what will we do about package?

2009-11-20 Thread Denis Koroskin
On Fri, 20 Nov 2009 19:52:09 +0300, Don wrote: To quote bugzilla 143: 'package' does not work at all But even if worked as advertised, it'd still be broken. Although it's a really useful concept that works great in Java, the existing 'package' doesn't fit with D's directory-based module sys

Re: Can we drop static struct initializers?

2009-11-20 Thread Craig Black
"bearophile" wrote in message news:he61b9$2i9...@digitalmars.com... Walter Bright: The generated code should be identical. Please file a bugzilla! The last times I have shown a benchmark here, people have answered me that the dmd backend is primitive/old, so they have implicitly told me to

And what will we do about package?

2009-11-20 Thread Don
To quote bugzilla 143: 'package' does not work at all But even if worked as advertised, it'd still be broken. Although it's a really useful concept that works great in Java, the existing 'package' doesn't fit with D's directory-based module system. As I see it, the problem is that, given: mod

Re: Can we drop static struct initializers?

2009-11-20 Thread Bill Baxter
On Thu, Nov 19, 2009 at 9:48 PM, Don wrote: > Now that we have struct literals, the old C-style struct initializers don't > seem to be necessary. > The variations with named initializers are not really implemented -- the > example in the spec doesn't work, and most uses of them cause compiler > se

  1   2   >