6 ms·
Why Object Pascal Is More Than Meets the Eye: Exploring the Power and
- bero1985 4y agoWhy Object Pascal is More Than Meets the Eye: Exploring the Power and Versatility of Delphi and FreePascal
- cc101 4y agoI've been programming for 55 years now. I've seen lots of languages come and go. Object Pascal is my favorite by far. Writing an Object Pascal program is like writing a sonnet. It's difficult but rewarding. A properly written Object Pascal program is a thing of beautiful perfection.
- Rochus 4y ago> Developers should not overlook the benefits of Object Pascal and should give it a fair chance, especially before they create a new programming language, as it unfortunately happened here with Rust. Well, that's a completely different language category. Object Pascal is rather comparable to C++ than to Rust; the latter is more an option for languages with automatic memory management in that the memory management is moved from runtime to compile time, thus e.g. gaining performance.
- moloch-hai 4y agoRust is in the same language space as C++. Object Pascal competes with C.
- Rochus 4y agoDo you consider C an object-oriented language?
- moloch-hai 4y agoO-O enough, usually. O-O does not add much power, by itself. If it had destructors, there would be something to build on.
- Rochus 4y agoYou're joking.
- vladsanchez 4y agoYep, he's a Joker, Delphi/Pascal hater.
- AnimalMuppet 4y agoMaybe not. Destructors are critical to writing (C++-style) OO. If you're taking and releasing resources of any kind (memory, files, semaphores...) then it's destructors or manual management. (Or garbage collection, which solves the 90% of the issue that is memory, and does nothing whatsoever to help with the remaining 10%.) Destructors are a huge game-changer. I don't think GP was joking at all.
- Rochus 4y agoFine, but this is unrelated to the actual argument. Btw. Object Pascal has descructors as well, and destructors by themselves have nothing to do with object-orientation; they can be implemented also in a non-OO language. But C - in contrast to Object Pascal - is definitely not an OO language (not in this nor any other universe); since every child knows this, it must be a joke.
- AnimalMuppet 4y agoAs I read it, the argument was that C was object-oriented "enough" to qualify as OO. (I've done object-oriented C, with function pointers in structs. It works just like virtual functions.) But C has no destructors, and destructors are the difference between "mere" OO and "something you can build on". As I said, that's how I read it. But it could be that your reading was correct...
- Rochus 4y agoYou can do OO programming in assembler, but that doesn't make assembler an OO language; the same applies to C. Therefore C cannot be "O-O enough" by definition, and nobody who knows an OO language can seriously state that "O-O does not add much power".
- _trackno5 4y agoIt's a pity the article doesn't really any Object Pascal code examples. (Turbo) Pascal was the second programming language I learned (starting programming with ActionScript 2.0 to make Flash games) and I remember really enjoying it. I still miss how good it felt to instantly compile code. That was 15 years ago. Looking back, it's funny how my dev experience is not really better than what it was back then.
- torstenvl 4y ago> Object Pascal is often criticized for its syntax, which can be seen as verbose and confusing.... But [don't worry] it has had modern features such as ... inline assembler... I nearly choked on my coffee.
- moloch-hai 4y agoObject Pascal is considered obsolete because it is. Like C, it has failed to evolve to pick up features that would make it usefully powerful.
- nor-and-or-not 4y agoNewsflash! Linux kernel considered obsolete because of its usage of C. But honestly - neither C nor Object Pascal are considered obsolete by folks including me. Some of the most productive people I know write most of their code in Object Pascal. Really big companies still use Object Pascal, even if they could have switched to a different language a long time ago; but they don't. Because Object Pascal is a proper language with a lot of useful features, but without all the bloat. Obsolescence is, when no one is using it any more, not when some people think it is.
- bero1985 4y agoThen just name some features that you think Object Pascal is missing.
- moloch-hai 4y agoTake a quick glance at any modern language. Compare.
- bero1985 4y agoSo you can't give an example and are evading. So I just don't take you seriously anymore until you give an example here. Because this is a typical defensive attitude of those who have no real arguments in the end.
- moloch-hai 4y agoYou want me to write you a list of modern language features? Besides destructors? Namespaces, generics, lambdas, pattern matching, collection literals, destructured bindings, exceptions, sum types, smart pointers, type inference, ... I could go on. You are anyway welcome not to take me, or anyone else you choose, seriously.