21

According to this video Pascal suffered great loss of percentage in the 90s. There is, contrary to the common belief that C prevailed over Pascal, a counterargument that Pascal programmers moved on to Java instead, also worth noting comments *1 *2.

Were the observation precise, a theory that Pascal influenced Java might have some credibility, but Patrick Naughton explicitly pointed out that Java Was Strongly Influenced by Objective-C, rather than Modula-3 or C++, and Sun's Java team considered some Object Pascal design for Java but ultimately rejected it.

So, did Pascal programmers really move on to Java (apart from Object Pascal and Delphi) in the 90s? What were the primary driving forces for this phenomenon? Does the argumentation apply to Ada, a language in the Pascal family and no less popular between the 80s and 90s.

Link:
What were top-10 popular programming languages in the 60s, 70s, and the 80s?
Ada and its candidate languages

Schezuk
  • 3,752
  • 1
  • 17
  • 40
  • Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed. – Chenmunka Feb 12 '23 at 18:03

8 Answers8

33

It's almost impossible to give a single and definite answer as not only usage of programming varies greatly over markets as well as new markets opening and new programmers are added as well, having been trained with different languages.

Big Business Market

One of the biggest, but least visible markets is big business. An area traditionally held by COBOL - on mainframes only challenged by Assembly, but that was at best a 50:20 ratio with the remaining 30% being held by specialized languages - mostly in the mid range applications (RPG etc.).

In addition, this market is defined by mostly maintaining and enhancing existing landscapes to adapt to changing regulatory requirements, adding new business types and so on. That means it's 95%+ improving existing code bases. There is not much room for new languages as existing code, interfaces and tools are where the value is. This of course goes for new applications within a company. It's much less work to write a new COBOL program, despite all the typing and weird constructs with the whole power of an existing and cosy framework.

When Pascal came, in the early 80s, mainframe compilers were soon provided, but it didn't make any notable impact. It was seen as a weakly integrated language, requiring too much effort to add all the interfaces and and framework connections that were present for existing languages.

The same is BTW true for C. IBM and others did provide C compilers as well, but it stayed as much an exotic language, good for some trials but simply not fitting the environment.

By the 90s COBOL was really feeling drag, as newer COBOL standards didn't improve as much as hoped for and Assembler becoming very rare. Where porting COBOL to smaller machines was doable, it wasn't great. And Assembler even less (*1).

A market eager for modernisation is what Java entered in the late 1990s. End it did so with force as IBM, as well as major tool suppliers supported Java as a solution capable to work as integrated and well defined as COBOL, but with all the bells and whistles considered state of the art. Plus the killer argument of write once run everywhere, a perfect match when PCs, small servers and networks started to become reasonable options.

Bottom Line, in this segment the transition was almost direct from COBOL to Java.

Small Business Market

This is an interesting and often overlooked field, as here BASIC was the major language throughout the 1970s up to the late 1980s. Today mostly forgotten companies exclusively focusing on BASIC, like Wang and MAI, ruled the small business world in addition to larger ones like DEC or Olivetti. In fact, they almost entirely created the market with machines like

The strong stand of BASIC in these markets is one reason why BASIC became an important language for the first micros.

Being more diverse than the mainframe market and way more shaped by new companies offering new products, the market was also very open to new and sometimes odd languages.

The small business market never really switched to anything, but was replaced by more generic micros, opening many new markets.

Special Market

And that's where Ada comes along. On one hand Ada was seen as the next big thing and it could have been if the licencing hadn't screwed fast adaption outside a very special market: Government and Military applications.

Here Ada was for many projects the language 'Par Ordre Du Mufti'. It was part of the project requirement. So switching to Ada was mandatory for everyone working in that business, no matter what his prior language was.

This did of course have as well influence on education, as there was a demand for Ada programmers - except, unlike with other languages, there were no cheap tools education could afford, so spread was, as mentioned, extreme limited.

Switching from Ada to Java did not really happen, at least not as a single move. For one, Ada is still widely used in this area, but equally switching to C or Java happened more on project-by-project basis than generally.

New Markets

