What if...

Pages: 12
The granddaughter of a friend is studying CS at University. She's just completed her first year with C++ as the major taught language (yepee!). They're also touched upon the history of computer languages (Fortran, Algol, Cobol, Pascal, c, C++).

She's now been set an essay to write (crikey an essay for a science subject!).

"If C++ had been developed first - before Fortran and Algol - would Fortran and Algol still been developed or would C++ have evolved so that these languages wouldn't be needed?"

Take a position (yes or no) and argue your case with references to the strengths/weaknesses of the languages, extensibility of C++ (via templates/classes etc) and their main uses.

Does anyone have any thoughts on this? My knowledge of Fortran IV/77 and Algol 60 is from 40 years ago - and I've forgotten most of it.

Thanks for any contributions.
It's rather a strange question. Programming languages don't arise in a vacuum, they're consequences of a particular hardware and software ecosystem, as well as of the lessons learned from languages that came before. What would it mean for C++ to be developed before Fortran and Algol? I assume they mean what if something like modern C++ had been developed in the '50s, but that's a nonsense question. C++ owes too much of its design to languages that came before it. It's like asking what if modern humans had existed in the Precambrian. If that happened they were either time travelers or aliens.
So, if C++ existed in the '50s and there were computers capable of compiling template code, then semiconductor technology was so advanced that the Internet was likely right around the corner, at which point all bets are off. What's really being asked is "what if the '50s somehow had the technology of the '90s?" which I don't think anyone is capable of answering.
Engineers would have wanted a simple, easy to learn language for their needs. Fortran provides that; c++ is way too hard to learn for a non-programmer to dabble. You have to give a context-- today we have math tools so an engineer does not have to code up his own solvers. Back in 1960, this was not the case, you could not hop down to the lab to fire up maple. And, back then, the input was on punch cards -- care to code up an OOP modern c++ solution on those? I need the vector<integer> deck now, but queue up the <double> deck as I use that later...

There are a lot of variables in play to answer this (what-if variables, of course) ... the hardware, the users (back then, there were very few computer scientists and many engineers, so the engineers coded their own and the overlap was heavy), the problems that needed to be solved, and so on. Would C have come first (if fortran was in the 50s, and you plug c++ into the 50s, then C would have been... in the 30s??!! ... running on ... what?)

Its an amusing exercise, but there is no wrong answer. Just set up your 'what if' alternate historical world and argue your point of view.
This is a side effect of many colleges requiring at least 1 essay in all (usually freshman level) classes, which has been an on-again off-again thing for the last 30+ years. I suffered a phase of this in my education as well -- even some of the math classes had them.

that said, a couple of thougts:
have you noticed how we keep getting new languages? Someone always has a new idea. There will always be a place for easy to use languages (eg python, basic) and performance languages. Fortran is unusual in that it is fairly easy to master yet gives great performance. I do believe something like it would have existed in most alternate history scenarios. And, OOP is over-rated. You do not need objects for small programs, and in fact, the smaller the program the more they get in the way (not talking about built in language ones, just making your own here). I almost always go procedural for 1 page throwaway code. 1-page efforts are quite common when using the computer as a giant calculator...
Last edited on
the input was on punch cards -- care to code up an OOP modern c++ solution on those? I need the vector<integer> deck now, but queue up the <double> deck as I use that later...
This is actually really funny to think about. (Presumably the computer would take care of the expansion/template instantiation for you, but that would probably take forever to compile on old hardware, and there might not be enough memory to do it.)
Last edited on
...a simple, easy to learn language...

COBOL would fit that bill. Even non-engineers would find it easy to read, understand and learn.
This is a side effect of many colleges requiring at least 1 essay in all (usually freshman level) classes

Yes. This is the first time an essay is a requirement for this CS course. I'm not convinced the 'professor' understands properly his own essay question. Apparently there's a lot of emails/text messages going round about this. Watch this space...

the input was on punch cards -- care to code up an OOP modern c++ solution on those? I need the vector<integer> deck now, but queue up the <double> deck as I use that later...
This is actually really funny to think about.

