r/programming • • Mar 26 '20

10 Most(ly dead) Influential Programming Languages • Hillel Wayne

https://www.hillelwayne.com/post/influential-dead-languages/
409 Upvotes

178 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Mar 26 '20

You could go on but all of those are library issues, not language issues.

2

u/lelanthran Mar 26 '20

Well, those are fairly large showstoppers: I don't recall a Pascal implementation that fixed those library issues, so if you chose Pascal that's what you were stuck with. If you chose C you weren't stuck with that issue.

Besides, in Pascal the library was fairly well intertwined with the language: for example variadic functions could be provided by the implementation only, you couldn't write your own wrappers around writeln. In C you could.

It's death by a thousand cuts - you asked why people preferred C, and the reasons are all these little reasons that made writing programs in Pascal painful.

Note that I don't have anything against Pascal, and I regularly on reddit and other forums recommend Lazarus as the best cross-platform gui for native programs. I still reach for Lazarus if I need to write a native GUI program, but there were (and still are) legitimate reasons that programming in C is less painful.

1

u/ShinyHappyREM Mar 26 '20

I don't recall a Pascal implementation that fixed those library issues

Even Turbo/Borland Pascal in DOS times had the {$I} functionality.

1

u/lelanthran Mar 26 '20

Maybe, but in context of why people chose C over Pascal...

For file errors in C:

  1. Check return from fopen()

  2. Check return from fread()/fwrite()

For file errors in Pascal:

  1. Turn on IO error checking

  2. Call assign()

  3. Check return from IOResult()

  4. Call actual IO function (read/write)

  5. Check return from IOResult().

  6. Turn off IO error checking.

Two steps is less painful than six steps.

1

u/ShinyHappyREM Mar 27 '20

No need to turn it on and off again...

0. make sure IO error checking is turned off in the project options; set FileMode (global variable, so works for more than one file operation)

  1. call Assign/AssignFile

  2. call Reset (open) or Rewrite (create)

  3. check return value from IOResult

  4. call actual IO function (read/write)

  5. check return value from IOResult