Hacker News new | ask | show | jobs
by baq 926 days ago
> On this matter, it is especially interesting to look at Go.

I absolutely love that it's becoming widely noticed. Go is basically Pascal with nice concurrency and a gc.

I guess Go authors don't want to openly admit it for fear of bad association (I refuse to believe they just reinvented Pascal independently, not that they couldn't, but it'd be a waste of time). Pascal was ridiculed back in the day for... lack of curly braces, as far as I can tell?

2 comments

Go is a blend from Limbo and Oberon-2, the authors are quite clear on that, thus Pascal influences.

Rob Pike is also a big Oberon fan, hence how Rio and ACME work on Plan 9, and Inferno.

>Pascal was ridiculed back in the day for... lack of curly braces, as far as I can tell?

Also for poor string and array handling. The classic implementations used a single byte to store the length of strings, and the length of an array was fixed and was part of its type. Though no-one could accuse K&R C of having good string or array facilities, the language was at least free of these absurd limitations.

Only if one was stuck with ISO Pascal.

It is like complaining about what were K&R C limitations, while ignoring most folks used compiler extensions and considered them C.

These were real limitations of several real Pascal compilers back in the day. As a child, I remember them being explained in a book introducing Pascal to Basic programmers. C has never required compiler-specific language extensions to make arrays and strings practically usable (however error prone they may be).

You also have to think of the effect of this on pedagogy in the pre-Google era. Any book on C would teach you how to handle arrays and strings of arbitrary lengths. Meanwhile, a book introducing Pascal would have to either restrict itself to the ISO standard's hobbled implementation of strings and arrays, or direct the student to cross their fingers and look at their compiler's documentation. That's a significant barrier.

C required tons of extensions to be usable outside big iron UNIX where it was born.

I never saw a pure ISO Pascal compiler outside UNIX, and the only Pascal book I have, from several, that constrains itself to ISO Pascal is Niklaus Wirth book.

Additionally, Pascal naysayers keep forgeting that exactly because of ISO Pascal inadequacies as systems language, Modula-2 was born in 1978.

Quite a long time to keep comparing K&R C (with extensions) with ISO Pascal.

Specially given how many systems Apple shipped with Object Pascal in the box, or the sucess of Apollo Computers on its time.

C didn’t require extensions to write a function that takes as its parameters an array of integers and the length of the array. Looking into this again (after ~30 years!) I see that ISO Pascal did have an optional 'conformant arrays' feature that could handle this kind of basic case, but it was far less flexible (albeit safer) than C's array handling, and wasn't implemented by all compilers.

I’m not sure where you are seeing 'Pascal naysayers'. I’m just pointing out an issue with the language that may have affected adoption. Neither Pascal nor C really got arrays 'right', but C never got in your way.

Pascal naysayers are those stuck in Pascal 1.0 for anything related to C vs Pascal.

That optional extension became part of the ISO Extended Pascal revision, for example.

To make it clear should we compare Go's ability to write generic code versus other languages, using 1.21 or 1.0 version?