4 ms·
> What's really lacking are safe, easy, strong typed general purpose languages that can leverage AOT compilation for high performance and static analysis etc.
by gumby 2y ago
> What's really lacking are safe, easy, strong typed general purpose languages that can leverage AOT compilation for high performance and static analysis etc.
The funny thing is that MACLISP could do this back in the early 70s. While Lisp is a dynamically typed, GCed language, MACLISP let you annotate variables to promise that they would only be called on certain primitive types, thus supporting compile-time optimizations for numeric code and not necessarily allocate memory, follow a pointer, unbox data etc. This was critical to make packages like MACSYMA run on machines with performance in the KIPS range.
Although languages like Python support similar declarations or annotations, they aren't used in the same way -- if you want performance you write the module in C++ and give it a python interface.
- pjmlp 2y agoSomehow it is kind of tragedy of this industry, the amount of zig-zag it does between ideas and technologies, until mainstream finally adopts concepts that were already available during its genesis to a iluminated few.
- bsder 2y ago> While Lisp is a dynamically typed, GCed language, MACLISP let you annotate variables to promise that they would only be called on certain primitive types, thus supporting compile-time optimizations for numeric code and not necessarily allocate memory, follow a pointer, unbox data etc. And woe betide you if you happened to violate the preconditions of one of those annotations. That kind of programming is no better than C with "Segmentation fault. Core dumped." The problem is that "system programming" or "embedded programming" isn't one thing. There are people who want to throw around a zillion polygons at 144FPS. There are people who want max performance on x86-64 shoveling around millions of network connections. There are people who need guaranteed real time response or someone dies. There are people who need to stay asleep all the time to conserve battery and only wake up once every 5 minutes to chirp some RF. These people do not have the same needs in a language yet they almost all wind up shoveled into C.
- ModernMech 2y ago> These people do not have the same needs in a language yet they almost all wind up shoveled into C. Why is that tho? There are better languages for each of those applications. What do you think, is it business requirements? Hardware? Regulation? Legacy code?
- bluGill 2y agoAre there better languages? What does it even mean to be better? C is a great choice because I can hire people who know C and get good results. A domain specific language will not be much better than C for any of the above. It turns out that all the hard problems listed above are similar enough that someone good in one will be good in them all and so I can hire C experts from any field and get going fast without having to teach them my domain specific language that isn't really much better.
- ModernMech 2y agoSo does that mean you feel programming language design peaked in 1972?
- bluGill 2y agoNo. However I think most "modern" languages make a big mistake because they don't address interoperability. Rust is great if you only write in rust, but if you have millions of lines of C++ it is really hard to fix a simple one line of code bug in rust. Rust cannot talk C++ - it can at least talk C but you lose the advantages of rust. Now imagine you have C++, rust, go, and ada teams fighting about which is best - they have to drop down to 1972 C to work with each other. (note that I carefully excluded D since D does have some C++ interoperability) I do not know the best way for any modern language to take to any other modern language - but 1972 C is a big negative to them all.
- pjmlp 2y agoOnly on Linux and regular UNIX systems. On other systems we have XPC, COM, AIDL, TIMI, MSIL.