On Friday, 4 December 2015 at 03:18:02 UTC, Steven Schveighoffer
wrote:
The type system is static, and everything is done via
inference, which is very nice.
According to a swift dev I talked to, part of the algorithm is
exponential and they have compile time problem because of this.
Speed wise, I can't be sure. I'm sure others here have a better
understanding. All I've used it for so far is UI code on iOS.
Usability-wise, it's much easier to write swift than Objective
C.
I've seen all kind of numbers. It seems that there are a lot of
feature that can be enabled/disabled, like overflow check, and it
changes the performance profile quite a lot.
One thing I would LOVE to see in D from swift is inference of
enum names.
In D-speak, it looks like this:
enum Foo
{
Bar,
Baz
}
Foo foo;
switch(foo)
{
case .Bar: // Foo is implied
case .Baz:
}
void fun(Foo);
fun(.Bar); // Foo is implied
I don't think we could have this exact syntax, though.
-Steve
switch(foo) with(Foo) {
case Bar:
case Baz:
}