Micros did start out with strong BASIC support, as BASIC was common/compatible with all their target audience:

  • Small Business (see above)
  • Engineering (think HP)
  • Newcomers (BASIC is a learner language)

Pascal did get a good stand with upcoming micros, not least due to being (somewhat) portable between systems (*2). UCSD Pascal, especially Apple's version did make a great environment for business applications (*3) especially due to easy use overlays to get around the limited address space of existing 8 bit micros.

This also nicely fitted the fact that Universities started to use Pascal as teaching language. People are lazy. Why switch if there is already one they know?

The PC changed the landscape a lot due to being a platform offering more than 64 Ki RAM and a large potential customer base. Turbo Pascal for the PC became a major platform.

At that point it must be noted that Apple made the Mac a 100% Pascal environment.

Since it was still a 'startup' platform, that is one where developers did start more or less from scratch, other languages like Modula and most notably C did also get some traction. This was further amplified by Microsoft's goal at the time to slowly switch PC users over to Unix (Xenix) (*4).

When Windows was done it was written in a way to support Pascal as well as C, but looking at MS publications, Pascal examples vanished around the time Windows 3.11 became a success. So Windows was a C platform and C being the language for the PC.

So here C took over from Pascal and BASIC.

When Java came, C was already settled. Java didn't really provide many advantages over the existing C framework, so not much reason to switch. The only exceptions are applications within a company framework that switched to Java with their mainframe environment.

New Programmers

As already noted, schools did go for Pascal as main training language throughout the 1980s. But with an increasing usage of Unix, mostly due to cheap multi user systems and workstations, C crept into universities and more and more teachers replaced Pascal with C simply because they were using it anyway. Also, by the early 1990s C was the language for Unix, Windows and the Mac, making it mandatory for many areas.

Java only came up after that and was, due to its strength in business applications (see big business), more prevalent on courses geared toward those application fields.

So in general, here as well, Pascal was mostly already replaced by C before Java got a hold.


Please note, all of this is just a rough overview. For every one following the above development path, there's another one that had a different experience.


*1 - there were many tools and runtime systems to port mainframe Assembly to mid range/mini computers. Still, it needed much more work than with COBOL, as Assembler applications usually were much more fine tuned.

*2 - Heck, Even I used it for some time around 1983/1984 to develop small tools for IBM customers using Turbo Pascal on my Apple II running CP/M

*3 - But not just business - Wizardry, one of the most spectacular games or the time was fully developed using the Pascal system and its graphics libraries.

*4 - Which BTW did create quite some tension within MS between their Mac developers, betting on Pascal and the PC side :)

