Dechenjm / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

default initializers for aggregate types should be null, not default constructor #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Crack originally took the C++ approach on default initializers:

  A a;

In the definition above, "a" is initialized with the default constructor, 
making it equivalent to:

  A a = {};

As it turns out, in most of the cases in the current code where we do default 
initialization of objects, we want to initialize to null.  We should accomodate 
the most common case and use null as an initializer.

Original issue reported on code.google.com by mind...@gmail.com on 18 Sep 2010 at 8:52

GoogleCodeExporter commented 9 years ago
Fixed in revision 5d7c853d3b

Original comment by mind...@gmail.com on 19 Nov 2010 at 11:59