GCC is adding cool new languages too!
They just recently added COBOL and Modula-2. Algol 68 is coming in GCC 16.
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
GCC is adding cool new languages too!
They just recently added COBOL and Modula-2. Algol 68 is coming in GCC 16.
Honestly, now that I can see the "business productivity" through-line from COBOL, to BASIC, and most recently, Python, I should probably just learn COBOL.
cool new languages
COBOL
I guess I should have put a /s but I thought it was pretty obvious. The 68 in Algol 68 is 1968. COBOL is from 1959. Modula-2 is from 1977.
My point exactly was that all the hot new languages are built with LLVM while the “new” language options on GCC are languages from the 50’s, 60’s, and 70’s.
I am not even exaggerating. That is just what the projects look like right now.
I would guess those languages are added for preservation and compatibility reasons, and it's also an important thing
I think some are getting used actually, particularly COBOL. I think Modula-2 still gets used in some embedded contexts. But these languages are not exactly pushing the state-of-the-art.
Algol 68 is interesting. It is for sure just for academic and academic enthusiast purposes. Historical and educational value only as you say.
If Algol68 is from 1968, shouldn't Modula-2 be from 1898?
I had my suspicions that that's what you were going for, I just thought I'd make it obvious.
It's new to gcc!
BEGIN
BEGIN
Wow,
Modula 2!
END;
I remember Modula 2.
END.
Isn't Zig working on their own backend?
Also, pretty excited about the cranelift project.
Yes, and it’s now default for x86_64
I'll make my own LLVM, with blackjack and hookers.
That's like... It's purpose. Compilers always have a frontend and a backend. Even when the compiler is entirely made from scratch (like Java or go), it is split between front and backend, that's just how they are made.
So it makes sense to invest in just a few highly advanced backends (llvm, gcc, msvc) and then just build frontends for those. Most projects choose llvm because, unlike the others, it was purpose built to be a common ground, but it's not a rule. For example, there is an in-developement rust frontend for GCC.
that’s just how they are made.
Can confirm, even the little training compiler we made at Uni for a subset of Java (Javali) had a backend and frontend.
I can't imagine trying to spit out machine code while parsing the input without an intermediary AST stage. It was complicated enough with the proper split.
I have built single pass compilers that do everything in one shot without an AST. You are not going to get great error messages or optimization though.
Oh! Okay, that's interesting to me! What was the input language? I imagine it might be a little more doable if it's closer to hardware?
I don't remember that well, but I think the object oriented stuff with dynamic dispatch was hard to deal with.
I can imagine;