Raffzahn
  • 222,541
  • 22
  • 631
  • 918
  • 1
    I would include that not just the Mac and PC were mostly using C, but also Amiga and I think the Atari ST. Though those platforms did not pan out, that wasn't obvious at the time, but of course the people that were developing on those platforms took the skills they learned there to the other platforms, so as C programmers they were still a big part of the momentum. – hippietrail Feb 10 '23 at 08:43
  • 1
    For a while, Visual Basic and then Delphi were very popular for Windows development, at least in some circles (hobbyist and shareware programs, but also bespoke development inside many companies); that doesn’t put much of a dent in the overall dominance of C and C++ (and then C#) for Windows development, but it might be worth mentioning them — IME they did play a part in the “C or Java” discussion on Windows. – Stephen Kitt Feb 10 '23 at 10:01
  • I am not sure what is meant here by 'Par Ordre Du Mufti'? – Omar and Lorraine Feb 10 '23 at 12:46
  • 1
    'By Order Of The Lawmakers', as in those who make the rules? If you're writing code for the (US) government/military, the specification presumably said you'd be writing it in Ada. (I don't imagine Raffzahn is referring to 'clothes worn when not in uniform', which is the British interpretation of 'mufti'). – dave Feb 10 '23 at 12:53
  • @StephenKitt yes, you're right, but it's already grown past good. Also I do see both as part of the declining. While Visual BASIC and Delphi did increase absolute user numbers for either language (family,) they were dwarfed by raising C usage.at least as far as I remember. Java did only become a real thing on the PC close to 2000, at that time Delphi as well as VB was already only a legacy choice for new projects. – Raffzahn Feb 10 '23 at 14:32
  • @Героямслава :)) It's an old phrase used to mark if something has been decided by a higher authority without any rational consideration, not looking at case or the people involved. – Raffzahn Feb 10 '23 at 14:37
  • 3
    One difference between Pascal and C. Pascal, originally, did not support function/procedure libraries. C was very library friendly. Any language that is going to be used in inudstry has to be able to make use of object code libraries. Of course, almost everbody who implemented Pascal added that feature. But they each did it a different way. – Walter Mitty Feb 10 '23 at 14:38
  • @WalterMitty True, so it wasn't stopping use of Pascal at all. Only possible change of development environment. Something that rarely happens in RL with any language – Raffzahn Feb 10 '23 at 14:41
  • @hippietrail Yes, although only the Atari did pose a thread to the PC's upcoming dominance for a while. Moreso either platform did have a strong BASIC use base, the Atari even with several BASIC dialects (Omicron, GFA) that made their way to Amiga and PC as well, having a strong stand way into the 1990s. It's hard to give C or BASIC (or Pascal) a preference on either machine. – Raffzahn Feb 10 '23 at 14:48
  • Well, if every implementation has its own library, that kinda raises hell with code portability. – Walter Mitty Feb 10 '23 at 15:15
  • @WalterMitty true, but language features are a way overrated point in portability. It's understandable that compiler maker do put up a lot of fuzz around making it an important USP, but in reality changing keywords for module invocation and linker scripts is dwarfed by changes in OS and UI handling needed when really switching platform - and these are the same for C or any other language. More so, especially in the small business market one sold an application often as package with the computer, not for a computer. – Raffzahn Feb 10 '23 at 15:31
  • @WalterMitty: On the flip side, Turbo Pascal did allow "include" directives from the start, and the time required to rebuild all of the code in a Turbo Pascal project would often be substantially less than the time required to do even a minimal partial build in languages that required a separate linking step. – supercat Feb 10 '23 at 19:00
  • I used Turbo Pascal on both CP/M and DOS. Never developed code for one using the other, though. Did you use text file I/O, untyped file I/O, or something else? – supercat Feb 10 '23 at 19:04
  • @supercat File I/O was a non-issue. Terminal control was the only to require fine tuning. Especially as the PC I used for compilation only had MDA while customers had CGA as well. – Raffzahn Feb 10 '23 at 20:53
  • I worked 9 years in an AS/400 shop where I wrote the things OPM COBOL was weak at in Java. The way IBM was heading then was not to replace the old stuff, but to have them complement each other. This is not an easy thing for a JVM to do. – Thorbjørn Ravn Andersen Feb 11 '23 at 23:31
22

Pascal teaching

My strongest impression is not that Pascal programmers shifted to Java in the 90s, but that Pascal teachers shifted to Java in the 90s.

In other words, the 90s was the decade when new students stopped being automatically exposed to Pascal (or any Pascal-like language), and started being exposed automatically to Java.

This was the era when the hype around OO programming was reaching its zenith, and presumably educators felt that Java was the newest, simplest, and most seamless representation of the OO concepts they wanted to teach.

Meanwhile, Pascal had been designed originally as a language for teaching the principles of structured programming. It had very little to offer in terms of OO features.

