Does anyone actually use Pascal anymore?

begin
Why would anybody want to use Pascal?
end;

You'll see it in Delphi, anyway, and I'm sure other people still use it. It's unpopular because it is a restrictive language, compared to others.

The main reason Pascal is looked at like it is useless is because it has always had the image of being only for undergraduate students.
Students would learn Pascal, then "graduate" to "real" languages like C and Fortran when they got to graduate work.
They looked forward to those days when working in Pascal because it would mean they were getting near to graduation, then once working in C look down on Pascal because you are meant to look down on undergrad students and everything they do.

When those people entered the marketplace they took that attitude towards Pascal with them.

That's the situation today still, except universities have changed and are now teaching C++ and Java in undergraduate classes as well as graduate classes so Pascal is more or less left as a hobby language.

Personally I've not found Pascal to be restrictive at all. If you know it well enough you can do just about everything in it you can in a language like C, and the resulting code will be far more readable because Pascal (unlike C) enforces good programming practice reasonably well (which is why it was such a great language for teaching programming in the first place).

Maybe this is because you don't find C restrictive, whereas I do.

Hello,

I found C to be dangerous; C++ had better boundries for me so that I didn't send my pointers off in different and strange directions.

I prefer Pascal when coding, personally. Unfortunately, I don't do much coding anymore.

Christian

C restrictive? In what way?
Apart from Assembly C is just about the least restrictive language you can find, you can do almost everything you want (if you know how of course). And for the very few things you might not be able to you can always link to Assembly modules.

Pascal is an excellent language for people to begin programming with. Its simple and obvious syntax mean that students can concentrate on the algorithms and control of a program without getting bogged down in working out how to deal with a pointer overrunning the end of an array.

It was once described as "self documenting"; I don't think that's true, but it's just about there.

A lot of pseudo code in books is pretty much compilable Pascal.

C restrictive? In what way?
Apart from Assembly C is just about the least restrictive language you can find, you can do almost everything you want (if you know how of course). And for the very few things you might not be able to you can always link to Assembly modules.

You can do anything you want on the machine, but that's not what I want.

But I'm talking about things like functions as first-class objects, closures (which C++ sort-of has, being object-oriented), and the like. C does not have those. Most languages are restrictive. (Practically all are.)

That's not the language being restrictive, that's you not understanding the paradigms along which the language has been constructed.
You CAN do all that in C, but you'd have to use C to create a language parser or compiler that understood those things in a syntax of your choosing.
That's what was done when Stroustrup wrote C++, he used C to create a language to do things in ways that cannot be done in C directly, effectively allowing those things to be done (indirectly) in C anyway.

begin
Why would anybody want to use Pascal?
end;

You'll see it in Delphi, anyway, and I'm sure other people still use it. It's unpopular because it is a restrictive language, compared to others.

Dont you mean:

begin
writeln('Why would anybody want to use pascal?');

end.


:lol:

We are Learning Pascal in University ...

I started with Pascal and Delphi towards the end of school, then used it while at uni along with C++ and some VB

Pascal is just not 'fashionable' at the moment. It is an excellent language to begin with and has no 'real' disadvantages other than its image.

If I need to write a Windows app quickly though (i work as a contractor so that is fairly regular) Delphi (7) is still my tool of choice. Quick development, runs extremely quickly, code is in a readable state.. its all good.

I use Delphi 7 on a daily basis, to program an imaging and data acquistion using National Instruments hardware. The application is for a biophotonics laboratory and will be used in conjuction with a ultra high speed laser and inverted olympus microscope.
I have learn't delphi from scratch in a year and have found it very useful overall. There will always be days when you head bangs against the wall irrespective of the what langauge it is that you can't understand.
Delphi 7 sometimes throws little hissy fits and i wonder if the new versions are more stable. I do love the debug functions and love using them when im not in over my head. It feels like there is always another level of knowledge that could be reached with more work.
I would like to learn C++. Does anybody have and recommendations of which app to use for that?
Thumbs up for Delphi.
Hopefully thumbs up for C++ once i have learn't that too.

Neil

Hi,

I generally don't advocate technologies, companies or solutions but in the case of Delphi and Pascal, I have some arguments to present :
First off all languages are only as restrictie as their implementations and to day no body implement a language/compiler in full accordance to ANSI/ISO standart (where is ANSI C now?). This bring us not to compare languages but specific compilers, IDEs and solutions on the market.
For example when Borland was releasing Turbo Pascal, Borland Pascal and Borland C every body was thinking BC to be much greater than than TP, but in fact both Borland compilers had exactly the same functionality and the generated ASM quality/speed was the same (it's true but I wasn't able to convince people to that at that time).
To day there is more to Pascal than Delphi, there is freepascal which can be used with open source IDE lazarus (quite identical to Delphi environment) supporting the same object Pascal syntax and has the most VCL and RTL equivalent libraries to support Delphi code without change. Also there is GNU Pascal compiler which is part of GCC.
Now to advocate Delphi :
Delphi's ASM code quality is awesome and can compete with and native code compiler easily. For Delphi 7 I can say that the IDE is the most user friendly, fast and user friendly that I ever worked on (like VS6,VS.Net,Eclipse).
It comes with a tremendous amount of support code transparent to user implementing the RTL, VCL and the whole conversion of WIN32 API headers to object Pascal available to every project. (You can directly start writing GetCurrentThr... the code completion brings you the API call; how difficult was to import WIN32 API calls one by one on VB6 and still fill a couple of P/Invoke line for each API call on VS.Net)
You can transparently interface to any COM, ActiveX, WebService without writting a single line of wrapper code, same for writing Windows Services, threads and DLLs. You can access to sockets (TCP,IP,UDP) and known net services (FTP,Telnet,almost 20) using Indy Net Components which comes along.
Delphi is the language you write less lines but still do more than usual without compromising anything. Nop Borland don't pay me anything :)

Loren Soth

Hi,

On the case of C vs C++ remember that you can't code time critical code with full object orientation, that's why Linux and Windows kernels and drivers are both written in C without OO.

Loren Soth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.