What is the stance on partial initializers when declaring multiplevariables of the same type?

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Jul 21 14:34:59 PDT 2011


Well I don't know about special syntaxes.

What I might have overheard was that if you do initialize in the
declaration, the compiler might request that you specify initializers
for all the variables. In other words:

float x, y, z = 0.0;  // error
float x = 0.0, y = 0.0, z = 0.0; // ok

But I don't know, this could be waay too intrusive from a low-level
language. I think I saw someone mention they would like partial
initializers to go away. I'm so-so with the idea, it could be too much
trouble for any gain.


More information about the Digitalmars-d mailing list