News for hackers. Stuff that matters.
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by gurkendoktor on Friday June 30, 2017 @06:58PM (#14674075)
I wish Swift focused on reference semantics. One of the big problems of value types in C++ is that you have to be a language lawyer to not accidentally make wasteful copies of everything, and the same is true of Swift:

http://rosslebeau.com/2016/swift-copy-write-psa-mutating-dic...

I thought Objective-C had already solved this problem quite nicely with the explicit NSFoo/NSMutableFoo class pairs. I don't see why this needed to be fixed again, in a less explicit way.

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by bushin on Friday June 30, 2017 @07:10PM (#14674114)
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by kjaleshire on Saturday July 01, 2017 @04:56PM (#14678980)
> One of the big problems of value types in C++ is that you have to be a language lawyer to not accidentally make wasteful copies of everything...

Not always. The C++ standard has allowed copy elision for some time [1]. Guaranteed copy elision for certain forms of copy has been proposed for C++17 [2].

[1] http://en.cppreference.com/w/cpp/language/copy_elision

[2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p013...

Re:Chris Lattner on the Realm WWDC 2017 Swift Panel by catnaroek on Friday June 30, 2017 @11:53PM (#14675281)
The conflation of values (which exist in the language's semantics on paper) with physical representations (which exist in computer memory) plagues most imperative languages that try to do value semantics.