3 ms·
Cyclone is an interesting example. Something that is backward-compatible with C and does not incur significant compile-time overhead, like C++ does, is a poten
by nanolith 9y ago
Cyclone is an interesting example. Something that is backward-compatible with C and does not incur significant compile-time overhead, like C++ does, is a potential alternative. Unfortunately, Cyclone was abandoned. It only has support for 32-bit architectures, and it is not being actively maintained. One of the biggest reasons why C is so popular is that it works on practically every platform, even those that Cyclone, Modula-2, and Free Pascal do not.
Of course, if OpenBSD eliminates support for a bunch of the platforms it currently supports, such alternative languages become viable. However, the OpenBSD team purposefully maintains these platforms because they expose errors that would otherwise be missed by a scaled-down release. Software errors missed in x86_64 or x86 may be picked up in MIPS or SPARC because of endianness.
An alternative that I think is more tenable is a language that compiles to C. Such a language can piggy-back off of C's incredible market penetration while adding safety features. Barring some extensions to Cyclone, most of Cyclone's features, for instance, could be implemented as a source-source compiler that targets ANSI C99 or ANSI C11.
- nickpsecurity 9y agoThat's actually what I said here in my more thorough comment below plus some of other replies: https://lobste.rs/s/4cf21p/re_integrating_safe_languages_into#c_4ch7ug https://lobste.rs/s/4cf21p/re_integrating_safe_languages_int... Ill be replying to followups on that later tonight or in the morning. I totally agree it should be default. I'll go further to say it should have C datatypes/sizes, calling convention, FFI with little to no annotations required, and compile to C. Each check should be removable per midule with a compiler option, pragma per module, or equivalent keyword/operator marked unsafe . It also needs inline ASM. For its own advantages, add macros, safe linking, and a REPL with incremental compilation. That by itself would be better and faster to develop than with C with seemless integration with legacy codebases. Side benefit like in my Brute-Force Assurance method would be it benefiting from all tooling C ecosystem has to offer esp static analysis and certifying compiler. What you think on that?