VoltLang / Volta

Compiler for the Volt Programming Language
151 stars 8 forks source link

Add T.default syntax #53

Closed bhelyer closed 5 years ago

bhelyer commented 5 years ago

Per our earlier discussion, this commit adds the syntax

T.default

To get the default initialiser for a given type, T. This replaces the old T.init syntax (except in magicD modules), and removes the restrictions on naming fields and functions 'init'. There's a matching Watt PR needed for compilation.

bhelyer commented 5 years ago

T.default