News for hackers. Stuff that matters.
Re:Guide to modern Object Pascal for programmers by solidsnack9000 on Sunday July 03, 2016 @10:04PM (#12028575)
Do you think device drivers or servers like Nginx could ever have been written in Pascal?
Re:Guide to modern Object Pascal for programmers by int_19h on Monday July 04, 2016 @02:38AM (#12029184)
Let me give you just one example adding to the other comments. In Turbo/Borland Pascal, you could declare global variables (including arrays) allocated at a specific memory address, e.g.:

var video: array[0..4000] of byte absolute $B800:0000;

It also had a special modifier for functions, that made them work as interrupt handlers. And inline assembler with nice, readable syntax that allowed addressing variables directly.

Consequently, it was actually easier to do most low-level DOS hackery in Pascal rather than C.

So yes, I'd expect it do just fine for drivers, as well.

Re:Guide to modern Object Pascal for programmers by SyneRyder on Monday July 04, 2016 @08:30AM (#12030298)
"Consequently, it was actually easier to do most low-level DOS hackery in Pascal rather than C."

I remember downloading source code in the mid 90s of various DOS graphics effects from the demoscene, and being surprised how much of it was in Pascal. And also frustrated, because I'd gone with Turbo C++ instead & had to try porting the code across myself.

Re:Guide to modern Object Pascal for programmers by mamcx on Sunday July 03, 2016 @11:38PM (#12028783)
Of course. And the "limitations" of pascal is a larger-than-life myth! Is like judge C from how it was at the first release.

By the time of TurboPascal the things was great. The peak was around Dephi 3 and it was possible to circle around C/C++ all day long, barring, obviously that the market share and ecosystem was bigger for C/C++ so that answer why you "cant'" do some stuff. Because was not implementation or library for it, NOT BECAUSE THE LANGUAGE.

Re:Guide to modern Object Pascal for programmers by pjmlp on Monday July 04, 2016 @01:46AM (#12029058)
Of course.

In CP/M, MS-DOS and a few other home systems, Pascal used to have more compiler variants available than C.

Pascal dialects like Turbo Pascal had all the features of C, plus modules, OOP, type safe enumerations and many other features.

If it wasn't for the rise of FOSS in the late 90's, widespreading the UNIX culture and thus C, Pascal derived languages might have been kept around.

Re:Guide to modern Object Pascal for programmers by Rabidgremlin on Monday July 04, 2016 @04:40AM (#12029490)
Sure... somewhere I have book that covered writing a full blown multi-threading "OS" in Turbo Pascal.

In the late 80's I wrote a framework that allowed multi-user games (via dial-up) to be created. Included 256 color graphics, mouse input etc... had fun fighting IRQ conflicts etc. Good times :)

Re:Guide to modern Object Pascal for programmers by leledumbo on Monday July 04, 2016 @08:47AM (#12030376)
just a single reference to open your eyes: https://ultibo.org/

web servers are just network programming, it's even easier. FPC even ships a HTTP server library with examples in only a few lines of Pascal.