...ing logging 4.0

はてなブログに移行しました。D言語の話とかいろいろ。

dmd 2.037

Version D 2.037 Dec 3, 2009
New/Changed Features

* Conditional expressions ?: can now be modifiable lvalues.
* The type inferred from an ArrayLiteral is now a dynamic array, not a static one.
* Added support for op= for array.length
* Array and associative array types are now determined by using ?: across all the elements, not just using the first one.
* Array concatenation with elements now allows implicit conversion of the elements to the array element type.
* No more comma operators allowed between [ ].
* ClassInfo now merged into TypeInfo_Class.
* Bugzilla 3379: [tdpl] Parameter names not visible in the if clause of a template
* Bugzilla 3380: [tdpl] typeid(obj) should return the dynamic type of the object
* Removed -safe command line switch, added -noboundscheck command line switch.
* Bugzilla 3481: PATCH: opPow(), x ^^ y as a power operator
* Added opDispatch
* properties can only have 0 or 1 arguments
* properties cannot be overloaded with non-properties
* std.math: Added FloatControl, IeeeFlags for enabling floating-point exceptions.
* std.math: Inverse trig functions are now pure nothrow.

import std.stdio;

class A
{
	void opDispatch(string name)(int arg)
	{
		writeln(name);
		writeln(arg);
	}
}

void main()
{
	auto a = new A;
	a.hoge(1);
}
hoge
1

wwwww