March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock | "David Medlock" <noone@nowhere.com> wrote in message news:dulc2p$7m4$1@digitaldaemon.com... > C-Junkie: "Well there is my old reliable if statement...wait a minute...whats all this then? This language is too weird, I am going back to my comfortable (language-X)." Or they'll look at it and say, "oh, well that's cool, I've always been able to do that in for loops, now I can do it in ifs as well!" And if they give up on a language because of one new feature, they don't deserve to be using it. |
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Changed on_scope keywords per the general consensus of the n.g.
>
> The implicit function template instantiation is a bit limited at the moment, deduction won't work for types derived from templates, and the mechanism to pick the most specialized template doesn't work.
>
> http://www.digitalmars.com/d/changelog.html
>
>
>
Excellent fix to the scope statement. Thank you again, Walter. I like where this is headed. Keep up the good work. D is looking more attractive and exciting all the time.
-JJR
|
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Changed on_scope keywords per the general consensus of the n.g.
nooooooooooooooooooooooooo... I guess I was the only one that didn't like the proposed change of scope(...). Inconsistencies in d drive me mad (crazy). I love the language and hate it at the same time.
The other changes are nice though, nice work.
|
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | "Georg Wrede" <georg.wrede@nospam.org> wrote in message news:440E29AA.1090408@nospam.org... > Jarrett Billingsley wrote: >> "Georg Wrede" <georg.wrede@nospam.org> wrote in message news:440E1336.3050608@nospam.org... >> >>>BTW, what does "Implicit casts of non-bool to bool disallowed" mean? >> >> It means you can no longer write >> >> bool x = 5; > > Shhhhhttt! Good-bye C/C++ folks! > > It's not like anybody would want to write exactly > > bool x = 5; > > but more like > > bool x = strcmp("foo", "bar"); > if (!x) { /* do stuff */ } // match > else { /* call the cops! */ } // no match > > which, incidentally, is one of the more profound proposititions in any C-derived language. > > The Old School Boolean C Logic was a perfectly functioning Concept. This fact _alone_ was the reason "Bool" took so long to be "formally" introduced into either C or C++. No regular programmer ever needed Prude Bool, only the Superior Theoreticians Thought it Wise to force this upon the language. It was profoundly useful as-is, and didn't need any pimping. A language that purports to be "to-the-metal" just has to take into consideration the fundamentals of [digital] life. And processor physics. (Wanna abstract away that? Then go to Java or whatever.) > > The other night [in the D newsgroup, when it was getting hilarious] it dawned to me, that quite [too] many of the vocatious NG-members never had read their Boolean IT Fundamentals. > > Good Grief: "there's just too many instances in history where the illiterati have dictated the outcome of otherwise intellectual confrontations". Damn!! > > The ramifications of this (minor looking) modification are grave, I'm afraid. > > Now what happens to > > if (stcmp("foo", "bar")) {} > > ??? This has some merrit to it in my opinion; what's wrong with beeing able to cast an int to a bool; it allows the above stated functionality, but doesn't really present any harms that I can see. |
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Changed on_scope keywords per the general consensus of the n.g.
>
> The implicit function template instantiation is a bit limited at the moment, deduction won't work for types derived from templates, and the mechanism to pick the most specialized template doesn't work.
>
> http://www.digitalmars.com/d/changelog.html
>
>
>
Great work, Walter!
I'll throw out more bizarre test cases to help you perfect dmd ;)
|
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Quote from change log: Added std.c.fenv. Where's the documentation? Then again where's the documentation for most of std.c.*? |
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ameer Armaly | On Tue, 7 Mar 2006 21:02:11 -0500, Ameer Armaly wrote: > >> Now what happens to >> >> if (stcmp("foo", "bar")) {} >> >> ??? > This has some merrit to it in my opinion; what's wrong with beeing able to cast an int to a bool; it allows the above stated functionality, but doesn't really present any harms that I can see. You *can* cast an integer to a bool, but it must be explicit and no implicit. bool x = cast(bool)42; // okay bool x = 42; // not okay -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 8/03/2006 1:11:07 PM |
March 08, 2006 Re: DMD 0.149 release (on bools) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Georg Wrede | > It's not like anybody would want to write exactly
>
> bool x = 5;
>
> but more like
>
> bool x = strcmp("foo", "bar");
> if (!x) { /* do stuff */ } // match
> else { /* call the cops! */ } // no match
>
"!!" ends up as a cast to bool
try:
import std.stdio;
int main()
{
int i = 1;
int j = 2;
int k = 0;
if(!!i)writef("i\n");else writef("!i\n");
if(!!j)writef("j\n");else writef("!j\n");
if(!!k)writef("k\n");else writef("!k\n");
return 0;
}
|
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | On Tue, 07 Mar 2006 18:04:08 -0800, BCS wrote: > Quote from change log: > Added std.c.fenv. > > Where's the documentation? Then again where's the documentation for most of std.c.*? I comes with your C compiler <G> -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 8/03/2006 1:12:42 PM |
March 08, 2006 Re: DMD 0.149 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote:
> On Tue, 07 Mar 2006 18:04:08 -0800, BCS wrote:
>
>
>>Quote from change log:
>> Added std.c.fenv.
>>
>>Where's the documentation? Then again where's the documentation for most of std.c.*?
>
>
> I comes with your C compiler <G>
>
C compiler? Now where did I put that thing? :P
|
Copyright © 1999-2021 by the D Language Foundation