Steve
  • 787
  • 4
  • 6
  • 2
    I can confirm that this happened at my high school. Actually, our 12th-grade computer science course did learn Java together with the teacher, who previously tought Pascal. – Paŭlo Ebermann Feb 11 '23 at 02:08
  • And now, the teachers moved to Python? – Eric Duminil Feb 11 '23 at 13:26
  • 1
    @EricDuminil, quite probably, judging by the amount of fuss about it in "data science"! – Steve Feb 11 '23 at 15:46
  • Right. I graduated in '97, and a year later my university switched from Pascal to Java for its introductory programming courses. I imagine there were quite a few others doing the same thing right then. – occipita Feb 11 '23 at 20:52
  • 1
    @EricDuminil - yep. Was looking at the GCSE Computing syllabus here in the UK, and schools are required to teach at least one of three languages: Python, C# or VB.NET. Quick look around suggests most schools have picked Python. – occipita Feb 11 '23 at 20:56
  • The "Pascal with Objects" thing was Modula 2 but that was really tedious to work with, especially when you could compare with Borland Pascal. For those who need to teach computer science Python is really nice - for those who need to teach immediately employable programming skills Java was a good choice. – Thorbjørn Ravn Andersen Feb 11 '23 at 23:34
  • Python is really intuitive for newbs. I built my first web scraping app within two hours. The ease of use and the power of the language is really incredible. I did not think I could get to grips with a non-C based syntax as easily as I did with python. – Neil Meyer Feb 12 '23 at 07:24
  • I think that history shows that Pascal was a language designed for teaching language design. Language design was Wirth's interest, and what he was teaching his students. (And Dijkstra was fundamentally an algorithms guy, which is why he only commented, but did not design languages) – david Feb 16 '23 at 23:16
17

