Re:Chris Lattner on the Realm WWDC 2017 Swift Panel
by _ph_ on Saturday July 01, 2017 @02:27AM
(#14675712)
The problem with C++ is, that for all its added complexity and powers, most C code still is correct C++ code, especially all the unsafe pointer manipulations. And there is no real performance reason. Many static typed languages compile to code as fast as C - if not faster thanks to tighter semantics. (Other than that some C compilers are better quality because of the effort went into them due to language popularity rather than any language feature)
[ Parent
| on HN ]
Re:Chris Lattner on the Realm WWDC 2017 Swift Panel
by soulbadguy on Sunday July 02, 2017 @05:00PM
(#14684319)
> most C code still is correct C++ code
Syntaxicaly yes, but with a more precise semantic and clearer stated "undefined behavior". The canonical example is the work around type punning and such.
> And there is no real performance reason. Many static typed languages compile to code as fast as C - if not faster thanks to tighter semantics.
Speed is only one part of the equation. For stuff like drivers and low level embedded development, we still needs C like unsafe memory manipulation. Rust,D,C# etc all have ways to do that.
> Many static typed languages compile to code as fast as C - if not faster thanks to tighter semantics. (Other than that some C compilers are better quality because of the effort went into them due to language popularity rather than any language feature)
Let's just agree to disagree on that one