Live data from Hacker News

Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

eev.ee

1–10 of 16 posts

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#3
"How on earth did C win out over this?" - here's some guy's take on, if not exactly this question, matters that may be related: https://www.lysator.liu.se/c/bwk-on-pascal.html

My own memory is similar - Pascal was just generally annoying to use, in various little ways, that added up over time. On the face of it, it seems like it should be a lot better than C, but in practice... it just wasn't.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#4
post #3

"How on earth did C win out over this?" - here's some guy's take on, if not exactly this question, matters that may be related: https://www.lysator.liu.se/c/bwk-on-pascal.html My own memory is similar - Pascal was just generally annoying to use, in various little ways, that added up over time. On the face of it, it seems like it should be a lot better than C, but in practice... it just wasn't.

That's such an interesting essay -- some of the complaints seem so egregious, it's no wonder Pascal didn't take off. All of the complaints seem (to my eyes) very reasonable. The high points:

No closures, so global vars everywhere

No breaks in flow control, it's goto (deprecated) or nothing

Strongly typed, but arrays of different lengths are different types.

Casting types is not possible

A number of annoying order-of-code requirements

"and" and "or" have no guaranteed precedence or order of operation..(!)

Those are enough to make me want to hurl the compiler against a wall.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#5
post #3

"How on earth did C win out over this?" - here's some guy's take on, if not exactly this question, matters that may be related: https://www.lysator.liu.se/c/bwk-on-pascal.html My own memory is similar - Pascal was just generally annoying to use, in various little ways, that added up over time. On the face of it, it seems like it should be a lot better than C, but in practice... it just wasn't.

Bear in mind that this was written in 1981, at the beginning of a decade that saw enormous progress for Pascal, rendering most of "some guy"'s objections invalid. ANSI C only happened towards the end of that decade.

I think when an essay from 20 (or 35) years ago claiming "X sucks" is referenced, it's kinda foolish not to draw attention to the history that followed.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#6
post #4
post #3

"How on earth did C win out over this?" - here's some guy's take on, if not exactly this question, matters that may be related: https://www.lysator.liu.se/c/bwk-on-pascal.html My own memory is similar - Pascal was just generally annoying to use, in various little ways, that added up over time. On the face of it, it seems like it should be a lot better than C, but in practice... it just wasn't.

That's such an interesting essay -- some of the complaints seem so egregious, it's no wonder Pascal didn't take off. All of the complaints seem (to my eyes) very reasonable. The high points: No closures, so global vars everywhere No breaks in flow control, it's goto (deprecated) or nothing Strongly typed, but arrays of different lengths are different types. Casting types is not possible A number of annoying order-of-…

    > No breaks in flow control, it's goto (deprecated) or nothing
    > Strongly typed, but arrays of different lengths are different types.
    > Casting types is not possible
Those are real frustrations, but, at the same time, they help avoid many of the security and safety issues that have plagued C for decades.

It's not clear if there's a language somewhere between Pascal that's less annoying but more safe while still being simple. But I think it is pretty clear that there is a real trade-off in either direction.

C doesn't get in your way when you know you're doing like Pascal does. But it also doesn't get in the way when you don't know what you're doing.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#7
> I have a hard time even thinking of it as a systems language, since systems languages tend to be full of punctuation, whereas Pascal makes pretty heavy use of keywords.

Judging whether it's a systems language by keywords vs punctuations? Seriously?

> does this seriously predate C and share the same problem space?

Some people thought it could share the same problem space, but it was primarily intended to be a teaching language. It turned out that it wasn't as suited for real work as some people thought.

> Granted, I don’t know enough about Pascal from one toy program to fairly compare it to C. Kind of curious what the story is, though.

The story is, when you quit having toy problems, Pascal's limitations got in your way much more than C's limitations did.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#8
post #4

Earlier quoted context omitted.

That's such an interesting essay -- some of the complaints seem so egregious, it's no wonder Pascal didn't take off. All of the complaints seem (to my eyes) very reasonable. The high points: No closures, so global vars everywhere No breaks in flow control, it's goto (deprecated) or nothing Strongly typed, but arrays of different lengths are different types. Casting types is not possible A number of annoying order-of-…

> No breaks in flow control, it's goto (deprecated) or nothing > Strongly typed, but arrays of different lengths are different types. > Casting types is not possible Those are real frustrations, but, at the same time, they help avoid many of the security and safety issues that have plagued C for decades. It's not clear if there's a language somewhere between Pascal that's less annoying but more safe while still being…

Well I mean, there's Pascal, which solves all three of those gripes.

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#9
post #3

"How on earth did C win out over this?" - here's some guy's take on, if not exactly this question, matters that may be related: https://www.lysator.liu.se/c/bwk-on-pascal.html My own memory is similar - Pascal was just generally annoying to use, in various little ways, that added up over time. On the face of it, it seems like it should be a lot better than C, but in practice... it just wasn't.

Bear in mind that this was written in 1981, at the beginning of a decade that saw enormous progress for Pascal, rendering most of "some guy"'s objections invalid. ANSI C only happened towards the end of that decade. I think when an essay from 20 (or 35) years ago claiming "X sucks" is referenced, it's kinda foolish not to draw attention to the history that followed.

Well, I was using Pascal professionally from 1986 to 1988, and many of those objections were still valid. (Granted, on an embedded system rather than a PC, so the improvements in Pascal were slower in coming to us.)

Re: Heteroglot: Project Euler problem #16 in Pascal, #17 in Inform 7

#10

> I have a hard time even thinking of it as a systems language, since systems languages tend to be full of punctuation, whereas Pascal makes pretty heavy use of keywords. Judging whether it's a systems language by keywords vs punctuations? Seriously? > does this seriously predate C and share the same problem space? Some people thought it could share the same problem space, but it was primarily intended to be a teachi…

So Jurg and Wirth designed Modula-2 as a replacement, then built a computer, then wrote an OS, wrote some apps, and lived happily ever after. Until their urge to build new languages was overpowering. Rinse, repeat.

Yet, Modula-2 had a nice combo of readability, safety, compiler efficiency, and runtime-efficiency. Proven in OS development. Such safe, systems languages helped once I got past toy problems C could handle without crashing my stuff. ;)

Post reply on HN