• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: swift and objective-c
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >swift and objective-c (From: "McLaughlin, Michael P." <email@hidden>)
 >Re: swift and objective-c (From: Roland King <email@hidden>)
 >Re: swift and objective-c (From: Ron Hunsinger <email@hidden>)
 >Re: swift and objective-c (From: Jens Alfke <email@hidden>)
 >Re: swift and objective-c (From: Chris Lattner <email@hidden>)
 >Re: swift and objective-c (From: Dietmar Planitzer <email@hidden>)

  • Prev by Date: Re: Swift
  • Next by Date: Re: swift and objective-c
  • Previous by thread: Re: swift and objective-c
  • Next by thread: Re: swift and objective-c
  • Index(es):
    • Date
    • Thread