Live data from Hacker News

Why I use Object Pascal

dubst3pp4.github.io

51–60 of 235 posts

Re: Why I use Object Pascal

#52
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.

C has no classes, and everything's in one global namespace. Scheme & LISP have no built-in classes, and one can argue that CLOS isn't what we normally describe as OOP. Both normally have a global namespace. Inheritance in JavaScript is possible but very hard to implement correctly before ES6. Node has namespaces (sort of) but client-side JavaScript generally doesn't. PHP in theory has namespaces, but the standard lib…

... and one can argue that CLOS isn't what we normally describe as OOP.

Well, yes, though I consider it far superior to most other object systems out there.

Re: Why I use Object Pascal

#54
I used Delphi (1) to Delphi 5 in the 90's and used Delphi at a company for production software from 1998-2001. I loved it. It was (?) a great language and was always a pleasure to work in. I'm not a language fundamentalist (I use whatever it takes to get the job done and whatever my employer prefers), but I can say that at least 16 years ago it was a joy to work in.

Re: Why I use Object Pascal

#55
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.

C has no classes, and everything's in one global namespace. Scheme & LISP have no built-in classes, and one can argue that CLOS isn't what we normally describe as OOP. Both normally have a global namespace. Inheritance in JavaScript is possible but very hard to implement correctly before ES6. Node has namespaces (sort of) but client-side JavaScript generally doesn't. PHP in theory has namespaces, but the standard lib…

I'm not saying these are features provided by every modern programming language - obviously eg. there are FP languages that are not object-oriented, as you pointed out.

Still, the selection of languages that do is so vast that such reasons hardly answer the question "why Pascal, of all the options".

Re: Why I use Object Pascal

#56
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.

C has no classes, and everything's in one global namespace. Scheme & LISP have no built-in classes, and one can argue that CLOS isn't what we normally describe as OOP. Both normally have a global namespace. Inheritance in JavaScript is possible but very hard to implement correctly before ES6. Node has namespaces (sort of) but client-side JavaScript generally doesn't. PHP in theory has namespaces, but the standard lib…

> PHP in theory has namespaces, but the standard libraries are just dumped in global.

Modern PHP development almost exclusively uses Composer libraries rather than the standard libraries, which overwhelmingly use namespaces in Vendor\Project format.

There's going to be a push to clean up the standard library in the coming years. The plan is to introduce a namespaced alternative to the standard library in the global namespace which also cleans up a lot of nits (e.g. phpsadness.com posts). Maybe in PHP 8? Then when the ecosystem catches up, we can discuss deprecating/removing the "just dumped in global" way of doing things in PHP 9.

Source: I'm very likely going to be the main person driving this push.

Re: Why I use Object Pascal

#57
post #36
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.

Well, C is still top-5 in all the programming language rankings I've ever seen, so... :)

OK, but "it's not C" doesn't really make Pascal stand out ;)

Re: Why I use Object Pascal

#58

What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.

It was ugly and reminded us of BASIC. That's my main reason, most 80's/early 90's folks went from BASIC to C, or BASIC to pascal. If all you had was pascal, you fell in love and never understood why any sane person would use C. C was seducing, it was faster than basic, didn't look like basic and we could fool ourselves chasing pointers, doing stupid things with it's macro system. Mental gymnasium to distract us from real work. :D

Re: Why I use Object Pascal

#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 not as simple and easy as it should be. Compared to every other alternative on the market.

Re: Why I use Object Pascal

#60

Weird anyone still uses this, I first saw Object Pascal on a Apple Lisa in 1983.

FWIW Apple's Object Pascal and modern Object Pascal have little common.

Although i think Free Pascal does have a Mac Pascal mode so that it can understand Apple's Object Pascal dialect.

Post reply on HN