4 ms·
This is a great idea. I maintain that Ada is a better "better C" than any of the alternatives I've looked into, but it has an obvious big hurdle: while it has a
by kqr 7y ago
This is a great idea. I maintain that Ada is a better "better C" than any of the alternatives I've looked into, but it has an obvious big hurdle: while it has approximately the same use cases as C, it is completely different in terms of looks and handling. One of the strong points of D is that it still seems very much like C. Very good call to emphasise this.
- WalterBright 7y agoI like Ada. D took inspiration from it.
- kqr 7y agoI know. I think you and I have discussed aspects of it at various points in comment threads before. I'm impressed with how well D is doing things that are really very hard.
- augustk 7y agoFor me Oberon is the better C. https://www.miasap.se/obnc/oberon-report.html https://www.miasap.se/obnc/oberon-report.html
- pjmlp 7y agoOn the Oberon linage that place belongs to Active Oberon. http://cas.inf.ethz.ch/news/2 http://cas.inf.ethz.ch/news/2 Only Active Oberon exposes non traced references, RAAI and a couple of other low level features that made it more complex to do systems programming in Oberon and Oberon-2, let alone Oberon-07.
- auxym 7y agoNim was inspired by Oberon, and compiles to C (so easy interop). Neat language.
- elcritch 7y agoI’ve always liked the idea of Ada, but never had a place to use it. Though someone on HN pointed out that NVidia was using Spark for secure code sections. Quite interesting! Personally while D seems a great tool, I really keep running into situations where a language that lives on top of C/C++ is useful. So I’ve been trying out Nim for those use case, using the ARC GC which appears to work well for embedded. It’s deterministic but with move semantics for performance optimization. Interesting approach IMHO. But the biggest advantage is being able to directly interface with any C or C++ natively. D/Rust both seem to have difficulty being 100% onboard with C++ (for good reasons).
- pjmlp 7y agoMost likely me, or not. In any case here are the latest news on the subject, "GTC 2020: Exterminating Buffer Overflows and Other Embarrassing Vulnerabilities with SPARK Ada on Tegra" https://developer.nvidia.com/gtc/2020/video/s21122-vid https://developer.nvidia.com/gtc/2020/video/s21122-vid Another well know project that is now adopting Ada/SPARK is GenodeOS, https://genode.org/about/road-map https://genode.org/about/road-map
- e12e 7y ago> I really keep running into situations where a language that lives on top of C/C++ is useful. > the biggest advantage is being able to directly interface with any C or C++ natively. D/Rust both seem to have difficulty being 100% onboard with C++ I thought one of the centerpieces of D was seamless c++ interop? Where does it fall down?
- benibela 7y agoI use Pascal as better C
- Koshkin 7y agoPascal is not better, it's just more verbose.
- benibela 7y agoPascal is better, because it has an actual string type that can store \0 characters, and a boolean type, and reference-counted dynamic arrays, and set types, and ranges in case statements (that makes it less verbose!), and a for loop that can go to MAXINT without overflow
- pjmlp 7y agoJust a couple of ways how it is better, using Turbo Pascal 7 for MS-DOS, released in 1992. - Units (modules) for separate compilation with strong type checking and not needing useless prefixes - A proper string type - Proper arrays with bounds checking, it has functions to retrieve upper and lower bounds - Allows the definition of numeric ranges - Enumerations are their own type, can be used as array indexes or data sets - Support for sets - Thanks to reference parameters there is less need to deal with pointers that might be invalid - Already allows for a simplified way of doing Type Driven Development - Supports type safe function pointers - Supports single inheritance OOP with minimal RAII support for heap allocated objects - Comes with a quite powerful OOP framework for TUI applications, Turbo Vision - While it doesn't prevent use-after-free, it allows for memory regions that can be deallocated on one go - Can map arrays to memory regions with bounds checking - Besides inline assembly without UNIX's clusmy syntax, allows to use registers as variables - If one really wants do do unsafe C style coding there are compiler pragmas to allow it and yes even pointer arithmetic and unsafe casts. This in 1992, if I take a recent version of Delphi, FreePascal or Oxygene, there are even more bullet points.
- Koshkin 7y agoUnfair comparison: Turbo Pascal 7 is more like C++20.