News for hackers. Stuff that matters.
Re:Best aspects of C by randomNumber7 on Wednesday November 18, 2020 @05:50AM (#25135329)
> Writing an OS (and the rest) in Pascal (I'm thinking of Oberon specifically) is no harder than to write it in C.

You can't because it is impossible to escape the type system. Without the ability to cast pointers you can't write a memory allocator. You can't write a function like dlopen()...

Re:Best aspects of C by loup-vaillant on Wednesday November 18, 2020 @07:02AM (#25135844)
The "impossible" has been done: http://www.projectoberon.com/

Not sure about the memory allocator, Oberon may have avoided the problem by having a GC.

Re:Best aspects of C by randomNumber7 on Wednesday November 18, 2020 @02:57PM (#25141655)
This is a nice article about the shortcomings of pascal. I don't know oberon so maybe it changed a bit.

http://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pasc...

Re:Best aspects of C by int_19h on Thursday November 19, 2020 @03:13PM (#25153822)
This article talks about Wirth's Pascal as originally defined. But various language dialects evolved way beyond that, and some of them became effectively dominant.

Here's what low-level programming in Pascal looked like on DOS: http://www.retroarchive.org/swag/TSR/0022.PAS.html

Re:Best aspects of C by loup-vaillant on Wednesday November 18, 2020 @05:57PM (#25143747)
Thanks for the link, I'll go take a look. I'm pretty sure Oberon addressed some of the pitfalls cited there, if only so Wirth could write an OS with it. Not every language is OS worthy, after all.