I know. I was just thinking about sorting the cards and amending a program. When we studied Cobol, we had to use batch processing and punched cards although Pascal/Fortran compilers were on-line.

COBOL would fit that bill. Even non-engineers would find it easy to read, understand and learn.

My most hated language.

COBOL was not math themed ... it can do it, but at this period in time it made sense to make a sort of general purpose language that was targeting a specific field -- cobol for database, and fortran for math.
I don't see in the OP where the programming languages are required to be math themed. The actual, real history of programming languages is eclectic and variegated as to purposes and usefulness across the years and decades.

This is a thought experiment in alternate histories. Rife with high-falutin' opinionating of what might have been.

A "Man in the High Castle" for programming.
Nothing said that, correct. I was just rambling as usual ... the idea behind it was "who in the 50s & 60s coded that was not a computer geek (and therefore wanting a simpler language than c++)" and that in my mind was math/science folks in need. Cobol is easy, and it fits the bill, but its purpose would have made it an odd choice for the non computer people to adopt. These days a lot of people code as a hobby or to play with it a little, python being a big hit with that crowd.
Last edited on
Introduce us at least.

If C++ was made before Fortran, then what computers do they have?

Just like Helios said, just the fact that they would have C++ would require so much more to be true that it doesn't even make sense. There may be a language created called Fortran, but why would it even resemble the Fortran we know now?

Maybe the professor meant what if there was a capable language such as C++.
jonnin wrote:
These days a lot of people code as a hobby or to play with it a little, python being a big hit with that crowd.

Oh Jonnin!
I really think you ought to take a closer look at Python! Its syntax is impressively simple (compared to C++ and Fortran) and it has quite powerful built-ins and libraries. If you use NumPy arrays it will give Fortran and C a run for their money on fast numerics, if you use SciPy it will give you all the fancy functions in physics and mathematics, and if you use MatPlotLib for graphs then you can safely abandon the really bloated Matlab.

But different languages do different things. FWIW I use:
- Fortran for anything with heavy numerics or parallelisation;
- C++ for a lot of postprocessing and anywhere that its abstraction and classes are useful;
- Python for short scripts and calculations, as a desktop calculator, and anywhere that I want to plot results.
I also do some mixed-language programming (Fortran/C). All of the above languages can be both procedural and object-oriented.

In my mind there is no one language that would displace others - they are all good at specific things and they all benefit from exposure to the good and bad features of others.

I think it's dangerous to only teach one computing language, however. If some forum users were exposed to some (rather less verbose) alternatives then they wouldn't be quite as ready to state "you should only code c++ like ..." and link a YouTube video or somebody's personal opinion in a blog.

I'm too young to have learnt Algol, Cobol or Lisp (and I wouldn't recognise Fortran IV - I usually code to Fortran 2008, though there is now a Fortran 2018), but the history of both computer software and hardware seems a good thing to learn about. Who knows what sort of programming we will do when quantum computers become readily available.

Here's the TIOBE list of popular programming languages for the last month, if you are interested.

Last edited on
I really think you ought to take a closer look at Python!

I don't think he was putting Python down, he just meant that its an easy language for people to pick up, so its a first choice for people just trying to dip their toes into programming.
Ah, no worries, @zapshe.

Actually, there are times when my earlier exposure to Fortran and C++ makes my Python programming somewhat dangerous. I get caught out - embarassingly often - by things like this in Python:
# With a list ...
a = [ 1, 2, 3 ]
b = a
# Now change ONE of them ...
a[1] = 20
# And let's have a look ...
print( 'a =', a )
print( 'b =', b )


# But with an int ...
a = 2
b = a

a = 20
print( 'a =', a )
print( 'b =', b )

a = [1, 20, 3]
b = [1, 20, 3]
a = 20
b = 2

Last edited on
I like python apart from the lack of brackets, the indent thing is annoying to me. Its exceedingly slow in its pure form, but as you said, it has alternatives. I still think of it as a good choice for non-coders, and if in a hurry you can get a lot done with a low time investment. There are not a lot of languages I actively dislike. Java comes to mind, but nothing else really. I always feel like I am hacking java to make it do something that it does not support.
OK. Thanks for all the comments.

