5 ms·
the greatest difference btw Pascal and C++ is developer experience. Pascal uses a single-pass LL(1) compiler, which allows you to compile in milliseconds. Pasc
by slt2021 3y ago
the greatest difference btw Pascal and C++ is developer experience.
Pascal uses a single-pass LL(1) compiler, which allows you to compile in milliseconds. Pascal enables REPL-like experience where you can Edit->Compile->Run in less than a second.
C/C++ with macros and slower compilation times is worse developer experience, at least it was the reason for me to learn Pascal instead of C and Delphi instead of C++
- weinzierl 3y agoJust to add more context: Niklaus Wirth's foresight was to design Pascal's syntax to allow a single-pass compile. But it took more than 15 years until we actually had a blazingly fast single-pass compiler and that is totally Anders Hejlsberg's merit.
- musicale 3y agoEvery so often a thread pops up about Turbo Pascal and I'm astonished as to how nice an IDE you could fit onto a 64K CP/M system. (See also comments above/below.)
- weinzierl 3y agoOh, it was very very nice. I still miss it today sometimes. Here are a few highlights: - Pressing F1 gave you reliably context sensitive help and the help content was really well put together. - The debugger was great and was basically what we now know from Eclipse or IntelliJ and completely not like gdb. It had the same keyboard shortcuts for stepping as IntelliJ still has today. - Computers in the 90s really did not support more than one display, but there was a weird trick that allowed you to connect one color and one monochrome monitor. Turbo Pascal fully supported that and could display the app on the color display while you saw the debugger on the monochrome one. This was before Windows and GUIs, everything was fullscreen. Without that there was no way to see debugger and app at the same time. - The editor was so good that I preferred it over a word processor even for writing prose.
- Andrew_nenakhov 3y agoThe best thing about built-in help was that it not only contained documentation of a function, but usually a short example code. That was extremely helpful and I relied on it a lot.
- virgulino 3y agoBack in the days of Turbo Pascal 5.5 I had a secondary monitor, a monochrome orange phosphor, connected to an EGA card, I think. The main screen was VGA. Two monitors provided a huge productivity gain, with common and cheap hardware, and it was super cool. Turbo Pascal was the only software I used that could display on the second monitor. Sometimes I miss seeing everything in orange.
- weinzierl 3y agoI had a VGA and a Hercules card and it's probably hard to relay how super cool that was at a time and in an environment where computers alone were pure magic to most people. Then there were these kids, like us, that could not only use these magic programs but could control and manipulate them from a second screen:-)
- agumonkey 3y agoTP IDE was indeed magical. Except for one pain point, from an emacs user POV, no extensibility. You can't tweak the ergonomics so you're stuck with what the devs put in. It was 99% perfect but that broke me out of it.
- agumonkey 3y agoMy memory is fuzzy, but even before Hejlsberg magic, Wirth parser was a light and fast (but maybe unreadable) hand coded piece of code.
- Rochus 3y ago> Pascal uses a single-pass LL(1) No longer the case with the Pascal version used by the game engine.
- slt2021 3y agowhich Pascal compiler is it - Embarcadero or FPC?
- Rochus 3y agoIt's the language itself; I currently build a parser for FP 3.2.2 and I need more look-ahead than LL(1) in different parts of the syntax. And it has features which require more than one pass.
- wruza 3y agoOne thing this thread seems to forget, Pascal sources do not include literal kilometers of headers compared to C++, and there’s no code in Interface sections either. Every C++ translation unit explodes into a full set of libs at preprocessing phase. One pass or LL(1) is just a cool bonus compared to that.
- Rochus 3y agoDelphi and FreePascal have compiler directives and include files quite similar to C, and it's commonly used e.g. in the FP source tree, albeit to a lesser extent than in a typical C/C++ project.