Tango BitArray Initialization
colin.hwong at gmail.com
Sun Feb 11 21:17:46 PST 2007
Sean Kelly Wrote:
> I don't think this is legal in D. In fact, the syntax is a huge problem
> in C++ because the parser often can't distinguish between a variable
> decl and a function prototype, and function prototypes take precedence.
Yeah, that got me really confused when I first started learning C++
> It may be uglier, but:
> BitArray b = BitArray( 1, 0, 1 );
> is better than:
> BitArray b( 1, 0, 1 );
> I only wish that the syntax worked for all stack variables. ie.
> int x = int( 1 );
Why is this useful? Isn't "int x = 1" enough?
More information about the Digitalmars-d-learn