Live data from Hacker News

Modern Pascal is still in the race (2022)

blog.synopse.info

121–130 of 160 posts

Re: Modern Pascal is still in the race (2022)

#121
post #4

I hope this isn't hosted on Pascal. Got a 502.

Probably got a 502 for it not being hosted on Pascal. But iirc, HN is Lisp?

Not quite, Arc, a LISP inspired language that is essentially a one-off.

http://www.paulgraham.com/hundred.html

Re: Modern Pascal is still in the race (2022)

#122
post #71
post #66

Earlier quoted context omitted.

One huge difference between C and Pascal grammars us that Pascal is LR(1), so it can be parsed easily, which helps one-pass translation. It also helps humans read it. C, on the other hand, has needlessly complicated syntax; a function definition is hard to detect, and a pointer to a function is hard to interpret, because it's literally convoluted: https://c-faq.com/decl/spiral.anderson.html Sadly, this is a general s…

Humans can normally treat C as if it is LR and get away with it, except for a few places that they can often recognize and avoid. It is a bad shortcut, but still one that you can get by with taking in a lot of code.

Sure, but "get away with" is not something to strive for in a programming language. I've allways hated C for the unnecessary brainpower it sometimes takes to parse a construct.

Re: Modern Pascal is still in the race (2022)

#123
post #17

Earlier quoted context omitted.

Inline assembler was a killer feature: you could optimize bits of your code without having to understand how an assembler works and without having to deal with a linker as Pascal compiler did everything itself. Great time indeed !

Not to mention you had a running program milliseconds after Ctrl-F9. I get modern apps require so much more stuff to run but I still miss that zippy experience.

+1 for the fast compile time. TurboPascal was not a marketing name, it was that fast, including my old 386 machine.

But TBH, nowaday's compilers do so much more, I'll happily trade compile time for that !

Re: Modern Pascal is still in the race (2022)

#124

I have lingering distain for Pascal, unlike other people here... In 1980 I was a freshman at UCSC, and the professors did not like C. So most classes used UCSD Pascal. While it apparently pioneered some cool ideas, it was not at all ready for industry use. The free function was just a suggestion, it didn't deallocate anything. Arrays were fixed size, and an array of size 80 was a different type than size 255 (and 255…

I have fond memories of using Turbo Pascal. It was quite useful and pragmatic and it looks like Free Pascal inherited that.

I also remember having to use some other (standard?) Pascal at university and it was much more limited and had annoying strict limitations like you describe. It seemed far less useful for anything practical. If that was my only experience with Pascal I would probably not have very fond memories.

Re: Modern Pascal is still in the race (2022)

#125
post #106

I miss the ease with which you put some graphics on the screen via the Borland Graphics Interface library for Turbo Pascal. :)

I think that is what Free Pascal's backwards compatible graph unit is implementing? Sad to see it is deprecated, but maybe it still works? I could not use it for porting my ancient Turbo Pascal 2.0 game since it was relying on an older, CGA-only, graphics library that had a different API.

https://www.freepascal.org/docs-html/rtl/graph/index.html

Re: Modern Pascal is still in the race (2022)

#126

I def have a soft spot for Pascal. And I think Niklaus Wirth deserves more recognition in broader circles for his foundational work with pcode, compilers, Oberon, etc. I learned Pascal like many of us growing up in the early PC era and never could look at BASIC the same way again (or respect Gates for his love of it, lol). I think having such a highly structured language at a young age did wonders. But these days fol…

Well some of the great ideas of yesteryear are having a bit of a rebirth. Many of the safety concerns of Ada are being brought into the limelight with Rust. And of course Erlang blew up a while back after spending forever in the (relative) shadows. Overall we're still stuck in a bit of a near-monoculture of JS(TS) and Python, but it's a far cry from back in the day where there was very little openness to the sole ble…

My impression from my limited experience with Pascal (more recently only playing around a bit with Free Pascal) is that much of the basic parts of the language, that a beginner like me is mostly exposed to, is very safe with strong typing and range-checking on all arrays. I do not know how far you can get in practical programming while sticking to those parts of the language, or how unsafe it gets once you start playing with pointers? I think the pointers are supposed to at least be safer than in C, unless you go out of your way to break things?

Re: Modern Pascal is still in the race (2022)

#127
post #19

