3 ms·
Err... what? Did you make these terms up yourself, or are these established in some literature already? Because they make no sense. C isn't converted into asse
by junon 5y ago
Err... what? Did you make these terms up yourself, or are these established in some literature already? Because they make no sense.
C isn't converted into assembler language unless you ask the compiler to. For example, LLVM lowers IR AST structures into target specific machine code. Assembler is never involved.
ASM is just a human readable representation of machine code for a particular ISA. So in your mental model, C and ASM exist at the same level.
Further, Java bytecode would exist above the the machine code level (again, alongside C then, since the VM is compiled to machine code) and Java on top of that.
It just doesn't make any sense to define languages like this. I don't see any benefit, and I don't even see it as being correct.
- rezaprima 5y agoperhaps he/she meant 3rd generation language. https://en.wikipedia.org/wiki/Third-generation_programming_language https://en.wikipedia.org/wiki/Third-generation_programming_l...
- junon 5y agoJust because it's on Wikipedia doesn't mean it's a real thing. The only source for that page is some bizarro, circa-1998 website about "computer jargon". These are not academic terms that I've personally ever heard of. Happy to be wrong, but I'm not going to pretend they have any utility or legs.
- uxp100 5y ago3gl 4gl 5gl were common terms 30 years ago or so. More industry and advertising terms than academic. And 5gl was more like a Japanese government grant program than any particular set of language features IIRC.
- marcus0x62 5y agoMy memory of the whole "nGL" language thing was that it was more a marketing term than anything you would find in an academic paper. It was particularly common in the IBM world, for example in books[1] and advertisements[2] [1] https://www.oldcomputerbooks.com/pages/books/R504/james-martin-inc-joe-leben-the-arben-group/4gl-fourth-generation-languages-volume-iii-4gls-from-ibm-adl-adrs-ii-apl-as-csp-dms-gis-ic-1-sql-qbe-and https://www.oldcomputerbooks.com/pages/books/R504/james-mart... [2] I can't find a good example, but I remember seeing ads for "4GL" tools in Dr Dobbs regularly in the mid-90s.
- int_19h 5y agoOn PC, I remember platforms such as dBase were often referred to as 4GL. In retrospect, it feels like was a short way to say "very high-level domain-specific language for databases".
- drran 5y ago3 generation of languages were powered by increased level of abstraction, which was enabled by increased capabilities of hardware. 4th generation can (will?) be powered by AI.
- marcus0x62 5y ago> C isn't converted into assembler language unless you ask the compiler to. For example, LLVM lowers IR AST structures into target specific machine code. Assembler is never involved That depends on the compiler. GCC, for instance, most certainly emits assembler code as part of its standard compilation process.
- vlovich123 5y agoGCC to my knowledge has long-switched to IR as well. It’s called GIMPLE [1]. Can you please substantiate your claim? [1]. https://gcc.gnu.org/wiki/GIMPLE https://gcc.gnu.org/wiki/GIMPLE
- marcus0x62 5y agoWell, there this[1] page that describes the GCC architecture: "The SSA form is also used for optimizations. GCC performs more than 20 different optimizations on SSA trees. After the SSA optimization pass, the tree is converted back to the GIMPLE form which is then used to generate a register-transfer language (RTL) form of a tree. RTL is a hardware-based representation that corresponds to an abstract target architecture with an infinite number of registers. An RTL optimization pass optimizes the tree in the RTL form. *Finally, a GCC back-end generates the assembly code for the target architecture using the RTL representation.* Examples of back-ends are x86 back end, mips back end, etc." Then, there's the official GCC documentation[2]: "Compilation can involve up to four stages: preprocessing, compilation proper, assembly and linking, always in that order. GCC is capable of preprocessing and compiling several files either into several assembler input files, or into one assembler input file; then each assembler input file produces an object file, and linking combines all the object files (those newly compiled, and those specified as input) into an executable file." You can also just run GCC -- either with --verbose or --save-temps -- and observe what the compiler toolchain is doing. [1] https://en.m.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C_Compiler_Architecture https://en.m.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU... [2] https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Overall-Options.html#Overall-Options https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Overall-Option...
- resonious 5y agoThe "high-level lang, assembly, machine code" model is pretty much how it's taught in schools and random internet tutorials. As usual, the real world is a little more nuanced.