We really need modern-but-simple memory-safe languages that don't admit (much less require) non-static allocation.
-
-
Wasn't java the big attempt at dynamic memory management with static typing and compilation?
-
Probably, but what I'm asking for is the opposite, something suitable for safety-critical embedded like automotive but accessible to modern programmers.
-
I'd probably start by looking at lua, but what do I know?
-
I see zero problem with dynamic allocation. All hyper critical, super strict standard allow dynamic allocation. Including SW in plane engine&pacemaker. The only thing is, preallocate before the main loop. So no need for a new lang. https://www.fstar-lang.org/ https://ziglang.org/
-
It's not that there aren't existing languages that let you write allocation-free[-after-init] code. C certainly does. It's that the ones that do are memory-unsafe and/or inaccessible to programmers who learned on modern languages.
-
Well, I gave two examples of such safe modern languages designed for the embedded space. F* and variants are used in practice, not sure about zig. F* has a variant that complies to readable C.
-
C combines the flexibility of assembly language with the power of assembly language.
-
Standard C don't even have fraction of the power of the assembly language. Maybe the flexibility of asm, the portability of asm, and the power of C#. Not even that, C# at least has SIMD, C is too high level for that. If you need lower level than std C – go down to C#
- 2 more replies
New conversation -
-
-
I quite liked Fortran for aerospace stuff.
I’m not sure it needs much modernisation either.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.