Live data from Hacker News

Why use Pascal?

castle-engine.io

1–10 of 516 posts

Re: Why use Pascal?

#2
I'm finding myself using Pascal for fun these days due to resource constraints.

The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k.

It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks.

I've not used Pascal on anything larger, or more modern, but I have to say that my recent experience has been rewarding enough that I wouldn't rule it out!

Re: Why use Pascal?

#3

I'm finding myself using Pascal for fun these days due to resource constraints. The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k. It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks. I've not used Pascal on anything larger, or more moder…

Turbo Pascal and later Delphi were the first time when a programming language really spoke to me. Eventually, I went the C and C++ route, but I’ve always had a desire to return to more expressive languages.

I had no idea that there was still a modern Pascal implementation, so I may just have to get reacquainted with my first love.

Re: Why use Pascal?

#4

I'm finding myself using Pascal for fun these days due to resource constraints. The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k. It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks. I've not used Pascal on anything larger, or more moder…

Check out Free Pascal (FP) if you haven't already. It supports many platforms.

You can check on their site if it supports CP/M if you need that. I would not be surprised if it did.

The TUI IDE is very similar to Turbo Pascal, and lightning fast. The language has a lot more (advanced) features than Turbo Pascal, but you don't have to use them if you don't want to.

The generated binaries were also very small, similar to C, when I did a quick test of it on Windows, some time ago. Under 50 or 60 KB for a simple hello world program.

Re: Why use Pascal?

#5
I used Delph professionaly for several years in the 90s, and liked it, but really got tired with Borland (and subsequent owners) mis-managing the product and the language, as did Anders Hejlsberg, who left Borland for Microsoft, where he created C# - IMHO a much better language & architecture to invest your time in.

Re: Why use Pascal?

#7

I'm finding myself using Pascal for fun these days due to resource constraints. The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k. It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks. I've not used Pascal on anything larger, or more moder…

Check out Free Pascal (FP) if you haven't already. It supports many platforms. You can check on their site if it supports CP/M if you need that. I would not be surprised if it did. The TUI IDE is very similar to Turbo Pascal, and lightning fast. The language has a lot more (advanced) features than Turbo Pascal, but you don't have to use them if you don't want to. The generated binaries were also very small, similar t…

Sadly it seems not to be available for such systems.

Though for reference compiling my sample "Hello World" script on TP gives me a "hello.com" file which is 8320 bytes. 64k is as much memory as I have on the machine, so if it were 50-60k I'd be worried there would be no space left for anything else!

Re: Why use Pascal?

#8
I have found a beautiful beginner book "High-Level Languages and Their Compilers" by Des Watson and I want to run all that examples which are given mostly on Pascal.

Re: Why use Pascal?

#9
I disagree with some of their reasons.

Modern: Object Pascal isn't a modern language. It was modern in 1998, maybe, but it hasn't evolved much since then. Latest big change was the addition of generics, behind almost any other language.

Fast: FPC doesn't generate particularly fast code, and the nature of OP objects doesn't help with locality. It's faster than scripting languages, but generally slower than AOT compiled languages, even those with GC.

On the other hand, the ecosystem is great. There are lots of good libraries and tools (the most remarkable one being Lazarus, the Delphi clone). In my experience, people working with FPC or Delphi don't care much about modernizing the language or things like that, the just get things done (TM). I don't see the language being attractive to new coders though, so I don't know what its future will be...

Re: Why use Pascal?

#10
first word they use to justify using Pascal is that it's "modern".

Gave a glimpse at the code source screenshot. No, that syntax is very much the past.

Post reply on HN