News for hackers. Stuff that matters.
Re:Why should I have written ZeroMQ in C, not C++ (2012) by burfog on Thursday December 13, 2018 @02:15AM (#18670435)
With that "works 90% of time" idea, please don't ever involve yourself in software for anything serious: air traffic control, self-driving cars, autopilots, nuclear reactor control, insulin pumps, defibrillators, pacemakers, spacecraft attitude control, automated train control, the network stack of a popular OS, a mainstream web browser, a Bitcoin client, the trading software of a major exchange, ICANN's database, certificate signing, ICBM early warning system, cancer irradiation equipment, power steering, anti-lock brakes, oil/gas pipeline pressure control, online tax software...
Re:Why should I have written ZeroMQ in C, not C++ (2012) by nostrademons on Thursday December 13, 2018 @01:52PM (#18674929)
I actually do have some experience in that area - one of my early internships was in a consultancy that specialized in avionics, health care, finance, and other areas that required ultra-high-assurance software.

It is a very different beast. Their avionics division was a heavy user of Ada, which you will basically never find a webapp written in. There are traceability matrixes for everything - for each line of code, you need to be able to show precisely which requirement requires that code, and every requirement it impacts. Instead of testing taking maybe 5% of your time (as with startup prototype code) or 50% of your time (as with production webservices), it took maybe 80% of the total schedule.

Re:Why should I have written ZeroMQ in C, not C++ (2012) by bsaul on Thursday December 13, 2018 @02:50AM (#18670572)
Not working in those fields either, but i don’t understand how people can be comfortable writing life-or-death code in C either. Anything that doesn’t involve a heavy dose of formal proof or automatic validation of properties of your code seems irresponsible as well.
Re:Why should I have written ZeroMQ in C, not C++ (2012) by axw10 on Thursday December 13, 2018 @05:32AM (#18671276)
C is very safe if you are experienced and don't do anything fancy.

What else would you use apart from Ada? I wouldn't trust any language with a large runtime like Python, Java, and yes, also not Haskell.

C is very amenable to proofs that use Knuth's proof style. Also of course Frama C exists.

EDIT: If Rust is more mature, it may be an option, but I'd wait at least 5 more years until (if?) it is widely used.

Re:Why should I have written ZeroMQ in C, not C++ (2012) by bsaul on Thursday December 13, 2018 @01:09PM (#18674538)
ocaml with coq prover ?
Re:Why should I have written ZeroMQ in C, not C++ (2012) by jcelerier on Thursday December 13, 2018 @02:51AM (#18670577)
But those are only a fraction of the software ever written.
Re:Why should I have written ZeroMQ in C, not C++ (2012) by marmaduke on Thursday December 13, 2018 @09:08AM (#18672361)
A market subject to regulation would just move what’s considered the easiest 90%. Maybe in a small startup, one would write a fancy nonlinear or deep ML model in TensorFlow while for a regulated/compliance-oriented codebase, you’d stick to linear algebra for the ML model to guarantee convergence.