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.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
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).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Maybe this is because you don't find C restrictive, whereas I do.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
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
kc0arf
Posting Virtuoso
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57
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.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
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.
leelee
Junior Poster in Training
77 posts since Aug 2005
Reputation Points: 31
Solved Threads: 1
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.)
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
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.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
We are Learning Pascal in University ...
jamshid
Junior Poster in Training
70 posts since Jan 2006
Reputation Points: 8
Solved Threads: 0