>> And... Pascal is still in the race for sure! And what about.. umm... Modula 2/3 or Oberon? They don't gain as much industry attractions as Pascal does, eh?

Wirth went too far with Modula, case sensitivity is a bug, not a feature. He became obsessed with purity, instead of usability. Anders Hejlsberg was the author of the best Pascal implementation, greatly enhancing Pascal until he was seduced by Microsoft and helped start the evil that is .NET and C#. Delphi was great until Borland decided to abandon most of their user base and pursue the corporate market. Lazarus/Free…

> Anders Hejlsberg was the author of the best Pascal implementation, greatly enhancing Pascal until he was seduced by Microsoft and helped start the evil that is .NET and C#.

Some historical correction needed.

Many of the improvements in Turbo Pascal 4.0 onwards came from UCSD Pascal and Apple's Object Pascal, initially, and then followed up on interoperability with C++ for Borland products.

He wasn't seduced by Microsoft, rather by former Borland employees working at Microsoft wanting to refer him (those referral bonus), which he continuous refused until himself got pissed off with Borland's management.

"Anders Hejlsberg: A craftsman of computer language" interview

https://behindthetech.libsynpro.com/001-anders-hejlsberg-a-c...

Re: Modern Pascal is still in the race (2022)

#128
post #58

Earlier quoted context omitted.

> case sensitivity is a bug, not a feature. Agree; that was the first thing I changed in https://oberon-lang.github.io/ ; besides the few academic oddities, original Oberon is a much better language than Pascal or Modula. > He became obsessed with purity, instead of usability There was definitely an academic bubble; for example, the claim that Oberon is a system language and can only be specified with 16 pages is dem…

I never thought of Pascal as a systems programming language. I always considered the inline assembler as the hack to get around that limitation. (Just as it is in C) I am curious, what's the problem with redundancy? Having more than one way to do something doesn't seem particularly ominous to me. I'm sure you've got solid reasons.

Object Pascal was invented by Apple in collaboration with Wirth for Mac OS, as evolution from clascal used in Lisa.

Until the C and C++ took over inside Apple R&D, Mac OS was mostly programmed in Assembly and Object Pascal, and then it was time for C++ to take over.

Even the stuff that looks like C, is actually extern "C" under the hood.

Also no one really used the initial Pascal implementation, just like with C, most compilers had plenty of extensions, like Apple's Object Pascal.

Some of those extensions were later standardizes as Extended Pascal, however by then Modula-2 and Object Pascal (Apple and Borland's followup) were more relevant, Ada was coming into the picture, and thus everyone ignored ISO Extended Pascal.

Re: Modern Pascal is still in the race (2022)

#129
What Free Pascal seems to do amazingly well is platform-support and backwards compatibility. I think it may be worth considering for some of my future hobby projects for that reason alone, assuming that there will remain some critical mass of developers around to keep the compiler working and that they do not start rolling out new incompatible versions all the time like what has become the norm for popular programming languages.

Official list of supported platforms from freepascal.org: "Intel x86 (16 and 32 bit), AMD64/x86-64, PowerPC, PowerPC64, SPARC, SPARC64, ARM, AArch64, MIPS, Motorola 68k, AVR, and the JVM. Supported operating systems include Windows (16/32/64 bit, CE, and native NT), Linux, Mac OS X/iOS/iPhoneSimulator/Darwin, FreeBSD and other BSD flavors, DOS (16 bit, or 32 bit DPMI), OS/2, AIX, Android, Haiku, Nintendo GBA/DS/Wii, AmigaOS, MorphOS, AROS, Atari TOS, and various embedded platforms. Additionally, support for RISC-V (32/64), Xtensa, and Z80 architectures, and for the LLVM compiler infrastructure is available in the development version. Additionally, the Free Pascal team maintains a transpiler for pascal to Javascript called pas2js."

Re: Modern Pascal is still in the race (2022)

#130
post #115

Pascal is an abandoned prototype for Modula-2 and Oberon.

Modula-2 and Oberon are abandoned dialects of Pascal. I just wish Concurrent Pascal would have survived. As the only properly safe system language.

GCC just integrated Modula-2 into their compilers in the box offering.

A bit of Oberon survives in Go, which is probably the only reason I somehow like the language, despite their design decisions, which I must admit are still less draconian than Oberon-07.

Post reply on HN