Hacker News new | ask | show | jobs
by malkia 1036 days ago
I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++".

Couple of observations:

    - Using C (Borland or Microsoft) required two floppy disks - one for the compiler, one for the linker. With most of the Pascal versions you end up just needing one floppy disk, later it didn't matter as we moved to HDD.

    - First "terrible" experience (by a friend) - he moved from Pascal to C and placed all his code in the .h-eader file, and was wondering why it takes so much to compile (oh, yes nowadays it's fashionable to have header-only libs, lol), but then it was awful.

    - Pascal Units enforced you (as explained in the article) to figure out cyclic dependencies, unfortunately lots of us thought of this as a limitation, which C/C++ did not had. How wrong we were!

    - There was barely any use of preprocessor (yes there was), and it was more into the language, than some external pre-processor.

    - Mark/Release was superior, but also harder to understand the idea than plain old malloc/free

         * Mark - "Records the state of the heap in a pointer variable".

         * Release - "Returns the heap to a given state".

         * So you can quickly release memory in one hop (like nowadays what json parser might need to do).

    - Turbo Pascal 3.0 was only 30-40kb - Even later Borland could keep up to a single disk. Assembly was approachable from it

    - Peephole optimization!
6 comments

Can't resist reposting:

https://news.ycombinator.com/item?id=36659349

See the thread title to get it (90s developer ...)

And:

Why use Pascal?

https://news.ycombinator.com/item?id=36646890

And Turbo Pascal was CHEAP, I think in terms of what you got for your $50? I can't remember the original retail price, you couldn't beat it. Hell, if you kept your eye out you could get copies of Delphi, / Delphi 3 for the cost of a "introduction to Delphi" book which almost always came with a standard license of Delphi.

Hobbyist Borland was the best Borland. A really amazing company that fully embraced those original tinkerers... Enterprise <X>, full vomit, but hey, that's where they got to charge many thousands per seat, so you can't really blame them.

Up until Delphi 5 or 6 the cheapest Delphi would be just $100, it wasn't until Borland became Inprise and chased that big $$$ enterprise money that their prices skyrocketed.
Turbo C was actually about the same price, I paid £32 I believe, and then paid £50 for the upgrade to Borland C++ 3.1 (all as a single purchase), vs paying the £200 or so for C++ on it's own. I remember it arriving the day after in a huge 'crate' full of books.
I regret completely missing the boat on Delphi.

I used Turbo Pascal 3 thru 6, but after college migrated towards C/C++ and never had reason to use Delphi professionally or personally.

Most of the demo coders that I followed (I wanted to become one, but never did anything significant there), and demo docs were done using Pascal. Eastern europeans (like myself) seemed to prefer it more for some reasons.

TSR applications while a bit large than pure .asm were possible!

When working on demo effects, I found it extremely important to have lightning fast edit-compile-run cycles. Before interactive demo editing tools became a thing, we had to modify code and recompile it to see anything. With Turbo Pascal (or TASM for that matter) you'd have results in under a second. Every now and then your demo would crash, but having set up AUTOEXEC.BAT to start Turbo Pascal, you'd be back in your editor in a few seconds.

I just don't understand how people can put up with waiting for compilers, Docker image downloads, and "continuous integration" builds that take upwards of whole minutes. Granted, it takes some effort to get things fast, but it is perfectly possible on modern hardware to have lightning fast compilation, and runtime replacement of modules. For some reason most people just don't care, and it sometimes makes one feel terribly lonely.

Also, inline assembly was really nice!

  asm
    mov ax, 13h
    int 10h
  end;
You are not alone. Though we are not many.
> I started with Turbo Pascal 3, Moved to 4, 4.5, 5, 6 then Delphi. Somewhere in there moved to "C" and then "C++".

I never understand why people use "C" as opposed to C.

Does anyone use "Pascal" as opposed to Pascal?

If it was Borland's compiler suite it may or may not have been perfectly standards-compliant, hence the quotation marks. The Borland suite from the early 90s seemed to be pretty relaxed/forgiving about what was valid C/C++.

My school utilized Turbo C++ 3.0 for instruction (and later 4.5), which implemented some weird subset that was pre-C++98. Plenty of things that I was doing when targeting the Borland compiler barfed terribly when compiled with GCC (or G++).

I'd definitely consider what we were writing in those days "C" or "C++" but not anything that resembles modern software...

Borland C++ was released before 1993. No wonder it didn't support C++98 at that time.
Not only that, but Borland also had extensions in their C++ compiler to simplify the development of GUI code (similar but different to the tricks Microsoft also used in their compilers).
I assume they are doing that to distinguish the Borland products (Borland C and Borland C++) from the programming languages. Everything in that sentence is the name of a Borland product.
Ugh - sorry this quoting must be my own thing - I don't know why I keep quoting btw, and unfortunately can't tell if anyone else does it (you mentioned people, but you might've just wanted to be polite to me - hehe).

I'll try to work on that! it got me thinking... why the heck!

You certainly aren't the only one, but it's still odd enough to be marked.

(To be more precise, I've seen C in quotes multiple times and maybe that's because one letter looks too small to be a name to some people, but I don't think I've ever seen C++ in quotes before.)

If you’re going to quote C please note that you should be using single quotes: ‘C’
Depends on whether I want the string constant or the character constant.
lol, next time I decide to back-quote C - I'll do it this way - hehehe
I hadn't seen it before this. Stood out to me.
> Release - "Returns the heap to a given state".

I can't imagine this would be at all sound today, if a heap was shared between multiple threads, or if you marked and released the heap across an arbitrary function pointer callback which allocates memory and expects it to remain valid to access until explicitly freed.