Live data from Hacker News

Pascal at Apple

blog.fogus.me

1–10 of 145 posts

Re: Pascal at Apple

#2
I really miss Pascal; it was a great and safe language for beginners. As it was extended with Objects and Modules, it was great for development.

But there are good reasons it was surpassed by C. In early Pascal, you got a pointer by allocating memory; you could not get a pointer to an existing variable. You'd be surprised how often that gets in the way when implementing a data structure. Just try to implement the following function in C without using the address-of operator:

  struct list *head = (void *) 0;
  void push_back (struct list *entry) {
      struct list **p = &head;
      while (*p != 0) p = &p->next;
      *p = entry;
  }
Pascal got better. But once you've switched to C, the sheer verbosity of Pascal is bothersome. Instead of "{" and "}" Pascal uses "begin" and "end". It uses "procedure" or "function" to introduce a function.

There's no going back, but I wish it was still available for learners. Java is comparable in terms of programmer safety, but has too much ridiculous boilerplate just to write "hello, world".

Re: Pascal at Apple

#3
When opened w/o Javascript you see only the first paragraph and the timeline at the bottom. I almost skipped over this because I thought there wasn't anything interesting there.

Re: Pascal at Apple

#4

When opened w/o Javascript you see only the first paragraph and the timeline at the bottom. I almost skipped over this because I thought there wasn't anything interesting there.

When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there.

It's 2017. Turn on your JavaScript.

Re: Pascal at Apple

#5
post #4

When opened w/o Javascript you see only the first paragraph and the timeline at the bottom. I almost skipped over this because I thought there wasn't anything interesting there.

When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.

I know 10 years ago turning off Javascript was still a real concern. I tend to be of the mindset that in 2017 a browser without Javascript is like a browser without a mouse/trackpad - technically viable, but no one does it, so depending on Javascript is a given. Know of any good statistics on this however?

Re: Pascal at Apple

#6
post #4

When opened w/o Javascript you see only the first paragraph and the timeline at the bottom. I almost skipped over this because I thought there wasn't anything interesting there.

When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.

It doesn't matter what year it is, JavaScript provides zero utility on a blog except to give the author analytics.

Why do people hate the idea of documents so much? Imagine if you had to suffer through a different app for every single book you read; that is what a js-mandatory page is.

Re: Pascal at Apple

#7
post #4

Earlier quoted context omitted.

When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.

I know 10 years ago turning off Javascript was still a real concern. I tend to be of the mindset that in 2017 a browser without Javascript is like a browser without a mouse/trackpad - technically viable, but no one does it, so depending on Javascript is a given. Know of any good statistics on this however?

1.1% of people have it turned off in one measurement: https://gds.blog.gov.uk/2013/10/21/how-many-people-are-missi....

Re: Pascal at Apple

#8
I've been reading a lot about Niklaus Wirth recently. I read an interesting piece about Oberon I found in an HN archive[0] that mentions Oberon usage on Macs. I'm very tempted to buy "The School of Niklaus Wirth: The Art of Simplicity" after reading a few things about him. I wish there were more instances of "computing in a vacuum" like at ETH.

[0]: https://news.ycombinator.com/item?id=10058486

Re: Pascal at Apple

#9

Earlier quoted context omitted.

I know 10 years ago turning off Javascript was still a real concern. I tend to be of the mindset that in 2017 a browser without Javascript is like a browser without a mouse/trackpad - technically viable, but no one does it, so depending on Javascript is a given. Know of any good statistics on this however?

1.1% of people have it turned off in one measurement: https://gds.blog.gov.uk/2013/10/21/how-many-people-are-missi... .

A slightly more recent UK figure has it at less than 0.1%

https://blog.yell.com/2016/04/just-many-web-users-disable-co...

I like to avoid Javascript where possible just to build a nice clean fast page.

Re: Pascal at Apple

#10
I joined Apple in 1987, about the time they started ditching Pascal in favor of C. C++ (in the form of CFront) was just starting to be a thing.

Apple's Pascal had been extended to the point where there were few true differences between it and C, other than

- strings with busted semantics (size being part of the type being a huge mistake, leading to a proliferation of types like Str255, Str32, Str31, Str64, etc). I should add that C's strings were semantically busted, too, and in more dangerous ways. No way to win :-)

- nested procedures (not terribly useful in practice, IMHO)

- an object syntax, used for Object Pascal and MacApp (a complete, though large and somewhat slow app framework).

- some miscellany, like enums and modules

Apple extended Pascal pretty extensively, adding pointer arithmetic, address-of, variant functions calls, and a bunch of things I've forgotten. I could write some Pascal, then write some C, and squint and they'd look pretty much the same. Most people shrugged and wrote new code C if they were able, and then moved to C++ when CFront became usable.

Post reply on HN