Maybe D is right about GC after all !

Paolo Invernizzi paolo.invernizzi at gmail.com
Tue Dec 26 09:03:31 UTC 2017


On Tuesday, 26 December 2017 at 07:01:16 UTC, codephantom wrote:
> On Tuesday, 26 December 2017 at 04:47:35 UTC, Walter Bright 
> wrote:
>>
>> Only if someone considers this as fixed:
>>
>>     int foo(int* p) { return p[1]; }
>>     int bar(int i) { return foo(&i); }
>>
>>     clang++ -c test.cpp -Wall
>>
>>
>
> good example..and it makes a good point.
>
> however, let that point be not that C/C++ is flawed (since 
> pointers are meant to let you point to anywhere), but rather 
> that the code example is flawed.
>
> there is a difference between a flawed language, and flawed use 
> of that language.
>
> e.g. what if I accidently left out the @safe attribute on those 
> functions in D?

The point is that the presence of one @safe: line in the module 
can be mechanically checked, over one million devs working on a 
codebase.

The whole point of Walter argumentation is 'mechanically'.

/Paolo


More information about the Digitalmars-d mailing list