November 06, 2005
"Georg Wrede" <georg.wrede@nospam.org> wrote in message news:436A5D7A.4020102@nospam.org...
> So, we're back to if I use sloppy 3rd party libraries from my D code, and they choke on SNANs. But then, my handler gets executed anyway, which is what I'd want all along.

I wouldn't call it sloppy, because SNANs have simply (and unfortunately) not been endorsed by the standards that matter, and so code doesn't take the difference between SNAN and QNAN into account. This includes C, and D is supposed to conform to the C ABI.


November 13, 2005
John C wrote:
> "Walter Bright" <newshound@digitalmars.com> wrote in message news:djjpa0$1o9n$2@digitaldaemon.com...
> 
>>A couple of oft-requested features.
>>
>>http://www.digitalmars.com/d/changelog.html
> 
> Superb. By introducing local type inference now, D is ahead of the competition in this respect. C# won't get it until version 3, C++ for a long while yet, and Java probably never.
> 
> Coincidentally (or maybe not), "auto" also happens to be the proposed C++ syntax. 

Just to add a 'dissenting view' Limbo (a relatively unknown language for Plan9 that I've never used but just read it's nifty syntax) had type inference for a long time..

Anyway I applaud the type inference for D which IMHO will have a profound impact on code's readability.
The reuse of auto word for both type inferencing and RAII seems a bit strange, IMHO ':=' as in Limbo is the best (as it's the shortest: having nearly invisible variable declaration is a good thing, especially since in D you can't have two declaration of the same variable in a function which prevent abuse), var is nice too (it's used in Scala).

Regards,
Renaud.

PS: Hoping that it won't be considered as trolling but I tend to think than Limbo's variable declaration syntax is more readable than D:

x : int; // declares x to be of type int
x : int = 5; //declares x to be of type int and initialize it to 5.
x := 8; //declares x to be to the type of 8: int and initialize it to 8.

This Pascal-like syntax is a bit verbose sometimes but very readable:
x : array[10] of int;

The advantage is that declaration and utilisation are made in the same order, contrary to D.
Of course it isn't C-like, but while C has strong points some parts like  its syntax to declare variable, switch/case with default fall-through, ';' instead of '{}' for empty loop/if/while (took me two days to find a bug caused by this one time), octal which starts with 0 instead of 0o are not very good..
November 13, 2005
renox wrote:
> John C wrote:
> 
> Just to add a 'dissenting view' Limbo (a relatively unknown language for Plan9 that I've never used but just read it's nifty syntax) had type inference for a long time..
> 
> Anyway I applaud the type inference for D which IMHO will have a profound impact on code's readability.

I think so too.

> The reuse of auto word for both type inferencing and RAII seems a bit strange, IMHO ':=' as in Limbo is the best (as it's the shortest: having nearly invisible variable declaration is a good thing, especially since in D you can't have two declaration of the same variable in a function which prevent abuse), var is nice too (it's used in Scala).
> 
> Regards,
> Renaud.
> 
> PS: Hoping that it won't be considered as trolling but I tend to think than Limbo's variable declaration syntax is more readable than D:
> 

More readable to a compiler definitelly because there is no ambiguity in this syntax, but more readable to humans is a discutable thing.

> x : int; // declares x to be of type int
> x : int = 5; //declares x to be of type int and initialize it to 5.
> x := 8; //declares x to be to the type of 8: int and initialize it to 8.
>
> This Pascal-like syntax is a bit verbose sometimes but very readable:
> x : array[10] of int;
> 
> The advantage is that declaration and utilisation are made in the same order, contrary to D.
> Of course it isn't C-like, but while C has strong points some parts like  its syntax to declare variable, switch/case with default fall-through, ';' instead of '{}' for empty loop/if/while (took me two days to find a bug caused by this one time), octal which starts with 0 instead of 0o are not very good..
November 13, 2005
Ivan Senji wrote:

> renox wrote:
> 
>> John C wrote:
>>
>> Just to add a 'dissenting view' Limbo (a relatively unknown language for Plan9 that I've never used but just read it's nifty syntax) had type inference for a long time..
>>
>> Anyway I applaud the type inference for D which IMHO will have a profound impact on code's readability.
> 
> 
> I think so too.
> 
>> The reuse of auto word for both type inferencing and RAII seems a bit strange, IMHO ':=' as in Limbo is the best (as it's the shortest: having nearly invisible variable declaration is a good thing, especially since in D you can't have two declaration of the same variable in a function which prevent abuse), var is nice too (it's used in Scala).
>>
>> Regards,
>> Renaud.
>>
>> PS: Hoping that it won't be considered as trolling but I tend to think than Limbo's variable declaration syntax is more readable than D:
>>
> 
> More readable to a compiler definitelly because there is no ambiguity in this syntax, but more readable to humans is a discutable thing.

Of course, as everything is, but I've used mostly C (that I like for small programs) / C++ (that I dislike very much) and still I find Limbo's syntax for variable declaration *very nice* to read (better than C, C++ and also better than D sorry)..

Not that it matters to D: its syntax is definitely good enough for me.

Regards,
Renaud Hebert.



>> x : int; // declares x to be of type int
>> x : int = 5; //declares x to be of type int and initialize it to 5.
>> x := 8; //declares x to be to the type of 8: int and initialize it to 8.
>>
>> This Pascal-like syntax is a bit verbose sometimes but very readable:
>> x : array[10] of int;
>>
>> The advantage is that declaration and utilisation are made in the same order, contrary to D.
>> Of course it isn't C-like, but while C has strong points some parts like  its syntax to declare variable, switch/case with default fall-through, ';' instead of '{}' for empty loop/if/while (took me two days to find a bug caused by this one time), octal which starts with 0 instead of 0o are not very good..
3 4 5 6 7 8 9 10 11 12 13
Next ›   Last »