[swift-evolution] Proposals: (1) Forbidding custom `==` for value types, (2) `dispatch` keyword, (3) `default`-result for methods with `Self`, and (4) Poor-Mans-Existentials
Johannes Neubauer
neubauer at kingsware.de
Thu Jul 21 03:06:47 CDT 2016
Dear Susan,
> Am 21.07.2016 um 02:19 schrieb Susan Cheng <susan.doggie at gmail.com>:
>
> I know and I want to point out that you said value type don't have any thread safety issues is wrong.
I did not mean that, sorry. I meant: calling == on reference types in the standard implementation of == in value types, creates new risks for race conditions and this is why this would be a bad decision. Value types themselves introduce less thread safety issues than reference types, and changes to the language should IMO not make this position weaker.
Anyway, closures are much more fragile than currying (or partial application) is [0] (the article is about Java 8, but the underlying issues hold for any language). So, I am a bit disappointed that Swift removed currying instead of making its syntax better (and more flexible) and allow only closures without variable capturing (in order to have fully partially applied functions [1] or in objective-c-terms a *parameterless block*).
All the best
Johannes
[0]: https://dzone.com/articles/whats-wrong-java-8-currying-vs
[1]: https://www.kingsware.de/2014/08/27/apple-swift-emulate-partial-fully-applied-functions/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160721/3537d936/attachment.sig>
More information about the swift-evolution
mailing list