18 ms·
Why I use Object Pascal
- s_kilk 9y agoHow do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly? I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.
- tyingq 9y agoDelphi does have some choices in that space. https://github.com/Fr0sT-Brutal/awesome-delphi/blob/master/README.md https://github.com/Fr0sT-Brutal/awesome-delphi/blob/master/R...
- dubst3pp4 9y agoIt is easy to create bindings to the C-libraries you need, see http://wiki.freepascal.org/Creating_bindings_for_C_libraries http://wiki.freepascal.org/Creating_bindings_for_C_libraries. But FreePascal has many native libraries for all kinds of stuff...
- vram22 9y agoI haven't actually tried that, but my guess (even without checking that link) is that you are right, because: 1) C and Pascal are not too different as languages go (in some respects, both being sort of Algol-family languages), and: 2) I remember from earlier Windows API/SDK days that many Windows APIs had signatures/prototypes that went something like "long far pascal", and remember reading in computer magazines and source code listings about Pascal vs. C calling conventions (it may have been something like the order in which function parameters are pushed onto the stack before the call is executed, who cleans up the stack - caller or callee, etc.). https://en.wikipedia.org/wiki/X86_calling_conventions https://en.wikipedia.org/wiki/X86_calling_conventions e.g. see the cdecl vs pascal conventions.
- degobah 9y agoMaybe this answers your question: > But beside this historical excursion, what are the reasons that I use Free Pascal in my personal projects?
- samuell 9y agoIn my experience (talking FreePascal/Lazarus here, as I'm on Linux most of the time), the library situation is not that bad, actually. The standard lib has most of the mundane stuff, and a little github-searching can often find a working version of more specific stuff (like SSH2 which I needed recently). To the contrary, in some areas (like GUI tooling) it is far far beyond newer alternatives like Go. Also, I think the higher level of the language than C/C++ etc can make it easier to develop your own solution, should you have to.
- s_kilk 9y agoThat's cool, this thread has definitely piqued my interest in Pascal!
- oneweekwonder 9y agoWe needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunCommand('curl',['https://ifconfig.co' https://ifconfig.co'],s, opt)` clutch with curl.exe(with licence file) bundled into my innosetup file... magic?!
- badsectoracula 9y agoFYI Free Pascal (and by extension, Lazarus) comes with fcl-web which contains, among others, an HTTP client. See: http://wiki.lazarus.freepascal.org/fphttpclient http://wiki.lazarus.freepascal.org/fphttpclient
- oneweekwonder 9y agoThanks this is the kind of info I needed. Only had a day in laz land and time was running out for my product. So had to cut corners. #TODO
- conductor 9y agolibcurl (with examples) is bundled in the FreePascal distribution, as well as simpler alternatives like fphttp, fphttpclient, fphttpwebclient, etc.
- Joeri 9y agoIt depends on what you’re trying to do. In delphi you get a huge class library out of the box, and mostly you don’t need much else. There’s also still much third party stuff around the web from its glory years. The tricky part is interfacing with new external systems, and there it’s usually a matter of calling into a C library, which is easy to do. I’ve found PHP to be trickier actually, because if there’s no extension to connect to the system you want, you don’t have a real fallback plan except writing your own extension in C.
- mbrock 9y agoIt's not a full answer to your question but I've sometimes found creative solutions to avoid FFI or ports. A good example I saw was someone who wanted to draw some 3D things generated in an obscure language without GL bindings, so they made a small external program in another language that took textual GL commands on stdin.
- krylon 9y agoAt work, I maintain an in-house application written in Delphi/ObjectPascal. In my case I do not need anything beyond what is supplied by the environment. The UI library is part of the environment, so is the database interface, ... basically, that is all the application needs. Generally speaking, applications that basically are a UI on top of a relational database probably don't need any external libraries. And those are, uh, abundant. Also, calling libraries written in C/C++ is possible, too.
- StillBored 9y agoI don't know about Object Pascal to C++, but calling C libraries is a no-brainier. There is a bit of a definition wrapping, and then the C library looks like a pascal one, and unlike most interpreted/JIT/GC/etc languages where the programmer or wrapper has to jump through hoops to transform the data structures to match an in memory C structure, pascal just goes ahead and uses the same datastructure. This yields a far more transparent/efficient interface. Even pascal strings degrade to C strings by skipping the size header, and assuring they are null terminated before calling the C libraries.
- pjmlp 9y agoIn Delphi is quite easy if you make use of C++ Builder, since they share parts of the tooling. With another C++ compiler on Windows, COM is a better approach. Anywhere else than the usual plain C like APIs.
- Koshkin 9y agoCuriously enough, C still has native means to call Pascal functions. At least in the past, the interoperability between languages was taken very seriously, because the industry used to abhor the idea of having to rewrite things just because of the need to use a different language (e.g. PL/I instead of Fortran); the object module format was designed to be language-independent. As computers became faster much of software development switched to interpreted and VM-based languages, and language interoperability became a problem.
- pjmlp 9y agoThis is visible in the surviving IBM and Unisys mainframes.
- programmer_dude 9y agoBecause you are a dinosaur.
- sctb 9y agoPlease don't post this lame snark here. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- baldfat 9y agoTurbo Pascal and Forth were my first languages past Assembly on C64. They were so much better then Basic and Assembly for a young teenagers. Delphi is now $1,200 to $4,400 a user!!! WOW more then the $75 in 1983 https://www.embarcadero.com/app-development-tools-store/delphi https://www.embarcadero.com/app-development-tools-store/delp...
- dubst3pp4 9y agoCurrently I'm learning Forth and I really like that language! It's a brain twist and that's reason enough to have a look at :-)
- stevekemp 9y agoI've never done anything serious in Forth, but I was first exposed to it in the late 80s, and keep coming back to it. Over the past couple of years I've written, and thrown away, several implementations of Forth in C, C++, and Perl. I've even had it running, embedded, on ESP8266 devices. It continues to be something I enjoy toying with, but equally something I can't find a perfect use for.
- baldfat 9y agoGive it a try in Racket. Racket's macros is a dream to create another language in.
- gaius 9y agoForth is one of the first things I install on a new machine, I love tinkering with it and it seems to me to be the "right" way to do computing... but I have yet to write a useful program in it...
- jetti 9y agoTHere is a crippled version of Delphi that is free but limit is only targeting 32 Bit Windows. That may be enough for some but not if you wanted to do cross platform (which is what Emberacardo is providing now).
- 9y ago
- ckok 9y agoYeah I've written compilers for Swift, C#, Java, JavaScript and Pascal and agree Pascal is the cleanest and nicest language, both on the parsing side and writing in.
- frik 9y agoPascal language has a LL(1) grammar, typical for Wirth and other 1980s work. LL(1) grammars are of great practical interest, as parsers for these grammars are easy to construct, and many computer languages are designed to be LL(1) for this reason.
- ckok 9y agoI always hand write them but yeah. LL(1) is always nice
- i_feel_great 9y agoIs this why Ada's syntax was extended from Pascal?
- dehef 9y agoIn my university (in Paris) we used to learn programming that way for the licence degree 1st year -> pascal only 2nd year -> c only 3d year -> java only That was a very nice learning curve for the core course of programming.
- odiroot 9y agoThis really funny or strange. This is exactly how IT classes went in my high school. Uni was really scattered though: Java, C++, C, Prolog, Python.
- wiz21c 9y agoPascal is definitely a very good language for teaching the basic of procedural/imperative programming. It has several good properties : it teaches you structured data (which helps to understand formalization), is strongly typed (which helps to reduce the uncertainty about the behavior of a program which in turn helps student to understand what they do precisely); you don't have to face pointers (which in my own experience are tough to understand); etc.
- ckok 9y agoBut when you need them, pointers are there
- wiz21c 9y agoAh maybe I'm a bit orthodox here :-) But you're right. At least in Turbo Pascal, there were pointers and super nice in line assembly language.
- mixmastamyk 9y agoI learned pointers in my first semester of CS with ^Pascal, and glad I did because the syntax was more readable.
- feiss 9y agoyeah in Spain it was pretty much the same (almost 20 years ago), touching others just a bit (haskel, prolog, etc.)
- V-2 9y ago"You can also define your own types", "classes can also inherit other classes", "Pascal is modular"... Not to say these are not valid reasons, or expectations one may have from a language, but - what exactly is Pascal being compared to? I mean, it's 2017.
- oblio 9y agoWell, C is still top-5 in all the programming language rankings I've ever seen, so... :)
- V-2 9y agoOK, but "it's not C" doesn't really make Pascal stand out ;)
- leledumbo 9y agoC has its root buried deep in programming world. A lot of things were written in C, big things, that people don't want to touch but they have to use. It's no longer as popular as, say 5 years ago. Along with Java, the popularity is being decentralized as communities of other languages get stronger (including Pascal).
- TremendousJudge 9y agoneither javascript nor C++ are modular in 2017
- mdhughes 9y agoC has no classes, and everything's in one global namespace. Scheme & LISP have no built-in classes, and one can argue that CLOS isn't what we normally describe as OOP. Both normally have a global namespace. Inheritance in JavaScript is possible but very hard to implement correctly before ES6. Node has namespaces (sort of) but client-side JavaScript generally doesn't. PHP in theory has namespaces, but the standard libraries are just dumped in global.
- pulse7 9y agoUltibo - the barebone unikernel OS for Raspberry Pi - is written completelly in Object Pascal... it's source code is >>much<< easier to read than C counterparts (see https://ultibo.org https://ultibo.org).
- aswanson 9y agoWhat caused pascal to lose out to C? Seems like it was a good language that had developer uptake.
- jhbadger 9y ago1) The popularity of UNIX where C was the standard language 2) The fact that, much like BASIC, most implementations of the language didn't follow the standard. In practice, Turbo Pascal was more of a standard than the official one.
- detaro 9y agoWasn't the latter part just as true for early C?
- jhbadger 9y agoThere certainly were/are differences across platforms in C (hence config scripts), but for the most part those aren't issues with the language itself but with the supplied libraries.
- pjmlp 9y agoOh the joys of writing portable code across Aix, HP-UX, Solaris using their own compilers, using a mix of K&R and ANSI C. Many computers just had something like Small-C available.
- AnimalMuppet 9y agoEven using GCC it could be a problem. Aix would want a different type for this function call, Solaris for that function call, Linux for this other function call. We had #ifdefs around a lot of variable declarations. Fortunately, we were at least all ANSI.
- rpeden 9y agoIt was more than just the popularity of Unix. A while back, I ended up following a link on HN and reading a bunch of old computer magazines. I came across an article by Peter Norton (in PC Magazine) from around 1986 or 87. In it, he discussed why C was rapidly displacing Pascal among DOS programmers. Not that Unix didn't have an effect, but as DOS and then windows exploded in popularity in the 80s, C displacing Pascal there played a big role in Pascal's overall decline vs C. edit: I think this is the article I'm thinking of: https://books.google.ca/books?id=NZrPkWywRXgC&pg=PA75&lpg=PA75#v=onepage&q&f=false https://books.google.ca/books?id=NZrPkWywRXgC&pg=PA75&lpg=PA...
- krylon 9y agoI feel kind of sheepish to admit that "Why Pascal is not my favorite programming language" had a huge impact on me and caused me to avoid Pascal until I was forced to deal with it because a coworker quit and dropped maintenance of an in-house application in my lap. I was happy to realize that most of the criticism in that essay no longer applies to relatively recent versions of the language/IDE (Delphi 7 in my case). One huge advantage if Pascal is that it is very easy to read; the code does not look or feel pretty, but it is so easy to read I could get an idea of what was going on without any prior knowledge of Pascal within a few hours. Keywords not being case-sensitive felt weird at first, but one gets used to it very quickly.
- pjmlp 9y agoMost of that criticism was already wrong when compared against Turbo Pascal 6.0 on MS-DOS (the 7.0 major improvement was DOS extender support).
- kylecordes 9y agoDelphi 7 was released in August 2002 (at least according to the Wikipedia page), over 15 years ago. It's hard to think of this as relatively recent.
- sizzzzlerz 9y agoHopefully, it has changed but, when I was learning Pascal many years ago, an entire program had to be contained within a single file. No separate compilation files and no linker. For all but toy programs, this made for some very long files which, given the state of editors then, made maintenance a real problem.
- pjmlp 9y agoThat was only true in toy Pascal compilers. Any Pascal compiler for production code supported some kind of modules/units.
- detaro 9y agoyes, this changed around 30 years ago.
- psykotic 9y agoUCSD Pascal had separate compilation units (late 1970s). A lot of people from my generation got started with Turbo Pascal and it had units based on UCSD Pascal starting in TP 4.
- howard941 9y agoOMFG this brings back memories, like the promise of a processor that executed p-code. Good times.
- Zablus 9y agoPrograms can be separated into thousands of source files (aka "units") for ages. Maybe your teacher didn't tell you about this to avoid confusion ;-)
- mdhughes 9y agoI've lately been trying out FreePascal for building my indie games (which have in the past been in C, Python, Java, Objective-C, and finally JavaScript), and it's going well enough. There's certainly room for improvement, and the Lazarus IDE is not at all to my taste, but it's likely to be my next-ten-years language. https://mdhughes.tech/2017/09/02/pascal/ https://mdhughes.tech/2017/09/02/pascal/ and a couple of followup posts https://mdhughes.tech/category/pascal/ https://mdhughes.tech/category/pascal/
- Zablus 9y agoIf you don't rely on the presence of a form designer then you might want to use Visual Studio Code with the OmniPascal plugin (http://www.omnipascal.com http://www.omnipascal.com) as a replacement for the Lazarus code editor.
- oneweekwonder 9y agoI was a lot younger and got it working on delphi7 but look at glscene[0]. It really changed how I view OOP and GL, amazing framework for its time... [0]: http://wiki.lazarus.freepascal.org/GLScene http://wiki.lazarus.freepascal.org/GLScene
- wila 9y agoAlso love GLScene, used it for building a 3D STL activex viewer control and that was not as hard as expected.
- j_s 9y agoAny early feedback on mobile?
- mdhughes 9y agoHaven't tried it yet, once I get desktop tech demo stable (hopefully this month, barring work & laziness) and can see it run on non-Macs, mobile's the next target. No idea how I'll test Android, I'm a Mac and iOS guy, and years ago when I tried the Android IDE the emulator was appalling.
- partycoder 9y agoPascal and C are very close to each other as they implement the same programming paradigms. Haven't tried Object Pascal but I assume it extends Pascal with OOP and some other stuff... while still being the same imperative/structured/object oriented combination we all know. If you are coming from C, it should be like moving from Python to Ruby, or Java to C# or viceversa... same paradigms for the most part.
- pjmlp 9y agoI loved Turbo Pascal and Delphi, which is why I having Java and .NET compile into bytecode always felt a bit of deception.
- ckok 9y agoWhat makes bytecode a deception though?
- pjmlp 9y agoIf Java and .NET produced executables like C and C++, there would be less need for them. Instead, one is forced to deliver the VM with the application or buy a third party AOT compiler like Excelsior JET, while depending on another language for implementation. This made everyone that cared about writing native executables focus on C and C++, with the respective increase in unsafe code. This is finally changing thanks to D, Go, Swift, Rust, but slowly. So we have .NET Native on UWP, Xamarin on iOS and Android and IL2CPP on Unity. Java now started a long road that will take several years until Project Metropolis will finally deliver some kind of results.
- s_kilk 9y ago> This is finally changing thanks to D, Go, Swift, Rust, but slowly. This whole thread has me imagining what it would be like if all the energy that went into Go/D/etc had gone into Free Pascal instead. Imagine if Free Pascal had a swanky website, and an army of people blogging about this hip, powerful language, all the kids are getting on board, I heard Netflix are re-writing their routing layer in Object Pascal, have you seen the benchmarks for this awesome new non-blocking Pascal web server...
- pjmlp 9y agoI did enjoy Pascal a lot, but right now it lost the PR battle. Its spirit leaves on in languages like Rust, Swift, Kotlin and similar. It is easier to drive adoption to those languages, than try to convince younger devs to use Pascal, even with a swanky site. I like your idea, though.
- oneweekwonder 9y agoSomething I wonder how will one get object pascal work? The worst part is I would like to be picky and only to fpc/lazarus dev, no delphi. Otherwise I need to stick to selling my python/flask, html5 fizz buzz.
- oneweekwonder 9y agoWhile the author mentions castle-engine at the end I also want to mention glscene[0]. Don't think it is actively maintained like castle. But boy was it amazing to read through the code to learn OOP principles and GL. [0]: http://wiki.lazarus.freepascal.org/GLScene http://wiki.lazarus.freepascal.org/GLScene
- coldcode 9y agoWeird anyone still uses this, I first saw Object Pascal on a Apple Lisa in 1983.
- badsectoracula 9y agoFWIW Apple's Object Pascal and modern Object Pascal have little common. Although i think Free Pascal does have a Mac Pascal mode so that it can understand Apple's Object Pascal dialect.
- jetti 9y agoFrom what I've read Object Pascal is just another name for Delphi but without the trademark hassle.
- oneweekwonder 9y agoNo need to speculate[0]. The name "object pascal" was firstly used by apple for their dialect of pascal. Then Borland came and evolved Turbo Pascal into Object Pascal(and brand it Delphi) and then fpc came and branded them a open source object pascal implementation. As for Pascal vs Object Pascal, Procedural vs OOP, Think C vs C++(not that I'm saying c++ is better). [0]: https://en.wikipedia.org/wiki/Object_Pascal https://en.wikipedia.org/wiki/Object_Pascal
- jetti 9y agoFrom the wikipedia article: "Borland used the name Object Pascal for the programming language in the first versions of Delphi, but later renamed it to the Delphi programming language. However, compilers that claim to be compatible with Object Pascal are often trying to be compatible with Delphi source code.[citation needed] Because Delphi is trademarked, compatible compilers continued using the name Object Pascal" You're still right that Object Pascal can encompass more than just Delphi.
- hvs 9y agoI used Delphi (1) to Delphi 5 in the 90's and used Delphi at a company for production software from 1998-2001. I loved it. It was (?) a great language and was always a pleasure to work in. I'm not a language fundamentalist (I use whatever it takes to get the job done and whatever my employer prefers), but I can say that at least 16 years ago it was a joy to work in.
- thriftwy 9y agoTo my limited experience, everything Pascal had of its own is unusable. Everything usable in the language comes imported from C. However I can see how one would prefer Object Pascal over C++.
- jetti 9y agoI've tried picking up Free Pascal and, for me, the documentation is lacking. I come from C# where Microsoft has amazing documentation and small examples on how to use just about every single class in the .NET framework. I guess I'm just spoiled with the documentation I have had and need to get used to it.
- bitL 9y agoBorland/Delphi set the standard for documentation that MS then copied to .NET (no wonder Delphi and C# creator is the same person). FPC likely assumes you have access to Delphi help files.
- dubst3pp4 9y agoDid you have a look at https://www.freepascal.org/docs.var https://www.freepascal.org/docs.var and especially at the RTL https://www.freepascal.org/docs-html/current/rtl/index.html https://www.freepascal.org/docs-html/current/rtl/index.html and FCL https://www.freepascal.org/docs-html/current/fcl/index.html https://www.freepascal.org/docs-html/current/fcl/index.html documentation? I think the Free Pascal team has done a good job documenting nearly everything!
- PaulHoule 9y agoI loved Turbo Pascal back in the day, thought it was better than C when I was working with DOS. I switched to C when I started working on Unix workstations.
- j_s 9y agoI believe the toolchain offers the best cross-platform GUI option right now. In the best case this can serve as a wake-up call to other languages: get your GUI house in order!
- jdhawk 9y agoEveryone is (sadly) switching to Electron for this purpose.
- tekacs 9y agoFolks interested in Object Pascal might also be interested in http://www.elementscompiler.com/elements/oxygene/ http://www.elementscompiler.com/elements/oxygene/ (no affiliation, but as an observer it seems relevant and interesting).
- ckok 9y agoI am obviously biased, thanks for mentioning it :)
- StillBored 9y agoAs I get older, I'm strongly swinging into the camp that thinks languages should have strongly restrictive syntax. Object pascal is one of those languages which is both low level enough to cleanly map to efficient code, as well as high level enough not to feel really restrictive. Its a language that is completely misunderstood because far to many people read a couple critical essays, and believed everything they read, even though the strongest argument frequently was that its harder to type "begin/end" than "{/}". Which is a pretty lame thing, given code completion in editors as old as emacs. Put another way, the thought patterns programmers fall into when using it seem to result in code which is easier to understand than most other languages which seem to encourage "perlism" (creating a single unreadable line), "forthism" (creating a billion two line words that combine to solve all the problems in one word), or a few other things which become completely unmaintainable when the project grows beyond what can be written by a over-energetic student in a semester at school.
- pjmlp 9y agoRegarding those essays, I consider myself lucky to have learned and used Pascal and Basic compilers before learning C. Then I just had fun showing to disbelivers how to do in TP stuff that apparently only C was capable of.
- vram22 9y ago>given code completion in editors as old as emacs. Good point. Even vi (before vim) had/has the abbr(eviation) command which can be used for things like expanding say bg into begin and so on. Plus, typing time is not the biggest part of programming time, not by a long chalk, though of course improving typing productivity can help some with overall programming productivity. Also, others have said in maybe this thread as well as other places, that Pascal's unambiguous syntax is one reason for the high compilation speed of Pascal compilers - which again aids overall productivity. [Used both Turbo Pascal and C a lot.]
- wainstead 9y ago> even though the strongest argument frequently was that its harder to type "begin/end" than "{/}". Which is a pretty lame thing and it's not too different from Ruby, to boot.
- gwbas1c 9y agoI know C# borrowed heavily from Pascal. (So much that a lot of its improvements over Java were overlooked.) What's the advantage of using Pascal over C# or Java? Is it that Pascal outputs true compiled programs instead of requiring a VM?
- antaviana 9y agoYes, it compiles native code, typically in a standalone .exe file, avoiding the framework dependency hell. Another advantadge is that it compiles very fast (several orders of magnitude faster than C# (or C++)), so it's convenient.
- mmargerum 9y agoMakes sense since Anders H. architected c#, turbo pascal, and Delphi. As soon as he left Borland, Delphi began to atrophy. Too bad because it was a ground breaking product when it came out.
- int_19h 9y agoC# borrowed heavily from Delphi - i.e. the Object Pascal bits. Explicit virtual/override, properties, that sort of stuff. The class library, especially WinForms, also borrowed heavily from VCL. But I don't think there are any notable borrowings from core Pascal.
- SmallDeadGuy 9y agoSome fun I had with free pascal in college was that you can $DEFINE almost anything to almost anything else: {$DEFINE (:=ab} {$DEFINE ):=ba} ...etc... Code becomes pretty ridiculous: WriteLn ab ab a + b ba * c ba If you define WriteLn, +, and * as other things too you can get horrific looking code. All keywords like program, if, then, and end can be redefined. I wrote a script that would take a regular source file and output a functionally identical file which looked like: {$DEFINE program:=a} ... many more defines ... {$DEFINE [:=zd} {$DEFINE ]:=ze} a b c d e f g h (* ... the entire program on one obfuscated line *)
- thanatropism 9y agoTCL is arguably more extreme in this matter.
- boznz 9y agoWow, using pascal for 30 years and diddnt know this.. I am actually thankful its not that well known. Pascal is still readable where as #defines in C libraries give me terrible headaches decoding.
- dmix 9y agoHow are the available packages? Is there a package management system ala `bundler` or `npm`? This to me is a critical piece of adopting a language, especially a non-mainstream one. Pascal has the benefit of being older but access to clean modern libraries is critical. Pascal looks like an excellent option for building cross-platform desktop apps, given the excellent GUI libraries. But I doubt I'm sold enough on it for any web stuff, given the great other options. I'd likely use OCaml if I was going to gamble on a non-mainstream language.
- rufusroflpunch 9y agoThis is a pretty critical piece for me as well. I've done some googling and I can't find anything definitive.
- dubst3pp4 9y agoLazarus has a concept of packages for years. There is a newly created package manager to handle updates and dependencies as well: http://wiki.freepascal.org/Online_Package_Manager http://wiki.freepascal.org/Online_Package_Manager But I don’t think that it is comparable to gem/npm or whatever yet...
- _pdp_ 9y agoMy dad still runs his business on a software I wrote in 1998 in Delphi. I haven't touched it since then but it is the only code I have that still works 19 years later.
- slig 9y agoDoes it runs on modern Windows or is it running on a VM?
- narag 9y agoIt could very well work without VM. Current Windows is binary compatible with old programs. There are a few reasons that programs stop working and most of them are related to hardcoded directories that got perm. restrictions over the years.
- _pdp_ 9y agoWindow 7/8 at the moment I think.
- Joeri 9y agoI sometimes use ecco pro on windows 10, which was discontinued in 1997. The 32-bit version still works well enough to remain usable.
- igivanov 9y agoI have a large codebase in Delphi 5 (1999), still being maintained and developed. The applications produced work on all current Windows versions w/o problems. Delphi itself works on Windows 10 albeit requires some tricks to install properly.
- boznz 9y agoI have a turbo pascal game from the 80s that still sort-of-works on the command box of windows 10. Unfortunately it starts, does a demo loop in which all the pacmen get eaten then exits, all within about a second. I thought it was broke for many years until I found a way of slowing dosbox right down to look for an error message and did not find one :-) Shame I havent got the source code. I also wrote an 8051 assembler and compiler again executable (com) file only but I havent looked at this for a while as its still on a 5.25" floppy... Ahhh memories!
- pcunite 9y agoI wrote the first version of Outlook Profiler in Delphi 6, then in Delphi 7. Wonderful introductory language for making products (although Perl was my first exposure). The VCL GUI library and IDE work so well together that things today are second rate. Strange that we've not improved this basic need. Today, I write most things in C++ (or C# if I can).
- ido 9y agoI always felt it’s really strange that making a quick and dirty GUI application is still easier with Visual Basic 4.0 (circa 1995) than with most any modern tool.
- meredydd 9y agoI'd like to see what you think of https://anvil.works https://anvil.works It's deliberately built in the Delphi/Visual Basic tradition, and trying to carry those virtues onto the modern web.
- ido 9y agointeresting, thanks for the tip!
- alyandon 9y agoVB4 was also able to produce both 16 bit and 32 bit binaries. That was a big help for the Windows 3.11 -> Windows 95 transition.
- Lewton 9y agoMost of the points are all well and good (albeit underwhelming) but >This is maybe the fact, that most developers are annoyed about: the absence of braces and the very verbose syntax of the language. As an example, instead of opening and closing braces, Pascal uses the begin and end keywords for blocks. The if keyword is complemented by the word then. As you can see, the whole syntax is readable like plain English. If you start to cry now, you should consider one important question by yourself: What is more important? The ability to have a short syntax to write code fast or the possibility to read and understand code that was written by other developers or even by you a year ago? I’m in favour of the second fact and I really enjoy that verboseness. You don't make code more readable by adding more noise. BEGIN and END is just plain noise BEGIN And how exactly does this make code "readable like plain English?" END
- astrodust 9y agoEnglish is great but for all the "noise". Why is "the" a three letter word and not something more concise like "le" or "a"? Why is it "and" and not a single-letter "y" like any sensible language? You get used to the syntax, and after a while it becomes invisible.
- _dcwr 9y agoMy first language in high school was actually Pascal (as in - Delphi) but now I love C, C++, Lua and Python and barely can write Pascal at all, especially since it's so separate from the C inspired syntaxes and semantics. For job reasons I'll also probably learn something 'proper', mainstream, industrial, etc., but not relearn Pascal. But for trolling, having fun or some private GUI work (especially that, thanks to Lazarus) it's just great. When I got to university they (the university, not the high school, no idea about them) dropped it from the curriculum so my Pascal skill makes me quite unique in that sense. I only used it once or so during university to troll one doctor leading a class, an old homework grading system still had Pascal available in it in addition to C and C++ so I submitted a Pascal program. In a twist of irony the next class after that assignment was led by another person, a really smart professor who usually teaches in Warsaw who also happened to be quite a good sport about jokes and such, who quickly sarcastically remarked to my Pascal program: we've got a connaisseur in here. And this whole joke was actually in response to story the person usually leading that class told, about how once during a competitive coding competition (allowing C, C++ and Pascal) where everyone was using C or C++ he was first to submit a correct program and it was in Pascal to which the live judges commented that Pascal is making a grand return, since even back then it was on its way out. Recently I picked it up again when I needed to do something quite graphical for statistics class on a short notice that would be dealing with graphs and I didn't want to fight Qt, GTK+, HTML5 or whatever into submission and having recently discovered Lazarus I knew it can do it. I quickly whipped up the program, the graphing components were great with API and all but were poorly documented (or not at all). Sadly there were no funny comments from the doctor on that one. Part of using Pascal for anything at all or even knowing it is actually the funny comments and reactions of others. Some people seem to think Pascal is properly dead, as in - no longer usable, no longer worked on, no longer coded in, at all. Like COBOL or something but with no 'old bank software' and such to save it. When looking for a job I actually even forgot to put Pascal on my CV as being one of my 'very weak' skills but I imagine it didn't hurt my chances... I even share the first name with Blaise Pascal (the French mathematician the language was named for) so that makes my use of Pascal even more appropriate and allows for even more jokes. After that I also did few UVA[0] tasks but sadly Pascal seems to be broken for many tasks so I gave up (I get an error saying 'mv failed: program.pas and program.pas are the same file'). Later, to not waste and forget what I relearned for the graph program homework and since GUI in Lazarus is so easy to do, I also (shameless plug) wrote a notes program[1] for myself and it was a breeze thanks to Lazarus and the LCL components. Now I use that program daily for my various notes, todos, etc. [0] http://uva.onlinejudge.org/ http://uva.onlinejudge.org/ [1] https://news.ycombinator.com/item?id=15436840 https://news.ycombinator.com/item?id=15436840
- idlewan 9y agoThe Nim language [0] feels very inspired by Pascal while looking like Python. If you're interested in fast, compiled & typed languages, I suggest you also take a look at it. I personally love its readability. [0]: https://nim-lang.org/ https://nim-lang.org/
- justin66 9y agoI'm curious what's similar to pascal about it? It's garbage collected, it compiles to C or JavaScript, and its syntax is inspired by Python, so I just wonder what is left.
- dmux 9y agoFrom https://nim-lang.org/features.html https://nim-lang.org/features.html: > Oberon-inspired visibility markers > Pascal-inspired type sections for leaner definitions While Oberon isn't Pascal, they're both Wirth languages that share many commonalities.
- nikolay 9y agoA huge chunk of my career has been programming in Turbo Pascal and Borland Pascal for Windows. I miss those days!
- seabrookmx 9y agoAll of the arguments given for Object Pascal in this article could apply to other languages. A better question might be "why use Object Pascal over Language X"? I could see a niche in cross-platform desktop development, assuming you didn't want to go the Electron route (and there's valid reasons for doing so). I've worked in Qt quite a bit in my desktop days and Qt/C++ is quite complex. Object Pascal still has manual memory management though, IIRC, which is a large portion of that complexity.
- emodendroket 9y agoYeah, I don't have the sense from reading this that I have any idea why I'd prefer Pascal over, say, Java, or C#, unless I liked begin and end blocks more than braces and felt really strongly about it.
- st3fan 9y agoTHINK Pascal
- noonespecial 9y agoThe default setup for the industrial control systems I've had to work on is Windows2000 with Delphi applications. There are a shocking number of these systems still in use today. I've come to have a grudging admiration for these clunky old things and a special respect for pascal in its many forms.
- Mikeb85 9y agoAnyone who likes Pascal should check out Nim. Inspired by Pascal, with some Python-like syntax (and significant whitespace), as well as some really cool features from other languages. Also compiles to blazing fast binaries via C or C++ (JavaScript too but not sure about the performance there).
- _pdp_ 9y agoApollo Computer used Pascal as the systems programming language for its operating systems beginning in 1980. Variants of Pascal have also frequently been used for everything from research projects to PC games and embedded systems. https://en.wikipedia.org/wiki/Pascal_(programming_language) https://en.wikipedia.org/wiki/Pascal_(programming_language)
- luizb 9y agoRe: Because I can't learn any other language
- i_feel_great 9y agoAnyone here used PascalScript[0], specifically with compiled Pascal itself? I am planning an application that is compiled and delivered with PascalScript to allow the end user to extend and customise the application without access to the source code. Preferrably using FreePascal. [0]http://www.remobjects.com/ps.aspx http://www.remobjects.com/ps.aspx
- a76 9y agoI just what to thank the author of the article. I am from the camp of those who had this misunderstanding of thinking that Pascal is only a "toy language" to be studied at school or university and the articles gave clear proofs it's not. I'm not going to switch to Pascal now or explore the question more deeply; it was just an important thing for me to learn.
- dubst3pp4 9y agoThank you, this really encourages me after all that discussion! :-)