Comment

Comment by cjensen

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".

parent cjensen 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton