Live data from Hacker News

Modern Pascal is still in the race (2022)

blog.synopse.info

71–80 of 160 posts

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

#71
post #66

Earlier quoted context omitted.

I'm surprised that you draw a sharp distinction between C and Pascal syntax. They have a shared lineage and are really very close to each other. Yeah, curly braces won over "begin" and "end", but that's not a matter of some huge conceptual rift, just convenience. There are numerous languages today, including Haskell and Ocaml, that are far more removed from the Algol lineage than these two. Heck, the differences betw…

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.

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

#72
post #21
post #8

Hmm meh. I have a soft spot for Delphi/Object Pascal but I think the case here is not great. What it looks like at a glance is they wrote a better Pascal program than the Go one it was competing against, rather than just idiomatically port it. A fine approach, but it doesn't tell us that much. Specifically, it doesn't tell us very much about programming languages. Go has plenty of weaknesses versus Pascal, but two co…

"Channels are nice, until they are not. I feel as though it's easier, though not necessarily easy, to write correct programs using mutexes than Go channels in many cases." The rule for mutexes is, never take more than one. As long as you only ever take one, life is pretty good. When all you had was mutexes as your primitive, though, that became a problem. One is not enough. You can't build a big program on mutexes, a…

> The rule for mutexes is, never take more than one. As long as you only ever take one, life is pretty good.

Is there any shortcoming you can't apply that to? Don't malloc unless you free. If you cast in your program, make sure to cast to the correct type.

> The story of software engineering in the 1990s was a story of overreactions and misdiagnoses. This was one of them.

The problem of multiple mutexes was diagnosed well before the 90s. "Dining philosophers" was formulated in 1965.

    https://www.adit.io/posts/2013-05-11-The-Dining-Philosophers-Problem-With-Ron-Swanson.html

    https://www.adit.io/posts/2013-05-15-Locks,-Actors,-And-STM-In-Pictures.html

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

#73
post #57

Earlier quoted context omitted.

programming languages (and some other categories of software used to create things) depend strongly on having an active user and developer base, because the range of things that people want to do with them keeps changing and growing. so in that sense there is a competition for mindshare, and languages that don't "keep up" get an increasingly large list of things that you can't use them for because no one has written…

Sort of, but that’s less true than ever in an age of .net, java, and js/wasm runtimes that let you easily bridge between your project’s language and libraries written in other languages. Standing up an established language in one of these runtimes is an upper division college level project. If you strongly felt that Algol was the clearest or most inspiring way to express your project, it’s not nearly so out of reach…

Only if you are in those respective ecosystems. I write embedded code so I don't get any of those options. Most of my code is in C++ because historically that is what we knew best (we have been updating to modern C++, so it is one of the better C++ code bases, but still it has the warts of C++). Integrating anything other than C++ into our code is hard. Many things are a class, most with virtual functions (London vs Detroit mocking is a different rant), and nothing except C++ really knows how to deal with it. Then there are templates - std::vector is the perfect type for so many things, but again nothing else can deal with it.

I keep trying to figure out how to use something else, but it is really hard to break in. Those who have tried before me gave up because of the friction.

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

#75
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.

Everywhere but typedef can be made LR(1) IIRC

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

#76
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.

> I never thought of Pascal as a systems programming language

I referred to Oberon when stating that it isn't a system programming language, not Pascal; the latter is well suited for low-level system programming because you can take addresses and directly manipulate pointers, and there are facilities for multi-threading etc.

> what's the problem with redundancy?

FreePascal is at least three different languages in one; if you add compiler options the number of actual language versions even multiplies. There are e.g. different object systems which are even available at the same time in certain modes. This multiplies not only the learning effort, but also the development and documentation effort. It is apparent that FreePascal tries to follow C++ when looking at the feature set; C++ is a very complex language and so became FreePascal; the fact that not every feature could be freely designed but had to respect the existing feature set with all its interactions made FreePascal even more complex than C++ in some respects. And FreePascal has to carry on burdens from the past which were improved in Modula or Oberon, but which have to remain in the language for backward compatibility reasons.

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

#77

“Usually, at our age, we should be managers, not developers.” There’s a lot of assumptions and bias in here.

I'd prefer to be a senior staff engineer, or whatever they call the technical leaders. The pay isn't quite as good as upper management, but it is equal to regular management and I get to do technical things. I just have to be careful not to direct others to make a big unmaintainable mess.

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

#78
post #58

Earlier quoted context omitted.

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…

> 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…

Here are the mentioned sixteen pages if anyone is interested:

https://miasap.se/obnc/oberon-report.html

Oberon also has an interesting set of features to enable object-oriented programming without the syntactic sugar. Here is an article which describes basic abstractions in Oberon:

https://miasap.se/obnc/data-abstraction.html

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

#79

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…

Unfortunately, LOGO uses dynamic scope. It could easily be a viable language aside from that one misfeature.

So does ELisp, by default :-)

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

#80
post #78
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…

Here are the mentioned sixteen pages if anyone is interested: https://miasap.se/obnc/oberon-report.html Oberon also has an interesting set of features to enable object-oriented programming without the syntactic sugar. Here is an article which describes basic abstractions in Oberon: https://miasap.se/obnc/data-abstraction.html

I referred to this one: https://people.inf.ethz.ch/wirth/Oberon/Oberon.Report.pdf.
Post reply on HN