4 ms·
The problem is can you name a safe systems language that doesn't sacrifice performance? Dependent types should fix most but there is no current systems language
by nwmcsween 10y ago
The problem is can you name a safe systems language that doesn't sacrifice performance? Dependent types should fix most but there is no current systems language with it.
- masklinn 10y agoATS? (though from the examples I've seen, the "UI" of the language is less than optimal)
- nwmcsween 10y agoI looked at ATS quite some time back and wrote it off due to the syntax. Maybe I'll give ATS a second look.
- nickpsecurity 10y ago"The problem is can you name a safe systems language that doesn't sacrifice performance?" Your performance comes specifically from not knowing your program will work upon malicious or faulty input. So, that claim is almost always apples to oranges. It's "language X let's me work and fail very fast" whereas "language Y let's me work fast." I think the 2nd one should be default option given speed of computers these days. Also, remember users' tolerance of program crashes may not be enough justification for riskier languages: silent corruption, which they don't like, can also result from unsafety. Far as languages, the Oberons used in OS's [1] and Modula-3 [2] used in CVSup were very fast. The safe variants of C [3] were faster than inserting checks yourself given the compiler optimized some checks away with static analysis. Annotation and backward compatibility varies with each. SPARK Ada [4] can go as fast as C for static code but with provable absence of common errors. Ada, its parent, systematically [5] prevents/catches errors across whole process of programming. Rust is very CPU efficient with dynamic memory and concurrency safety. D language [6] is like a better C++ without C's risks. Fast as Free Pascal last I saw. ATS [7] is a programming-with-proofs language that uses dependent types to prove safety. It's been used on a 8-bit MCU. Finally, you can use typed, assembly languages [8] if performance really matters that much to you. Some academics & companies also mock-up assembly's in things like Rust, SPARK, etc to leverage their analyses with extraction to actual ASM. [1] https://en.wikipedia.org/wiki/Bluebottle_OS https://en.wikipedia.org/wiki/Bluebottle_OS [2] https://en.wikipedia.org/wiki/Modula-3 https://en.wikipedia.org/wiki/Modula-3 [3] https://www.cs.uic.edu/pub/Main/PhDQualifyingExam/Sample4.pdf https://www.cs.uic.edu/pub/Main/PhDQualifyingExam/Sample4.pd... [4] http://www.adacore.com/press/spark-skein/ http://www.adacore.com/press/spark-skein/ [5] http://libre.adacore.com/developers/technical-papers-single/Ada-2012-safe-and-secure-booklet http://libre.adacore.com/developers/technical-papers-single/... [6] https://dlang.org/overview.html https://dlang.org/overview.html [7] http://www.ats-lang.org/ http://www.ats-lang.org/ [8] https://www.cs.cornell.edu/talc/ https://www.cs.cornell.edu/talc/