Your Favourite Browser

From a theoretical point of view, C and C++ are a nightmare. If you ever came up with the idea to create a language where security holes are part of the design, look no further: It’s already there.

Pascal’s modular and more abstract concept was always far better in preventing buffer overruns and dangling pointers.
Still, C/C++ isn’t going away for the foreseeable future whilst Pascal/Delphi is a complete niche-product. So, if someone wants to go into serious development, I would seriously recommend them to learn it.

Golang and Rust are modern languages very much worth learning, but how much market share they will maintain in the future, is still to be seen.

I do not use swear words in vain, but when I do, it’s because they are appropriate for the subject in question.

3 Likes

Sorry - more “bad words” :

I did a bunch of Pascal at Uni - I quite liked it as a programming language - MUCH more than C or C++ or Assembler…

3 Likes

Very similar here, except I liked the assembly. :slight_smile: (Probably because I had the ZX Spectrum in my childhood with the Z80, and the 8088 was so much similar…)
I never really learned C deep enough, as we where free to choose in what to implement our homework.
I liked Pascal so much, that I learned it deeper, and that time TP already had asm - end blocks, so the has-to-be-very-fast loops I wrote in assembly. :nerd_face:
Oh, those good old days!

2 Likes

Assembler is a method to turn slow running programs into programs that don’t run at all. [unknown origin]

I have tried to create some assembler subroutines for the ZX81 but except for some I did copy verbatim from magazines, I was too young and ignorant to really understand the concepts.

With Turbo Pascal, I never used assembler. In the end, when it comes to speed, the choice of the programming language only increases execution speed by a constant factor. Using better algorithms can improve runtime by a higher order.

Still, I wonder why this had any effect at all with Pascal. In the end, all the program gets compiled into native machine code. Perhaps it reduced the time used for function calls.

1 Like

AFAIK, moving a bunch of data was never compiled into
REP MOVSW
or alike, and REP STOSW just to fill up a space (screen for example :slight_smile: )
however this seemed to be the most effective way of doing it.
Handling interrupts was another thing, where the number of native machine instructions had impact on overall system performance.
In such situations directly using assembly produced faster and more efficient code than that Pascal would compile.

2 Likes

Interesting! I never dug into this deeply, but this seems to me like a lack of compiler optimization.

However, building compilers is one of the toughest tasks in computer science.

1 Like

Sure, but remember we are talking about compiler for 8088/80286 approximately 30 years ago, and in general it wasn’t that bad at all. :slight_smile:
I wrote assembly parts for mates, and got either hot sandwich, or a mate wrote something for me in Clipper, which I hated always. :slight_smile:
I really enjoyed those years of my life! :smiley:

1 Like