Due to all the complaints from the students re this, the following info has now come to light:

- this is a test in writing an essay. Every student must write at least one essay. Where essay writing is not a normal/usual part of the course, the professor will set suitable title(s). These should be relevant to the subject. These essays will be not be marked by the professor, but by those used to marking essays (???).

- they will be marked as an essay. eg structure (intro, body, conclusion etc), use of paragraphs, sentences etc All facts used must be properly referenced. All opinions expressed must be supported by reasoned argument. The length should be a minimum of 4,000 words.

- the essay counts 5% of the overall year mark. Any student who doesn't obtain a pass mark (50%) has to repeat until they do achieve at least a pass mark.

It has also been found that the CS students should have had at least one tutorial/seminar on essay writing. This hasn't happened. The dept has held up their hands to this and said sorry - they overlooked this as this was the first year this was a requirement. Doh!!!!!

In view of this, the dept has agreed that a draft first essay may be submitted for comment but not marked. The final submitted essay can use any received comment without penalty.

Also, the professor has submitted an additional essay title so that the students now have a choice of 2.

"Describe the development of 'high level' computer languages until 1980. Specially compare and contrast main language features and discuss the perceived problems with the existing languages for target audiences and describe how the new language (supposedly) addressed (some of) these. Detail the main people involved and their contribution to Computer Science knowledge."

There's a lot of very dissatisfied students!
Last edited on
Ah, Academia Clown Show. How positively hilarious.

From an outsider's POV, not for the students.
Ah, Academia Clown Show. How positively hilarious.

Now now, these are the best and the brightest, PHD every one of them! And it is so very typical of the modern university. Though the second topic is more of what I would have had them do -- the founding fathers of computer science are worth knowing a little about, and what they did.

As a side note, how did they get into college (meaning, out of high school) without basic essay writing skills?! By this point I had written 3 or 4 10+ page assignments and countless smaller ones.
Last edited on
Ah, Academia Clown Show. How positively hilarious.

I don't see how. I don't think there's anything wrong with requring students to practise essays, and I don't think these are particularly bad essay subjects for a Computer Science course.

The only problem here is that the tutorial on essay writing got missed. This is an administrative error, sure, but given all the incredible difficulties that colleges, schools, and other learning establishments have had to overcome over the last 15 months, I think it's spectacularly unkind to label them a "clown show" over one scheduling mistake.

And each and every one of these students should have had practice writing essays during their school years, so missing one class on essay-writing should be no barrier at all to them being able to do this.

I expect childish insults thrown at teaching professionals from schoolkids, but when it's coming from adults who left school years or even decades ago, and really, really should have gotten over their hangups about their own education by now, then it's... depressing.
Last edited on
Professionals who don't think through the requirement of having students do an essay having any actual and recent course work in writing one. A screw up by Department Heads and Administrators, not the professors. Decidedly not the students.

I agree wholeheartedly students should be required to have some exposure to writing. But having a graded-by-experts requirement without any decent (and recent) previous instruction is, to put it bluntly, bordering on Appeal to Authority idiocy.

I think I touched a nerve, Mikey, you might want to seek some medical help.
I don't think students who manage to get accepted for University should need instruction in how to write an "essay". The exercise as originally stated actually seems to be quite a good one: the students are called to do some research, assemble the facts, make a decision and defend it in writing. That seems like a very good life skill.

Most engineering and science students will at some stage have to write an extensive project report / dissertation. I'm not sure why computer science students should be any different.

The only worry I have here is why the university back-tracked and watered down the task - I thought that the original was a decent, creative challenge, with plenty of scope for individual opinion and, if the students have only been taught c++, the advantageous side-effect of them having to go away and research other languages.

I think I'm in line with @MikeyBoy here.

As for the original problem ... I don't feel like writing 4000 words on it, but, as Helios pointed out, the design of c++ was (and still is) heavily influenced by other languages, and there's plenty of room for them all to co-exist.
Last edited on
Pages: 12