A summary of D's design principles
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Wed Sep 15 14:30:46 PDT 2010
On Wed, 15 Sep 2010 22:19:26 +0200, Simen kjaeraas wrote:
> bearophile <bearophileHUGS at lycos.com> wrote:
>
>> Simen kjaeraas:
>>
>>> Mind giving examples to this one? I thought this was a big no-no.
>>
>> There are few silent differences, among them there are: - usage of
>> global floating point variables/arrays that in some C programs are used
>> without initialization, assuming they are set to zero.
>>
>> - fixed-sized arrays passed around by reference in C and by value in
>> D2.
>
> By Golly¹, you're right!
>
> Those certainly are worth mentioning, at least the latter. The former
> could be seen as bad style, but certainly something someone would do.
>
>
> ¹) I mostly just wanted an excuse to say 'By Golly')
This can be amended by requiring that fixed-size array parameters to
extern(C) functions be marked as 'ref'.
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=3604
-Lars
More information about the Digitalmars-d
mailing list