• 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: Bindings in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings in Swift


  • Subject: Re: Bindings in Swift
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 10 Aug 2014 10:15:40 -0700

On Aug 10, 2014, at 9:56 AM, Quincey Morris <email@hidden> wrote:
>
>> On Aug 10, 2014, at 06:46 , Roland King <email@hidden> wrote:
>>
>> And if anyone thinks Swift is all simplicity and scripty loveliness I came across this StackOverflow question and answer today. It will be a while before I entirely understand it, it will be a long while before I could attempt to reproduce it.
>
> Deliberately missing your point, I’d say the problem is that Swift has two kinds of generics — one for class types and one for protocols. The concepts are fairly easy to grasp individually, but become horrendously complex when allowed to interact. Personally, I regard this as a bug in the language design.
>
> OTOH, C++ has historically proved that generics (i.e. templates)

I really wish people would stop referring to C++ templates as generics. C++ template arguments can be numbers, strings, types, or anything else, and the compiler will sit there and dutifully compute whatever program you encode via templates.

Generics are strictly type parameterization. They are far simpler to understand and implement. And Swift has some techniques to avoid some of the problems that arise even in “normal” use of C++ templates, like associated types (to keep generic type signatures simple) and a type inference algorithm that doesn’t completely suck.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Bindings in Swift
      • From: Roland King <email@hidden>
    • Re: Bindings in Swift
      • From: Quincey Morris <email@hidden>
References: 
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Roland King <email@hidden>)
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)
 >Re: Bindings in Swift (From: Roland King <email@hidden>)
 >Re: Bindings in Swift (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Obtaining baseline from CATextLayer
  • Next by Date: Re: Advise on referencing NSDocument from custom view
  • Previous by thread: Re: Bindings in Swift
  • Next by thread: Re: Bindings in Swift
  • Index(es):
    • Date
    • Thread