I am only one data point. But I most definitely did not move on to Java. I did have some very limited Java work, but only supporting someone else (much younger - I highly suspect he learned Java in school and that's why he used it, when he could pick the language, for work), and that wasn't until the 2010s. Mostly moved to PHP and Python, with various other languages in between.

What I think really happened is that a lot of computer science education moved from Pascal to Java as one of the primary teaching languages. When those programmers (like myself) got out into the real world, they took their favorite (by default, since they spent so much time with it in school) language out with them. But I doubt most Pascal programmers migrated to Java - they migrated to whatever language(s) their employers used.

  • 2
    That resonate an anecdote by Dani Richard in which interestingly Modula once held an ephemeral ground. – Schezuk Feb 10 '23 at 05:35
  • 7
    I feel like Pascal was being pushed out by C/C++ much more than it ever was threatened by Java. It just didn't have an "OS" as a sponsor when Apple stopped writing their things in it. – Mavrik Feb 10 '23 at 13:20
  • Yep, as has basically always been the case. It / CS people have to use the tech that the business/person who signs there paycheck needs them to use. – Neil Meyer Feb 12 '23 at 07:27
11

Short answer: no. Longer answer: Almost everybody, Wirth included, recognised that there were flaws in Pascal; these were the result of its definition being rushed. That meant that from the earliest days there was a tendency to look for something "better": Wirth did that by shifting his attention to Modula-2, Microsoft did it via (Visual) BASIC, and Sun did it via Java.

From my position of selling and supporting programming tools in the 80s and 90s, while a lot of people- particularly in academia- bet on Java as being the cleanest option, the really significant thing was that Bill Gates was outspoken in his support for VB at the application level, and the MS development tools favoured C and then C++ at the system level i.e. for writing support components and interfacing with the more outre bits of the Windows API.

At the same time Borland, after initially guiding Pascal's transition to Object Pascal, started milking the market and generally making it clear that they preferred to deal with corporates rather than small developers: I believe that Rikke Helms was responsible for that policy.

There were also issues of usability. As a specific example Java was very weak when it came to e.g. interfacing with lab equipment that didn't speak convenient IP-based protocols. As a result of that, even if the Computer Science fraternity favoured Java it left engineers and other technologists in the cold: it was easier to stick with a C API or to use C to write a VB extension than it was to find a suitable Java class to drive e.g. a GPIB interface. Pity the poor student who had to do lab work immediately after a CS lecture...

Plus, of course, the substantial number of domain-specific "4GLs" with database access and sometimes a form builder: which was eventually the niche that Object Pascal occupied.


As a footnote, I remember talking to somebody who refused to countenance anything other than C. His logic was that one of his proposed target platforms was UNIX, UNIX was written in C, and therefore that no language other than C was suitable for application programming on UNIX.

"Just sayin'".

Mark Morgan Lloyd
  • 2,428
  • 6
  • 22
  • "Almost everybody, Wirth included, recognised that there were flaws in Pascal; these were the result of its definition being rushed." It's funny how this description fits Javascript really well. It didn't seem to matter much, though. – Eric Duminil Feb 11 '23 at 21:14
  • @EricDuminil Shows that backwards compatibility with what the customers have is paramount. Less so in teaching. – Thorbjørn Ravn Andersen Feb 11 '23 at 23:38
9

The usual progression imho was from Pascal in the '80s on 8 bit computers (UCSD-Pascal on Apple II, Turbo Pascal on CP/M, etc) and XT/AT class PC's (Turbo Pascal for MS-DOS). Then transition to 16 bit computers (PC, Atari ST, Amiga, Macintosh) where Pascal was dwindling and C taking over. Pascal dwindled simply because of its less than ideal portability. ISO Pascal was unusable at that time. Turbo Pascal was a PC thing and even if there were efforts on other platforms to be Turbo compatible, it never really worked without huge efforts. C had the portability relatively well under control and its explosion in the embedded market made it the de facto lingua franca of the computer world.

Java came much later in the 2000s with the generalization of 32-bit computer and the world wide web. Remember that Java's main selling point were Java Applets, i.e. the client side of the Internet. That it monopolized the server side was a happy accident that ensured its survival.

So to make it short. No, Pascal programmer did not move to Java, but to C.

Patrick Schlüter
  • 4,120
  • 1
  • 15
  • 22
  • 1
    On the contrary, I regard applets as the main reason why Java got a bad rap (along with any other 'run this in your brower without lifting a finger' language). If you hang out in disreputable locations, like the address space of a web browser, some of the filth is sure to rub off. – dave Feb 10 '23 at 23:12
  • 1
    @another-dave when Java first came out I was very interested - it presented itself as a more well thought out C. But when I discovered it was being pushed as a language for the browser rather than the desktop, I lost all interest. – Mark Ransom Feb 11 '23 at 03:10
  • 1
    Pascal was my go-to language for most of the 1980's, although I started with 60 bits not 8 bits. But Turbo Pascal on CP/M was a revelation. Switching to Turbo on the PC was a natural progression, and I used Pascal on a PDP-11 too. But to make this relevant to your point, I went from Pascal to C, not Java. – Mark Ransom Feb 11 '23 at 03:35
  • "ISO Pascal was unusabe at the time" ... AFAIK ISO Pascal has never been usable. Looking at descriptions of it online, it's worth noting that it lacks a way of opening files with a given filename (usually done using a procedure called assign or something similar in most Pascal implementations, but which is missing from the ISO standard), which is such a common requirement that trying to use it for a real world application is essentially pointless. – occipita Feb 11 '23 at 21:05
  • 1
    @occipita No, when Pascal was defined (by Wirth) or standardised (by ISO) files were equally likely to be specified in some sort of job control section outside the program. I think this folds back to a point Supercat makes in a different reply: standards /should/ suggest some way of doing something like that, even if they recognise that the detail (filename format, extra mode parameters etc.) is platform-specific or has not yet been agreed on by consensus. – Mark Morgan Lloyd Feb 12 '23 at 09:20
  • I think you are neglecting the Borland Turbo Pascal -> Delphi transition. I know people who were primarily Delphi programmers in the mid-late nineties, and Delphi has never really gone away https://www.embarcadero.com/products/delphi – Ben Feb 12 '23 at 17:13
3

Well, who were the Pascal programmers ?

Pascal was one high-level teaching language since the late 1970s and, having some innovations like block structure, CASE statement, pointers, lists etc, it would be more useful to students ultimately wanting to become software engineers.

Competing first high-level languages in universities during the 70s and 80s were mainly Fortran, PL/I and Basic. In the mid 1980s C++ came out and captured major engineering applications from the Fortran sphere, notably CAD packages. Yet in most engineering/science college curricula at the time, all I saw in most universities was the usual Fortran course - this was because Fortran was then - and to the extent of legacy code still is today - the language that most engineers used. Some engineer graduates of the late 70s and early 80s used the Pascal they were taught to set up small companies providing software for schools and small but handy engineering applications. I remember seeing a Sybex book of engineering subroutines in Pascal published around 1980. But the simple truth is that Pascal made few inroads into serious engineering applications as Fortran was easier to learn and had a huge range of subroutines from BLAS, LAPACK, NAG, etc. The only exception to this I heard of was the New York City traffic system management program, which was reputedly written in Pascal/Delphi.

In the 1990s, if there was a change in first high-level language learning from Pascal to something else it was most likely to Java or C++ or often both for computer science students. To C++ because it included C, the main operating system language; and to Java because from the mid 1990s on we had increasing access to and use of the internet - and Java was the first modern language that obviated the problem of different compilation being needed for different op systems.

You mention Ada. Ada had a far narrower customer scope than Fortran, PL/I, Pascal, Basic and C++: it was purposely designed for defense applications and thus with an emphasis on code reliability. It is true to say that some universities' engineering and computer science departments gave Ada a run as their teaching language (or as a free supplementary language) for a few years. But only a few universities maintained it as such because the language was so much stricter, had much fewer libraries and simply was not used much outside the critical applications space. No way was Ada running at 34% popularity, if the latter is defined as the most commonly used language of respondents, in 1990. Nor could Ada be described as being from the "Pascal family" simply because it applied some of the constructs used in Pascal: Ada's mission was to make reliable code by having a language's constructs designed to serve their primary use-cases and to prevent undesired use. So I don't see any basis for direct drift in either direction between users of Pascal and users of Ada. Ada today retains its core customer base for critical applications although these days it has to contend with competition from MISRA-C: it is common to see Ada promoters offer interoperability tools between Ada, C, Java (for remote networked applications) and other support languages like Python.

Trunk
  • 215
  • 1
  • 4
  • 1
    For me as a university student, it was more a matter of "why even look at Pascal? I've got Algol-68R". – dave Feb 10 '23 at 23:15
  • 1
    I'm curious how broad was PL/1's customer scope than Ada. Though not fair and without factual basis, PL/I sounds to me like an ancient, abandoned relic which was one of the first multi-paradigm programming language prior than Ada or C++. – Schezuk Feb 11 '23 at 03:09
  • 1
    @Schezuk Nowhere as common as Fortran but it was in the mix among engineering texts of the 70s. A well known text on Digital Logic used it then. Up to recent years it was still among the swathes of old code used in GM's inventory and supply systems according to a friend hired to convert it to Fortran 90. – Trunk Feb 11 '23 at 12:45
  • 1
    Pascal was great on a CDC but an ICL1900 couldn't cope. Our average batch system programs in Algol60, 68, Fortran and COBOL took 32K. Pascal needed 80K so these were scheduled into a very much slower queue. Not great for a teaching system. – cup Feb 12 '23 at 18:18
  • The engineering shift from Fortran to C couldn't happen until the c math library was standardized. That was a separate effort that happened after the c library standardization. – david Feb 12 '23 at 21:17
  • @david If that's so then the first versions of AutoCAD (1982 onward) were written in Fortran since C++ only came out in 1985. The first version of Pro/Eng in 1987 may not have been in C++ either if the Math Library was unfinished then. Yet the first SolidWorks in 1995 certainly did. NAG's first C library was in 1990. Maybe you have more date detail ? – Trunk Feb 12 '23 at 21:51
  • @Trunk all versions of c (almost all?) had a math library. They just didn't give the same answer, depending on which library you used. – david Feb 14 '23 at 03:17
  • @david So your point is that despite CAD applications availing of C++/C's memory management features, engineering in general didn't start to migrate to C till some years afterwards ? – Trunk Feb 14 '23 at 11:51
  • Tools builders had specific requirements. Tool builders could specialize:, individuals could specialize, but generic "just use c for calculations" only happened after standardization, and my observation was that engineering research and publication and code examples and training that required the math library stayed in Fortran until it did. – david Feb 15 '23 at 03:02
  • We mustn't forget that the people contributing to the C Math library were past builders of the Fortran libraries. Were they trying to hold the line for as long as possible ? The big mystery to me was how the Fortran men just sat on their hands through the 1980s and let the language lose its numerical coding dominance. We had Fortran IV (1962), Fortran 66, Fortran 77 - yet no especial push to expedite better memory management, OO, etc till the game was essentially up when Fortran 90 came out. – Trunk Feb 15 '23 at 09:29
1

Pascal and Delphi in my experience were teaching languages. I was taught Delphi in High School IT class but then dipped my toes into C# after school and was rather astounded how much of my time in high School IT class was waisted with a language that I could not get a job with.

COBOL was indeed quite archaic by the late 90's. The time was rife for a programming revolution, Java came with a excellent C-based syntax that was intuitive. It had an excellent class library built into the language. It had out-of-the-box support for OOP. It was and still is garbage collected and it was platform agnostic and interacted with Oracle databases quite well.

All this made it quite appealing for the new era of business applications. It is worth noting that three years after Java was developed Microsoft developed .NET and C#. It is worth noting because these two have been competing for the business programming dollar ever since.

Neil Meyer
  • 6,275
  • 9
  • 29
  • 44
  • 1
    Delphi is a generation older than C#. It's like comparing VB6 to VB.NET. If you were taught Delphi in school, you were probably in school in the late 90s or very early 00s - which is either before C# existed, or certainly before it had become established. – Steve Feb 10 '23 at 20:26
  • 1
    @Steve - C# was first released in 2002, and Delphi was still in common use then. In fact, the question of whether C# killed Delphi is possibly even more interesting than this one, especially as Delphi was based on Turbo Pascal and Anders Hejlsberg was the original designer of both... – occipita Feb 11 '23 at 21:15
  • @occipita, undoubtedly C# (or VB.NET) has mopped up what would once have been Delphi programmers - I'd forgotten about the Hejlsberg connection. I know of Delphi being used into the 2010s - it seemed serviceable enough, but the language itself was definitely regarded by then as widowed, not at all mainstream. Meanwhile I'd say C# only became established mid-00s - perhaps with the arrival of .Net 2.0. Back in 2002, .Net Framework was still regarded as an awkward platform on which only a minority of sluggish apps were written. – Steve Feb 11 '23 at 22:16
  • I finished high-school in 2006 just for everyone's clarity. My HS may have been slightly behind the times. – Neil Meyer Feb 12 '23 at 07:11
  • @NeilMeyer, are high schools ever ahead of the times? The problem is that educators can't keep up. If science was revolutionised every 5 years, the science teachers would struggle. With programming, you need a matching set of a programmer who understands the language, a curriculum of teaching around it, and the compiler and equipment for a whole classroom. I really don't know how they reproduce - I can only guess ex-programmers become teachers, so a programmer in 1996 (when Delphi was hot) is a teacher in 2006, but I don't know how they maintain their language skills over a 40 year career. – Steve Feb 12 '23 at 10:19
0

C was designed so that a programmer armed with a simplistic compiler could generate more efficient machine code than could a programmer armed with a compiler of comparable complexity for other languages. This distinction was especially pronounced on the PC if one compared the levels of performance that could be achieved via Small or Medium model C code that used "far" pointers in select places to access more than 64K of storage, with Pascal code that always used "Large" model.

When using small model with far pointers, code which read a chunk of data from "far" storage into "near" storage (which was limited to 64K), manipulated it there, and then wrote the results back to "far" storage, could be much faster than code which manipulated data "in place".

Developing in Pascal on the PC was more convenient than developing in C, and the same was true to a lesser extent on the Macintosh (I've written code in both languages there was well), but--at least on the PC--code written in C could achieve levels of performance that Pascal programs could only achieve through the use of "inline" or externally-liked machine code.

Unfortunately, even though C earned its reputation for speed because of the level of control it gave programmers, a myth has emerged that it is fast because it allows compilers to to rewrite code in arbitrarily nonsensical fashion in any circumstances over which the Standard waives jurisdiction. Java for many tasks offers a better trade-off between speed and safety than C did even in the 1990s, and the trade-off has shifted increasingly toward Java's favor since then.

supercat
  • 35,993
  • 3
  • 63
  • 159
  • I'm afraid that you're conflating "language" with "implementation" there. There was at least one Pascal compiler circa 1990 that supported multiple memory models and had a good reputation for optimisation, and there were multiple C compilers that had a poor reputation for code efficiency. – Mark Morgan Lloyd Feb 10 '23 at 17:31
  • @MarkMorganLloyd: The most successfully marketed C implementation of the 1990s could vastly outperform the most successfully marketed Pascal implementation. Further, the level of Pascal compiler complexity required to efficiently handle For I:=0 to 4 do For J:=0 to 4 do Array1[I][J] := Array1[I][J] + Array2[I][J]; was vastly greater than the level of C compiler complexity necessary to efficiently handle int *p1=Array1[0]; int *p2=Array2[0]; int *p1e=p1+25; do { *p1++ += *p2++; } while (p1 < p1e);. – supercat Feb 10 '23 at 18:36
  • 2
    @MarkMorganLloyd even more back then than today, most people learned an implementation than a language as it would be to some abstract standard. Especially with Pascal - Turbo Pascal/Delphi were de facto standards in the PC world in the 1990s, and everybody wanted good make-programs-programs and few cared about vendor independent standards. – rackandboneman Feb 10 '23 at 23:38
  • @rackandboneman: A fundamental problem with vendor-independent standards is that the most efficient way of performing one task on one platform will often be impossible for some other platform to support, but standards committees often refuse to acknowledge constructs that aren't universally supportable, rather than recognizing them as optional features. – supercat Feb 11 '23 at 00:05
  • @supercat Yes, I agree that's a problem and has been since at least the non-standardisation of ALGOL I/O. Standards bodies could usefully have working groups to at least explore how a language (etc.) could be used in a particular situation, although they usually seem to be preempted by corporates (e.g. ECMA's eventual standardisation of the Win-16 API). – Mark Morgan Lloyd Feb 11 '23 at 07:56
  • @MarkMorganLloyd: What's needed is a recognition of the value in letting a programmer to express "Either process this program with certain specified semantics, or else report an inability to do so and refuse to process it further". The question of whether an implementation chooses to process the program with required semantics or reject it would be a Quality of Implementation issue, but an implementation that accepts a program without processing it according to the specified semantics would be Non Conforming. – supercat Feb 11 '23 at 09:08
  • No Pascal Compiler I looked at was restricted to the FAR model. The compiler was simpler by design, but included IO. C compilers were more complex, but offloaded I/O to the library. – david Feb 12 '23 at 21:19
  • @david: I don't recall Turbo Pasccal offering near and far qualifiers in any version through 5.5, though I moved to C between 4.x and 5.0. – supercat Feb 13 '23 at 05:14
  • @david: The approach used by Turbo Pascal 2.0 and 3.0 is an enhanced version of the Compact model (one code segment; multiple data segments) which allows for parts of the code segment that aren't occupied by code to be occupied by data that is accessible via CS prefix. Unfortunately, I don't know of any way of achieving similar semantics in later versions of Turbo Pascal, nor in C. That ability was very handy in code using translation tables, since it made it practical to have a font rendering code use a list of text extends in the stack segment to load the data segment register... – supercat Feb 13 '23 at 17:09
  • ...to texts which could be stored anywhere, convert the text to bit patterns using fonts held in the code segment, and output the results to the screen accessed through the extra segment. I don't know of any technical reason why it shouldn't be possible to have a function place static data within its code segment, but I don't know of any way of accomplishing that in any tools I've used. – supercat Feb 13 '23 at 17:11
  • @supercat - I used Turbo/Borland Pascal up to v7 and AFAIR no version supported near or far qualifiers. – occipita Feb 18 '23 at 19:05
  • As I recall, TPU's were all near internally, and all far externally. Each TPU got separate code and data segments. Stack variables used the stack segment. Initialized 'const' variables used the (near or far) code segment. Unmanaged heap pointers were less important, I don't recall if they were near or far or qualified. – david Feb 20 '23 at 21:46
  • @david: I'm pretty sure that objects whose addresses could be statically resolved to a named variable would be in a segment which was known to the compiler, but objects accessed through pointers or var parameters were always treated as far, no matter where they actually resided. – supercat Feb 20 '23 at 23:21