Why I use Object Pascal https://dubst3pp4.github.io/post/2017-10-03-why-i-use-object-pascal/
#pascal #programming #article #object_pascal #design
first of all, the article does not mention the most important thing - modules. pascal has modules. modules were introduced to c++ just in 2017. modules are why you can have type checks across boundaries of modules.
and pascal units are modules. if they do those loadable on demand, that would be cooler.
Pascal is very strict, so the programmer has to differ between subroutines that return values, in Pascal called functions, and subroutines that does not return something, called procedures. Functions and procedures can also be passed to variables or other functions thanks to procedural types.
well, in pascal successors the
function keyword removed, leaving just one
procedure, or to be precise
PROCEDURE because Wirth decided to make successor languages case sensitive and decrease the number of lexems.
It is possible to overload operators for specific types. With this feature, you have the power to define, let’s say, the result of the addition operation of two or more instances of the same class.
That’s one of the reasons why Wirth doesn’t like modern pascal implementations. The author tries to say - Pascal has all the features, while Wirth was trying to create a minimalistic language by following “less is more” principle.
Pascal is modular
okay, he said this. but did not connect to the type checks.
Pascal has good documentation
indeed, freepascal.org documentation is good, understandable and comprehensive.
well, for me Pascal today is like ‘better c++’, but why would i need better c++ if i have Oberon?
i will use it to write gui applications, or if i need to write something very fast and i don’t have libraries for Oboren and time to create libraries or bindings.
#pascal #oberon #modula-2 #wirth #design