News for hackers. Stuff that matters.
Re:On Apple's Love Affair with Swift by SlowRobotAhead on Sunday August 12, 2018 @01:08PM (#17745271)
Ok... so if I’m getting the idea here... C is more limited, but also dangerous because it gives direct access to memory and pointers making it dangerous.

Man... to listen to hackernews tell it... no one should use C!

I wonder how many comments describing how bad C is are from people on Linux machines?

Re:On Apple's Love Affair with Swift by pjmlp on Monday August 13, 2018 @02:26AM (#17748364)
The problem is not direct access to memory and pointers as such, every systems programming language needs to provide such features.

The problem with C, versus other systems programming languages it that it its pointers, implicit conversions of array into pointers, integer operations, string and array bounds don't have any kind of validation.

On other systems languages disabling such validations is explicit.

C is like JavaScript in the browser, we have to put up with it because UNIX clones won the market of commodity OSes.

C on its own without UNIX, would have failed in the market.

On the desktop world it was already being replaced by C++, Smalltalk, VB, Delphi and 4GL before FOSS based on UNIX and C started to be widespread.

Unfortunately it is impossible to convince people on pure UNIX based OSes to use something else.

Fortunately, Apple, Microsoft, Google, Sony, Nintendo are able to set which programming languages one is allowed to use on their platforms and C is on the way out on their SDKs.

Re:On Apple's Love Affair with Swift by SlowRobotAhead on Tuesday August 14, 2018 @02:43AM (#17755997)
LOL yea, C is going away alright. Just as soon as every company you mentioned and everyone else in the world stops making embedded electronics!