Frank Benoit Wrote: > In Java one can write: > > new MyClass().run(); > > in D this does not compile, parenthesis are needed. > > (new MyClass()).run(); > > But why is the D language designed like that?
Related problem:
string str = "qwe rty uio";
string[] arr = str.split(" "); // works
class A {
string foo() { return "qwe rty uio"; }
}
A a = new A;
a.foo.split(" "); // doesn't work
