Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

151–160 of 235 posts

Re: Why I use Object Pascal

#151
post #59
post #14

In my university (in Paris) we used to learn programming that way for the licence degree 1st year -> pascal only 2nd year -> c only 3d year -> java only That was a very nice learning curve for the core course of programming.

For absolute beginners, I still think Pascal, or Turbo Pascal is best to start. It has a syntax that doesn't scare people away, and very readable. Deploying is also 1 trillion times easier then what ever we have today, ( C , Python , Ruby , Node.js ... ) I would have picked Ruby if it could compiled into a single executable file, and if the Dev environment actually work on Windows. P.S: It does work on Windows, but n…

> Deploying is also 1 trillion times easier then what ever we have today, ( C , Python , Ruby , Node.js ... )

What makes it easier?

Distributing an executable from C seems easy. And using package managers from others also seems easy.

Re: Why I use Object Pascal

#152

Earlier quoted context omitted.

My High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then. I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.

You must be 50... and you're still on HN! Are you still an engineer? If so, what stack are you using now?

i'm 25 and my first high school programming class was taught in borland turbo pascal as well. we did one year of pascal, one year of C, one year of Java, and then a seminar course in python.

Re: Why I use Object Pascal

#153

Earlier quoted context omitted.

My High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then. I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.

You've described my experience exactly. Once I got to learn C at university, I felt that I was now using a "grown up's programming language". It took a few years to realise that C's manual memory management and explicit pointer handling was making me much less productive as an application programmer.

That's exactly my evolution as an app dev as well. I understand some people write applications in which they have to wring every bit of inefficiency out of it, but the apps my employer wants don't require that kind of speed.

Re: Why I use Object Pascal

#154
post #21

"You can also define your own types" , "classes can also inherit other classes" , "Pascal is modular" ... Not to say these are not valid reasons, or expectations one may have from a language, but - what exactly is Pascal being compared to? I mean, it's 2017.

> Not to say these are not valid reasons, or expectations one may have from a language, but - what exactly is Pascal being compared to? I mean, it's 2017. I have been searching for it for 15 min now, but last month or so on hn there was a article comparing programming languages and compilers. fpc performance was comparable to c. Also a mvp production exe will be 2.5 MB, no stdlib/.net/qt needed.

>Also a mvp production exe will be 2.5 MB, no stdlib/.net/qt needed.

And a hello world Free Pascal EXE can be as small as 57KB:

$ dir fpc_hello.exe

07/26/2016 09:43 PM 57,402 fpc_hello.exe

Source and output:

$ type fpc_hello.pas

program hello_1;

{ uses ; }

    var i: integer;
BEGIN

        for i := 1 to 10 do

        begin

            writeln(i:4, ' Hello from Free Pascal');

        end;
END.

$ fpc_hello

   1 Hello from Free Pascal
   2 Hello from Free Pascal
   3 Hello from Free Pascal
   4 Hello from Free Pascal
   5 Hello from Free Pascal
   6 Hello from Free Pascal
   7 Hello from Free Pascal
   8 Hello from Free Pascal
   9 Hello from Free Pascal
  10 Hello from Free Pascal
I also checked the size of similar programs in C and D. C was about 22KB, IIRC. D was something more, don't exactly remember, but not a lot more, probably.

Re: Why I use Object Pascal

#155
All of the arguments given for Object Pascal in this article could apply to other languages.

A better question might be "why use Object Pascal over Language X"?

I could see a niche in cross-platform desktop development, assuming you didn't want to go the Electron route (and there's valid reasons for doing so). I've worked in Qt quite a bit in my desktop days and Qt/C++ is quite complex.

Object Pascal still has manual memory management though, IIRC, which is a large portion of that complexity.

Re: Why I use Object Pascal

#157
The default setup for the industrial control systems I've had to work on is Windows2000 with Delphi applications.

There are a shocking number of these systems still in use today.

I've come to have a grudging admiration for these clunky old things and a special respect for pascal in its many forms.

Re: Why I use Object Pascal

#158
Anyone who likes Pascal should check out Nim. Inspired by Pascal, with some Python-like syntax (and significant whitespace), as well as some really cool features from other languages. Also compiles to blazing fast binaries via C or C++ (JavaScript too but not sure about the performance there).

Re: Why I use Object Pascal

#159

Earlier quoted context omitted.

My High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then. I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.

You must be 50... and you're still on HN! Are you still an engineer? If so, what stack are you using now?

Just crested 40 here. Was taught turbo pascal in high-school and college. Mostly use Node/JavaScript/C++ now but did a bunch of industrial controls stuff where that pascal really paid off for me.

Re: Why I use Object Pascal

#160

All of the arguments given for Object Pascal in this article could apply to other languages. A better question might be "why use Object Pascal over Language X"? I could see a niche in cross-platform desktop development, assuming you didn't want to go the Electron route (and there's valid reasons for doing so). I've worked in Qt quite a bit in my desktop days and Qt/C++ is quite complex. Object Pascal still has manual…

Yeah, I don't have the sense from reading this that I have any idea why I'd prefer Pascal over, say, Java, or C#, unless I liked begin and end blocks more than braces and felt really strongly about it.
Post reply on HN