4 ms·
But why. I don't understand why you'd use Pascal today when you could use C++. I jumped over 25 years ago and never missed Pascal the language, only the Turbo P
by alayne 10y ago
But why. I don't understand why you'd use Pascal today when you could use C++. I jumped over 25 years ago and never missed Pascal the language, only the Turbo Pascal development environment. Many languages later I still have never wanted to go back and write in any Pascal variant. It's a verbose, weak, and inexpressive language.
- visarga 10y agoI agree about the IDE of Turbo Pascal, but Delphi 1.0 was pretty RAD too. Only thing I don't like about Pascal of 20 years ago was the lack of proper lists and dictionaries, and the tedium of writing long keywords like begin and end all over the place.
- ViktorasM 10y agoAh, the days when I typed "begin" and "end" at the speed of puting a curly brace. Don't actually feeling the need to go back though. It's not about language properties anymore, but the library ecosystem. I hated when anything useful in Delphi was a C dll port. You're never a first class citizen.
- leledumbo 10y agoGood to know that many things are native Pascal nowadays, even some great Pascal people choose to either write from scratch or native porting instead of writing wrappers. Personally I don't mind using wrappers, but having native Pascal counterpart is better in the long run since no 3rd party implementation dependency required, things can be fixed and improved right away.
- clouddrover 10y ago> I don't understand why you'd use Pascal today when you could use C++. Here are some "whys": 1. https://news.ycombinator.com/item?id=11005203 https://news.ycombinator.com/item?id=11005203 2. http://ian.hixie.ch/programming/ http://ian.hixie.ch/programming/ 3. http://ziotom78.blogspot.com/2015/01/lfi-data-analysis-with-fpc.html http://ziotom78.blogspot.com/2015/01/lfi-data-analysis-with-... 4. http://freepascal.org/advantage.var http://freepascal.org/advantage.var 5. https://www.embarcadero.com/products/delphi/features https://www.embarcadero.com/products/delphi/features Object Pascal has changed a lot in the last 25 years. You should check out modern Object Pascal. It's pretty nice.
- badsectoracula 10y agoA note about the second link's table: Free Pascal since version 3.0 does have native unicode support. In fact it has native support for any encoding and it does on-the-fly conversions between different encodings without the programmer having to pay any special attention (but you can use different string types, such as utf8string, if you want the in-memory data to be in a specific encoding).
- unscaled 10y agoC++ has also had native unicode support for a while now (made standard in C++11). The table complains that indexing is byte-based, but that's arguably better than the deceptive UTF-16 based indexing many languages have, since UTF-16 code units are not equivalent to unicode code points. Even UTF-32 code points are not equivalent to composed characters or visible gylphs, so character-based indexing makes very little sense unless you're using a Unicode-specific library. I also wonder why C++ is claimed to have no instance function pointers even though std::bind was available since TR1 and boost::bind was available aeons ago. Did the author confuse C++ style function references with C function pointers? But this is like confusing the C++ std::string (which exist only as a library feature) with C-style char arrays.
- unscaled 10y agoReading through the docs, it was nice seeing that Pascal wasn't sitting still through all the these years. Generics, extension methods (class helpers) and value types - though the last features actually existed way before class, and I've extensively used it back in the day, old style objects are unsafe and were abandoned for a while without being fixed. Too bad that memory management is still tedious and categorically unsafe with all sorts of crazy hacks like a TComponent hierarchy and reference counting that exists only for interface. It was a reasonable trade-off for me back in the days where the best thing C++ had was auto_ptr and a bunch of incompatible vendor specific classes. Nowadays, it's a world I wouldn't want to come back to (or I would happily programming C).
- clouddrover 10y ago
- randcraw 10y agoWhy use Object Pascal over C++? Ack! Thbbt! Compared to any other OOPL, C++ is simply ghastly -- a grossly overcomplex mishmash of hacks in the key of C inspired to repent for the multitude of sins that historically bedeviled C, and have since led to a never ending cascade of ill-fated hacks to shoehorn a nearly 50 year old unsafe high level assembly language into the guise of a modern type safe OOPL. History has since shown this to have been a tragically quixotic quest which inevitably and catastrophically spun wildly out of control, mutating and metastasizing into a disgusting chimeric monster that now strikes fear and loathing into the soul of even the most stouthearted digital denizen, who only when lit by the faint glow of a failing CRT, oft have been heard to admit furtively and only under duress in the faintest of whispers: "Yes. I admit it. I code in C++". Ahem. Anyway, that's why I use Pascal.
- pjmlp 10y agoToday it might not make much sense, given C++, Ada, Rust and a few others are around. But the Turbo Pascal 6.0 from 25 years ago certainly was more expressive, feature rich and safer than C of today. The verbosity of Pascal is welcomed by those that had to maintain programs written by others.
- deleted 10y ago[deleted]
- alayne 10y agoTP6 had 255 byte strings and you couldn't implement your own WriteLn. It seemed like it was still breaking free from academic pascal.
- pjmlp 10y agoIn a world where the applications and OS had to fit under 640KB, I never had a problem with the string sizes. I don't see why anyone would like to implement its own WriteLn. You have the same issue with professional languages and I never saw anyone complaining about it. Also C needs Assembly for its IO library and everyone is ok with it.