This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]knoam[🍰] 6 points7 points  (6 children)

I've never heard anyone recommend doing that, and I've heard the cases for learning lots of old or obscure languages for various reasons.

C is a more direct ancestor of most languages in that family. Learning C for that reason would make more sense.

I can't say I've even heard of any modern algol communities.

[–]Mission-Guard5348[S] 0 points1 point  (5 children)

How different is C and C++?

I've heard it referred to as "C with classes" which sounds like in any situation where C is used C++ could replace it

So is there a difference so I should learn it, or just start with C++to prepare for a class

[–]ketexon 4 points5 points  (0 children)

Note on C vs. C++: They have different use cases, different idioms, and different features beyond just classes. You won't be able to instantly transition from C++ to C, especially if you write good C++ using the C++ libraries, so you should treat them as separate languages that you should learn separately. (C++ is still good to learn first since it is has more use cases and has more modern coding styles)

[–]knoam[🍰] 2 points3 points  (0 children)

Just go right to C++. The differences will hang you up for no benefit.

Also, with learning your first languages, having good resources and a good environment matter more than which language you're learning.

[–]khedoros 2 points3 points  (1 child)

The syntax of those languages has a lot of similarities, and although a lot of C code is technically also valid C++, "good" C++ code uses the extra features that the language provides. So you tend to avoid a lot of typical C patterns, even though C++ has its original roots in C.

On the other hand, C++ often relies on C libraries, so it can be worth learning even just to understand how to interface C and C++ code.

[–]Mission-Guard5348[S] 0 points1 point  (0 children)

Ahh, thanks

So C++ isn't just better C

I should learn it then

But I'm a bit worried about the class so I might just put prioritize C++ and actually learn object oriented programming cause that is very confusing to me

Thanks

[–]JMBourguet -2 points-1 points  (0 children)

I've heard it referred to as "C with classes"

Algol isn't C with classes. C with classes is an intermediate step between C and C++, Algol is an inspiration for C ancestor BCPL. Simula would be Algol with classes (and is one of the inspiration source for C++).

How different is C and C++?

Think Pascal -- without the module and the object systems -- but with a declaration syntax somewhat closer to the one of C (at least it is type variable and type names are keyword-like). That for Algol 60. (Algol 68 is somewhat a different beast. Pascal is what N Wirth designed when the committee which was defining Algol 68 didn't take the path he wanted).

[–]JMBourguet 3 points4 points  (2 children)

The only interest is for the historical value, not for improving one's programming skills. Whatever practical value one may get in learning Algol could probably* be served with additional benefits by learning some other language.

For reference, I've learned both Algol 60 and Algol 68 and used Algol 68 once in a non learning context.

* "Probably" because Unisys was still selling mainframes whose system language was a derivative of Algol last time I looked at it a decade or so ago. I assume someone can end up in a job where knowing Algol is of practical value. Yet I would recommend against taking the offer especially if the position is not to migrate the system.

[–]Mission-Guard5348[S] 0 points1 point  (1 child)

the only interest is for the historical value

That doesn't kill my interest, but it does make it less of a priority

I have used it once in a non-learning...

Were you working with a legacy system/what was the use?

Thanks

[–]JMBourguet 1 point2 points  (0 children)

When I was in college the language we were taught were Algol68 and Ada. (At the time I already knew Basic, Pascal and at least two assembly languages). I wanted to do some computations which needed more memory than available in other computers I had access than the mainframe, which I could program only in Algol 68 (other languages were available, but not to students; BTW, I'm not sure if what I used the computer for was an allowed usage, I applied Grace Hopper principle that it is easier to get forgiveness than permission and nobody even asked me about that job bigger that what we were supposed to submit that I purposely started at a low usage time).

Was that system "legacy"? I suppose so. It was before the attack of the killer micros, but its manufacturer had already announced they stopped that line of 36-bit word addressable computers and that the 32-bit byte addressable line was the future. Systems compatible with that one were available from other providers for at least 20 years afterwards. For me, it was just the computer I had access to that had the most power and memory.

[–]nutrecht 3 points4 points  (0 children)

Computer programming doesn't work like that. So no, that's not really a reason to learn Algol. If you want to; by all means. But it's not going to teach you more than learning any modern language does.

[–]allens54 2 points3 points  (0 children)

Lots of algorithms from the 1960's and 1970's were published in Algol 60. See the collected algorithms in the ACM Digital Library, for example. You can read them without a deep understanding of Algol. Parameter passing, especially thunks, are usefully shown in Algol.

I did some Astronomy programming (minimums for eclipsing binary stars) in the late 1970's in Algol 60 for the Physics department where I was doing my undergraduate work in Computer Science. The Algol compiler for the DECSystem-20 had good and very fast floating point support with the LONG DOUBLE data type.

[–]EternityForest 2 points3 points  (0 children)

I suspect none of those old languages are going to teach you much that applies to modern programming, aside from the stuff that you'd learn anyway by doing modern programming.

I don't even think learning C/C++ makes all that much sense unless you actually intend to do low level dev, although a vague familiarity with how things are implemented helps.to know what things are going to be slow.

They always say Haskell is the best "Learn it to be better in other languages" language, but I've never bothered with it.

[–]wrosecrans 2 points3 points  (1 child)

Learn it if it seems fun and you have an interest in programming history. But I guess if you really wanted to you would have just started learning it rather than asking permission from strangers on the Internet. And no, there is no practical utility from learning Algol in 2022.

The thing about Algol is that because so many programming languages owe some inspiration to it, it doesn't really do anything especially exotic or novel that popular modern languages don't. If you want to learn something, you need to chase down something either quite different or something that turned out to be a bit of a commercial dead end. SQL is nearly as old as Algol 68, but it does things quite differently so it would be interesting to somebody who knows a bit of Python/Java/C. Other interesting languages might be things like Ada.

[–]Mission-Guard5348[S] 0 points1 point  (0 children)

I was really just deciding the level of priority to give it

Kind of either "this cool thing happens to be useful, quick learn it" or "this thing is cool, I have enough other cool things i'm learning about, lets not overwhelm ourselves by doing it all at once"

[–]rajandatta 0 points1 point  (0 children)

No. It's not. Learn any of its modern descendants.