[Cialug] Question?

Christopher Freeman cialug@cialug.org
Tue, 26 Oct 2004 12:58:49 -0500


Kevin C. Smith wrote:

>With dotnet and mono coming to linux. I was woundering --
>Why not pascal?
>
>It seems to not get the attention of c, c++, or mono.
>But, It can be compiled for Linux or Windows, maybe OSX?
>
>I'm not a programmer, and was basically wondering why Pascal seems left
>out of the debate. Seem to me it would also run faster then VB.net or Mono
>since produces compiled programs.
>
>Technical issues I'm not aware of maybe?
>I took a programming class in college (Pascal) and thinking of looking
>into the language again. I found this:
>http://www.lazarus.freepascal.org/
>and
>http://www.borland.com/kylix/index.html
>
>
>  
>
It's been a long time since I've looked at Pascal. There is Kylix 
(someone correct me if I'm wrong), which is an OO Pascal, I believe. 
Kylix is 'cross-platform' to the degree (or even a greater degree?) than 
C/C++.

The real answer to your question might be, "Why trade between C/C++ and 
Pascal when I can trade between C/C++ and Java/mono/...?" Pascal doesn't 
offer enough advantages over C/C++ as a compiled language, and doesn't 
begin to address the advantages of using a virtual machine. A virtual 
machine can offer a completely unified environment and lots of juicy 
bits like JustInTime compiling, etc. If your problem looks like a good 
candidate for a compiled language, go with C or C++. They are standard 
and designed to be working languages. Pascal is a teaching language by 
design. If your problem is better handled by a scripting language or a 
virtual machine, Pascal shouldn't be considered anyway.

Also, speed isn't the issue you might imagine. As Dan Juliano would love 
to point out to you, some virtual machines (Java) can run just as fast 
as compiled programs, depending on what you're doing. They can and do 
optimize while running where a compiled program can't.

This isn't to say that you should never use Pascal. Just that, there are 
several reasons why you don't see it in production much. Choose the 
right tool for the job. If that's Pascal, go for it. But make sure it's 
actually the solution you think it is.

My $0.02
Chris