4 ms·
I think the audience for Swift is probably wider and anyway there is definitely inconsistency. let works differently for structs and classes which if fine and
by josephlord 12y ago
I think the audience for Swift is probably wider and anyway there is definitely inconsistency.
let works differently for structs and classes which if fine and clear as it is the main difference between them. Dictionaries are like structs truly immutable when declared with let. Arrays declared with let on the other hand have a complicated partial mutability and copy on write combination that depends on whether the operation changes their length.
I've got another post that is a work in progress that shows some of the behaviour I find odd. When I've finished it I'll add it to the blog properly but I don't mind people seeing and commenting on it as long as they know it is a WIP:
http://blog.human-friendly.com/J45WpUpm8vqndCJAHgS7J7kZ http://blog.human-friendly.com/J45WpUpm8vqndCJAHgS7J7kZ
- pjmlp 12y agoI lack proper Mac access (the ones at work cannot be upgraded), but I have watched all WWDC videos and the ebook. Currently I don't find it a big issue, however the language is still not final, maybe this can still change. I imagine Apple might still act on some initial feedback before Swift 1.0 gets released.