Home
Feedback
FAQ
Getting Started
Discussions
Site operation discussions
Recent Posts
(new topic)
Departments
Courses
Research Papers
Design Docs
Quotations
Genealogical Diagrams
Archives
Some people are amazed that it's in Pascal... HN discussion is here.
Pascal was the language of choice for the first Macs. The APIs described in "Inside Macintosh" were all in Pascal.
Of course. After years of disinformation and smear campaigns some people find that hard to believe ;-)
Nowadays it baffles me that many young developers think only C and C++ have compilers for native code generation, given the misinformation about alternatives.
As I look at the TIOBE list, I don't see a single non C language with over 1% marketshare with native code generation. I don't think that's too surprising they would think that. In the marketplace native non C languages are niche languages.
Of course in some sense Cs don't really have native code generation. At this point on most compilers the language gets resolved to a sort of virtual-assembly and then that is compiled to native / platform. Is that a compiler detail or does it fundamentally change the relationship? Irony of irony we finally really truly have C embracing Pascal's idea of P-code and Pascal's aren't part of the languages that target the p-code.
And when I step back a second and consider that today's CPUs have μops which correspond fairly closely to C, in fact were designed as part of making C code run faster, I'm not really sure that I don't believe that nothing other than C doesn't have native code generation. I'm not sure it is really possible anymore to have a language which is substantially structurally different than C run effectively in some sense "native".
Maybe they are saying something stupid. Maybe they are saying something informed. Very hard to tell.
I think gcc has pretty well always compiled to an intermediate representation and then from that to native code; it's a pretty common strategy. Meanwhile, Pascal compilers have compiled (eventually) to native code since basically forever; the p-code machine dialects clearly contributed to its popularity because they made implementation on new platforms easier, but by the mid-80s, iirc, most serious pascal compilers produced native code (although, again, they may have used a virtual machine intermediate representation). Java and .NET have, of course, revived the prominence of highly-optimized VM emulators, building on work done to improve performance of Smalltalk and Self; nonetheless, there is nothing inherent in any of those languages which precludes native code generation (see, for example, gcj, although I don't think it was/is a poster child for the benefits of native code compilation).
As for the claim that "today's CPUs have μops which ... were designed as part of making C code run faster", I'd really want to see a citation on that. Do you have a concrete example of a CPU implementation with an optimization specifically targetting C or C++, which would not be equally applicable to Fortran or Pascal? Are you certain that today's CPUs do not, rather, have implementations which specifically attempt to optimize VM emulators? (Say, for example, ARM processors' Java support).
Anyway, the "native code generation" criterion strikes me as highly artificial. Is runtime (JIT) compilation somehow qualitatively or theoretically different from separation compilation? I'd say "no"; it's an optimization/implementation strategy which has benefited from a lot of research over the past couple of decades, and it is as popular as it is only because the results are competitive; were they not, we'd probably see more native-code compilers for java and .NET languages.
Pascal was one of the main languages in the home computers.
C only took off due to the ubiquity of UNIX in universities.
Now we pay the price with buffer overflows and null terminated strings without null.
On the other hand, you aren't stuck with fixed length arrays of char for strings ... :)
After MBASIC, the next fun programming language I used was Turbo Pascal, 2.x and then 3.x. After 3.x, they tried to make it a Serious Programming Language, for Professionals, and it lost that sense of fun. Like upgrading to a mid-sized car from a (classic) VW Beetle.
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 20 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago