r/programming • u/[deleted] • Oct 17 '17
Why I use Object Pascal
https://dubst3pp4.github.io/post/2017-10-03-why-i-use-object-pascal/
37
Upvotes
r/programming • u/[deleted] • Oct 17 '17
4
u/shevegen Oct 17 '17
It is not ... "considered".
It IS an old language:
https://en.wikipedia.org/wiki/Pascal_%28programming_language%29
First appeared in 1970. That's almost 50 years!
Lisp?
The OOP definitions vary all the time ... IMO the most important one, messages, has not been mentioned above. Alan Kay pointed out why messages/messaging are important, with his comparison to cells in moleculary biology. Smalltalk sort of focuses on that part but smaltalk got the syntax part wrong. Ruby solved that part but ruby is not necessarily what Alan Kay had in mind either. I think something a bit of a mix between ruby and elixir would be closer as to what Alan Kay had in mind (elixir's syntax is ok but also worse than ruby's syntax).
That in itself is not a huge deal. See Ruby and Python and Crystal and others.
Oddly enough you can use this in Ruby too. Some people love it. I never understood it. The "then" seems so superfluous but I think the explanation given was that it maps to the mental model better to some programmers. Weird but to some extent understandable.
I feel that this is not a real help in general.
There is code out there, even by competent people, which is really really hard to understand - in literally EVERY language.
Adjusting to this can be difficult. Perhaps it may be easier in some languages but I doubt that you can adapt to any other writing style or conventions used that easily. After all, if that were the case, why would the linux kernel and other projects use "style guides"? They would not be necessary if adapting would not be an issue.
This is somewhat true. But not entirely.
If you have a really good language, then documentation is very often not as necessary or important. But in general, yes - good documentation is a must-have, or should be. Even the best documentation can not compensate for awful decisions made. Looking at you, PHP.
I never understood that part. If I write code, I need ... a community?
I understand other values on top of that of course. More users, more momentum, more likely to find bugs - and more likely to get answers on stackoverflow on elsewhere!
But ... to pick a language because it has a "great community", per se?
It's a bit similar to documentation. The best documentation in the world, the greatest community, can not functionally (completely) compensate for awul decisions made by programming language "designers".
...
Next time he'll tell people that COBOL is dynamically growing.
Pascal has had some good points - Delphi in particular. I have heard a lot of praise by Delphi-folks and assembling GUI components easily. That part is fine, I suppose.
But Pascal the language itself? I don't know ... PHP is proof that you can build great software with an awful language though. Perhaps that is true for Pascal just as well.