πΎ Archived View for bbs.geminispace.org βΊ s βΊ pascal βΊ 20626 captured on 2024-12-17 at 15:02:37. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
I learned Pascal in uni and haven't touched it in ages, but I'm thinking of picking it up again after reading how much less computation-expensive than, say, Python. Does anyone have any suggestions on good ways to get started again? Also, any thoughts about the virtues of Pascal vs. its related languages like, e.g. Ada?
Oct 10 Β· 2 months ago Β· π Houjimmy
π stack Β· Oct 10 at 03:30:
May I ask, why not plain old C if you care about resource utilization and speed? Pascal is a bit long in the tooth, and you will get arthritis from typing begin, end, function, procedure, etc. Most initial issues have been addressed, but why? I am also not sure what you mean by computation-expensive... Speed? Memory? CPU load? There are better languages as Pascal is not particularly small, fast, or convenient. Just an opinion.
π clseibold Β· Oct 10 at 10:08:
@stack I mean, it's pretty universal that Pascals strings are just better in every way, both for speed and usability, and them not being bug-prone.
I disagree that Pascal isn't fast. And all the convenience you get with C is completely cancelled out by its horrible standard library.
I do feel like people have rose-colored glasses when it comes to C. C really isn't that great, imo.
π stack Β· Oct 10 at 18:00:
@clseibold -- I never thought I'd find myself defending C, and I won't. I hated it most of my life, but learned to appreciate that it's installed on everything, and after a few decades it almost doesn't matter what language I use -- unless it's Lisp, where I often write code in an entirely different way. Wirth really liked big syntax, which I don't appreciate, hence my favorite languages are Forth and Lisp (and even Smaltalk, with its syntax rules fitting on a business card). Pascal is OK, but if I'm going to use a blub language, C is a safer choice in terms of widespread support, etc. But there is no better language than the one you enjoy!
If I might add a 3rd option: what about Fortran? It's reasonably close to Pascal on the "less punctuation soup" front, and it's possible to write _very_ efficient math code with it.
π stack Β· Oct 12 at 18:19:
APL?
π¦ zzo38 Β· Oct 12 at 21:27:
There are several problems with the C programming language, but the alternatives seems to avoid many of the good features of C and add some things that also aren't very good, in my opinion. So, I use the C programming language; it is not quite really bad enough that I will not use it, I think.
(I have used Pascal as well, to modify ZZT. Turbo Pascal seems like it is a reasonable programming language for writing DOS programs.)
π norayr [mod] Β· Oct 23 at 00:11:
freepascal is an amazing compiler. it supports turbo pascal dialect if one wants to have that limit. it supports iso mode if you happen to need it. it supports delphi object pascal mode.
it generates very fast code, and in some benchmarks i have shared here, it shares first place with go and c.
π norayr [mod] Β· Oct 23 at 00:26:
horrible standard library
this is a comment left by andreas borchert in comp.lang.oberon in the middle of nineties:
The libc is certainly not a good guide: * Buffer overruns are not ruled out by design: gets, sscanf etc. * Interface inconsistencies: gets vs fgets, fgets vs fscanf (note the position of the file stream parameter) * Bad interfaces like that of getchar() whose return code can be a character or an error code * Particularly bad buffering system which β ignores the block structure of underlying file systems, and β does not support bidirectional buffering * No provisions exist such that independent libraries can cooperate with each other in β signal handling, β setting up alarms, and β tracking childs. (Please note that I do not want to bash Ritchie, Kernighan etc. The libc is history and should be taken as suchβ¦ It is time to abandon C and the libc and it does not help to place other systems on top of this historic relic.)
i save a link to the usenet post via google groups, it was available years ago, but not now:
π» TardisKun Β· Dec 01 at 19:04:
@norayr alternate link ;-)
π norayr [mod] Β· Dec 02 at 00:16:
TardisKun, thank you.
π¦ Houjimmy Β· Dec 03 at 18:44:
I've also learned Pascal have ages, both in school and university. Is it still relevant?