Changes before 1.0

Miles _______ at _______.____
Sat Dec 2 14:42:35 PST 2006


Jordan Miner wrote:
> Sometimes using the property syntax causes a compiler error:

Properties are also broken for cases like:

	button.width -= 5;
	cursor.position++;

This is the essence of properties (it should be completely transparent
for the user if it is accessing a variable or calling a method), yet D
doesn't support it properly. This has the potential to break a lot of
code when you convert variables into properties.

> 	do {
> 		doSomething();
> 	} while(shouldContinue) {
> 		doSomethingElse();
> 	}

Interleaving. But it would be pretty useless if the two blocks had
different scopes.

> 	enum TestEnum {
> 		Value1, Value2
> 	}
> 	writefln("%s", TestEnum.Value2);

IMO, a nice way to bloat your executable code. I'd recommend placing
this feature on a debugger, and the string repr of enums should be debug
data. If you need string equivalence for enums, you should put them in a
separate string array, and just index it with the enum. This allows
better description of values and also makes l10n more straightforward.



More information about the Digitalmars-d mailing list