3 ms·
> Even while Pascal wasn't written with low-level programming in mind If that’s true, then neither was C, Algol, etc. When those languages were conceived, “low
by deaddodo 1y ago
> Even while Pascal wasn't written with low-level programming in mind
If that’s true, then neither was C, Algol, etc. When those languages were conceived, “low-level” programming was just “programming” and “high-level programming” was the exception. Mostly because the hardware ecosystem was far more fragmented and an OS wasn’t guaranteed.
To that effect, all of those languages give you the “features” necessary to “low-level” program, namely: raw pointers and ability to compile for freestanding environments.
- mycall 1y agoI remember embedding assembly inside my Turbo Pascal procedures and functions, using asm/end blocks. It worked quite well. External assembly module object linking was an option too.
- noir_lord 1y agoIt did in Object Pascal as well - way back in a different life when I hung around a programming channel there was a big argument about C always been faster than Pascal from one of the C devs in there - so we set the challenge as "count instances of several words in a 100MB file" fastest using only language features and the standard library for each (what came out the box). I beat the C programmer because I "cheated" - I dropped into assembly for parts of it since that was part of the core language to be able to do that, he used whatever string library was shipped with his compiler at the time, he rigged it because Object Pascals standard string functions where notoriously slow (fast enough but much slower than C implementations of the time) - one of my prouder moments and 100% not something I could do now, I've completely forgotten assembly.