Re: swift and objective-c
Re: swift and objective-c
- Subject: Re: swift and objective-c
- From: Drinktomi <email@hidden>
- Date: Thu, 05 Jun 2014 21:36:17 +0200
On Jun 5, 2014, at 19:04, Dietmar Planitzer <email@hidden> wrote:
a) on one side its syntax tries to be more compact and focused compared to ObjC - which I think is a good design goal. But on the other side Swift has a lot of unnecessary visual clutter in its syntax that distracts from the point that the code writer is actually trying to make. There are also syntax elements that are ambiguous in their meaning.
... func foo(x: Int) -> (Int) {…}
... why not simply stick with the traditional ObjC and/or C/C++/Java style declaration syntax?
Because C style function definitions are a parsing nightmare (for both machine and human) when you have higher order functions and generics. C++11 has conceded this point as it now allows you to define the return type after the function . E.g.
auto multiply (int x, int y) -> int;
-jeff |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden