June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | In article <c9k3ah$13fo$1@digitaldaemon.com>, Kris says... > >BTW: according to your 'handle', you appear to claim some heritage to the proverbial "Arc Angel". If so, perhaps you might consider setting a higher standard? These personal attacks are just so boring ... Whoa! I have never made a personal attack against /anyone/ on this forum, and I never intend to. Any offense taken by anyone is absolutely not my intention. I have only the highest praise and admiration for Walter. Jill |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arcane Jill | while I agree that bool is ambiguous I think most people would prefer it aliased to int rather than bit in object.d :-) can we override it in a general sense so it will compile elsewhere? (i.e. alias int bool; and not have conflicts with the bit bool in the object.d ... also the last thing I would want is to have problems like libjpeg of bool being char somewhere and int otherwhere and bit thirdware) --Daniel In article <c9k035$v8g$1@digitaldaemon.com>, Arcane Jill says... > >In article <c9j8jo$2t58$1@digitaldaemon.com>, Walter says... >> >> There is no consensus, nobody agrees > >This is not true. There is almost unanimous consensus on this forum, with yourself being pretty much the only dissenter. > >There have been many different suggestions regarding *implementation* - and if you want to call that "no consensus" then that's your viewpoint - but regarding the principle that a bool is not arithmetic, if you have been following this forum, you'll know you are in a very small minority here. > >If we have to wait until someone implements the SECOND D-compiler before we see a bool type, then so be it. But I'll bet you any amount of money you like it will be in the ISO/ANSI standard which eventually supercedes the original implementation. > >I think it's a shame that you don't like the bool type, but I think it's a bigger shame that you don't see a consensus when it's staring you in the face. Unless you are defining "consensus" as "unanimous opinion" - in which case your comment "and therefore no resolution" is absurd. > >Arcane Jill > > |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arcane Jill | He he. Never say never. Nearly everyone on this group is great, but there are one or two ... "Arcane Jill" <Arcane_member@pathlink.com> wrote in message news:c9kcog$1glr$1@digitaldaemon.com... > In article <c9k3ah$13fo$1@digitaldaemon.com>, Kris says... > > > >BTW: according to your 'handle', you appear to claim some heritage to the proverbial "Arc Angel". If so, perhaps you might consider setting a higher standard? These personal attacks are just so boring ... > > Whoa! I have never made a personal attack against /anyone/ on this forum, and I never intend to. Any offense taken by anyone is absolutely not my intention. I have only the highest praise and admiration for Walter. > > Jill > > |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew wrote: <snip> >It's a shame, because I've personally had reactions from experienced >C++ (and other languages) exponents, and pretty much the first things they say >are > - get rid of C's evil implicit conversions - which Walter's ruled out > > <snip> Ok I know int <-> char conversions still are possible in D but give Walter some credit he did remove a lot of the implicit conversions such as float<->int a few months back. -- -Anderson: http://badmama.com.au/~anderson/ |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arcane Jill | "Arcane Jill" wrote: > Whoa! I have never made a personal attack against /anyone/ on this forum, and I > never intend to. Any offense taken by anyone is absolutely not my intention. I > have only the highest praise and admiration for Walter. You know, it's tough to pick up cues in a disembodied environment. If I misunderstood you completely, then I proffer apologies. Having said that, your post was in reply to Walter's request/plea for us all to move on. Given that, I felt your reply was obnoxious at best. My mistake. Regarding opEquals(): if you'd be content with it returning a bool/bit instead, then may I humbly suggest you post a bug report regarding its inconsistency? That way, it might stand a better chance of not falling through the cracks. Regards; ---------- Outgoing message is certified Acid Free |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | "Matthew" <matthew.hat@stlsoft.dot.org> wrote in message news:c9k5lf$16nj$1@digitaldaemon.com... > The fact is that Walter is in an almost solitary minority on the bool issue, in > terms of the opinions expressed in this forum. The debate on bool goes back long, long before D. If there was consensus on what it should do, it would have been designed that way in C and C++, both languages more or less independently came up with a bool type, there were no legacy backwards compatibility issues, and in both languages bool implicitly converts to integral types. C and C++ doing it one way does not dictate what D does, but since D is meant to appeal to C/C++ programmers, diverging from C/C++ semantics has to have a pretty strong case for it. BTW, both C# and Java do not allow implicit conversion of bool to int. > Also, the bit/int opEquals() point is well made. The reason for it being the int 0/!0 is because converting it to 0/1 adds 3 instructions: cmp EAX,1 sbb EAX,EAX inc EAX When sorting/searching a lot of data, this can add up. > That's fair enough, it's his party after all, even though it does rankle considerably. One's choice is to stay involved, and either live with it or endeavour to change it eventually, or to find a better language. I can tell you > that Walter would prefer that people with diverse opinions and experience should > stay around, even if, as I'm sure we've done with "bool", it it happens to irritate the hell out of him. No, it doesn't irritate the hell out of me <g>. I'm in the wrong business if it did. It does seem to irritate others, though, and I don't really understand why. > For the record, I completely disagree with Walter's apparent opinion that other, > presumably more complex things, are more important. Now that doesn't mean I'm > making personal attacks or anything, just that AJ's prophecy of standards committees needlessly raking over old ground is likely to come true, to all our > detriments. It's a shame, because I've personally had reactions from experienced > C++ (and other languages) exponents, and pretty much the first things they say > are > - get rid of C's evil implicit conversions - which Walter's ruled out Languages that don't do implicit conversions are relative failures, and I've used some of those languages and know why. They're a pain to use. They require lots of casting to get real work done, and peppering one's routine code with casts is LESS typesafe than well understood implicit type conversions. Furthermore, complex C/C++ expressions will exhibit subtle changes in behavior when converted to D. This can be a disaster if it is, for example, crypto code. Consider, for example, the following code: class A { void foo() { } } void test() { A a; a.foo(); } Which would work in C++, but fails in D. This regularly trips up people coming to D from C++. Fortunately, the code fails predictably in a manner that pinpoints the problem, the solution is explained, and one goes on. This will not happen if implicit conversion rules are changed - the program will appear to work, but the result of the expression will be subtly different. Even worse, it will compute the same result with some values of the operands, and different results with others. So, one general principle I try to follow is that if D changes the rules, if one tries it the C++ way, one gets an obvious failure rather than a subtle, erratic one. This effectively rules out changing things like implicit conversion rules and operator precedence. > - make typedefs strong - which D has done. Hurrah! > - stop bool being an integral type - which Walter's ruled out > - make an ABI - which has so far been ignored The ABI will happen, it's just premature. > - has it got libraries - which I would suggest more of us would be doing if > there was not still such fertile ground for language debates at a very low/fundamental level Fundamental language debates will go on as long as there are two or more programmers <g>. > - give me decent templates - which we're certainly working towards > > So, we in our out? I'm still in. ;) And I'm glad you are, and hope Arcane Jill will stick around, too. |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote:
>> - make an ABI - which has so far been ignored
>
> The ABI will happen, it's just premature.
You can't imagine how glad I am to hear that. The missing C++ ABI has been a huge iron anchor that held the language back. I also think it is one of the primary reasons why most libraries are still written in C instead of C++.
Hauke
|
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hauke Duden | "Hauke Duden" <H.NS.Duden@gmx.net> wrote in message news:c9l432$2in3$1@digitaldaemon.com... > Walter wrote: > >> - make an ABI - which has so far been ignored > > > > The ABI will happen, it's just premature. > > You can't imagine how glad I am to hear that. The missing C++ ABI has been a huge iron anchor that held the language back. I also think it is one of the primary reasons why most libraries are still written in C instead of C++. I think the right time to write it is when 1.0 is released, and it will be just a document of "how it works". |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | "J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:c9ks17$26t9$1@digitaldaemon.com... > Matthew wrote: > >It's a shame, because I've personally had reactions from experienced C++ (and other languages) exponents, and pretty much the first things they say > >are > > - get rid of C's evil implicit conversions - which Walter's ruled out > Ok I know int <-> char conversions still are possible in D but give Walter some credit he did remove a lot of the implicit conversions such as float<->int a few months back. int still converts to float, just not the other way. I actually had disabled implicit integral narrowing conversions at one point, but the compiler became a nagging ninny nuisance and was more annoying than useful. It's interesting how *accustomed* I am to C's expression rules, and I suspect it would be the same with other longtime C/C++ programmers. |
June 02, 2004 Re: bool | ||||
---|---|---|---|---|
| ||||
Posted in reply to hellcatv | <hellcatv@hotmail.com> wrote in message news:c9kd4u$1h85$1@digitaldaemon.com... > while I agree that bool is ambiguous I think most people would prefer it aliased > to int rather than bit in object.d :-) > can we override it in a general sense so it will compile elsewhere? (i.e. alias > int bool; and not have conflicts with the bit bool in the object.d ... also the > last thing I would want is to have problems like libjpeg of bool being char > somewhere and int otherwhere and bit thirdware) The reason I put it in object.d is essentially to preclude confusingly conflicting versions from appearing. It's better to be consistent, perceived warts and all. |
Copyright © 1999-2021 by the D Language Foundation