What's the advantage of using Pascal over C# or Java? Is it that Pascal outputs true compiled programs instead of requiring a VM?
Why I use Object Pascal
91–100 of 235 posts
Re: Why I use Object Pascal
#92What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.
Pascal was great when you were coloring within the lines, but C was more flexible. I don't think I was ever able to do image processing in Pascal, and I shudder to think what it would take to do a device driver. Pascal was my primary language from about 1980 to 1990, then I transitioned to C and from there to C++. I missed the whole Delphi train.
Re: Why I use Object Pascal
#93I 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?
Another advantadge is that it compiles very fast (several orders of magnitude faster than C# (or C++)), so it's convenient.
Re: Why I use Object Pascal
#94"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.
C 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 lib…
Re: Why I use Object Pascal
#95As 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…
Then I just had fun showing to disbelivers how to do in TP stuff that apparently only C was capable of.
Re: Why I use Object Pascal
#96What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.
Re: Why I use Object Pascal
#97Earlier quoted context omitted.
At 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…
I 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…
With another C++ compiler on Windows, COM is a better approach.
Anywhere else than the usual plain C like APIs.
Re: Why I use Object Pascal
#98How 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.
Curiously 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 softwa…
Re: Why I use Object Pascal
#99I 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).…
I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.
Re: Why I use Object Pascal
#100Earlier quoted context omitted.
1) 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.
It 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 Pasca…
On my area in Portugal, using C was mostly for university projects.
For anything else we were using Turbo Pascal and Assembly, with Clipper for business applications.
Actually many MS-DOS systems programming books had code listings in C, Pascal and Assembly.