*cries in C++*
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
You would love Perl, methinks. There is no such thing as unreadable code written in that language.
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
honey the codewitch wrote:
You can produce more incomprehensible code with C++ than I think you can in any other major language
Hahahahaha ... not even close. Work this out:
⎕←(~A∊A∘.×A)/A←1↓⍳N
or this:
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
C++ can't even come close to APL for code density or incomprehensibility! :laugh: The first one is the Sieve of Eratosthenes, the second is the Game of Life.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
You would love Perl, methinks. There is no such thing as unreadable code written in that language.
And don't forget dotnetperls[^] :-\
-
You would love Perl, methinks. There is no such thing as unreadable code written in that language.
Fair. I forgot about perl. Mercifully.
Real programmers use butterflies
-
honey the codewitch wrote:
You can produce more incomprehensible code with C++ than I think you can in any other major language
Hahahahaha ... not even close. Work this out:
⎕←(~A∊A∘.×A)/A←1↓⍳N
or this:
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
C++ can't even come close to APL for code density or incomprehensibility! :laugh: The first one is the Sieve of Eratosthenes, the second is the Game of Life.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Does anyone actually use APL anymore though? I mean significantly, not just people porting old code and the like? According to Wiki the last stable release was 21 years ago.
Real programmers use butterflies
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
I have seen snippet of PERL, and I believe it can be worse... :O
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
You would love Perl, methinks. There is no such thing as unreadable code written in that language.
Agreed! :)
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
Does anyone actually use APL anymore though? I mean significantly, not just people porting old code and the like? According to Wiki the last stable release was 21 years ago.
Real programmers use butterflies
Surprisingly, yes:
APL (programming language) - Wikipedia[^]
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management,[82] asset management,[91] health care,[92] and DNA profiling,[93][94] and by hobbyists.[95]
I suspect APL programmers will tell you the last stable release was perfect, so it hasn't needed changing since ... they are generally an odd bunch, APL programmers ... :-D
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Surprisingly, yes:
APL (programming language) - Wikipedia[^]
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management,[82] asset management,[91] health care,[92] and DNA profiling,[93][94] and by hobbyists.[95]
I suspect APL programmers will tell you the last stable release was perfect, so it hasn't needed changing since ... they are generally an odd bunch, APL programmers ... :-D
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
Today, APL remains in use in a wide range of commercial and scientific applications, for example investment management,[82] asset management,[91] health care,[92] and DNA profiling,[93][94] and by hobbyists.[95]
So that's 4x no one can understand the :elephant:ing stuff well enough to port ancient legacy code, and 1x :sunshine:s playing code golf. :rolleyes:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius
-
honey the codewitch wrote:
You can produce more incomprehensible code with C++ than I think you can in any other major language
Hahahahaha ... not even close. Work this out:
⎕←(~A∊A∘.×A)/A←1↓⍳N
or this:
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
C++ can't even come close to APL for code density or incomprehensibility! :laugh: The first one is the Sieve of Eratosthenes, the second is the Game of Life.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
TECO was the same way. TECO was used to write the first version of Emacs and is a string processing language. One of the challenges TECO coders would do is write a one liner and challenge their counterparts to write the result of putting their name in the function.
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
If you've got a system that supports dc, try this:
dc -e '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x'
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
I don't have a problem converting C to C++ except when it comes to interrupt handlers, they're a bit tricky. But then again I'm not converting very complicated code...AVR devices are pretty simple.
The less you need, the more you have. Even a blind squirrel gets a nut...occasionally. JaxCoder.com
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
The Eureka moment with C++ is when you understand what features you really don't want to use because they make the code less comprehensible. like multiple inheritance from multiple classes with a common base class. That being said, I once wrote a co-operative multitasking OS for an embedded system in less than 15K of binary in Turbo C++. All the task and timer lists were automatically set up by the class initializers at startup. Just link it in and it got scheduled.
"Time flies like an arrow. Fruit flies like a banana."
-
If you've got a system that supports dc, try this:
dc -e '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x'
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
The Eureka moment with C++ is when you understand what features you really don't want to use because they make the code less comprehensible. like multiple inheritance from multiple classes with a common base class. That being said, I once wrote a co-operative multitasking OS for an embedded system in less than 15K of binary in Turbo C++. All the task and timer lists were automatically set up by the class initializers at startup. Just link it in and it got scheduled.
"Time flies like an arrow. Fruit flies like a banana."
My issue comes largely from my finicky-ness. I do a lot of C++ programming, and while I hesitate to say I'm proficient at C++, on balance I'd be lying if I said I didn't think I was. What I mean by being picky is that I don't keep C-isms in my C++ code. I port macros to ifs on constexpr values, and I use templates a lot, like for pin assignments in this case, but it means restructuring code, which means understanding it.
Real programmers use butterflies
-
I love this language except when it's used cryptically. You can produce more incomprehensible code with C++ than I think you can in any other major language. I'm poring over C code right now - C really isn't that much better, but fortunately you can do less with it. The code is evil. It's absolutely terrible to read, almost as if they were *trying* to hide intent. Porting it to C++ is my fresh hell. I love this language, but would it kill people to write readable code, or at least comment it with something *helpful*? Anyway, I guess what I'm saying is C++ is both my favorite and least favorite language. It's weird like that.
Real programmers use butterflies
C++ is my favorite language because it does not force you to do anything. That does include making it readable, which is the original author's fault not the language. Languages that force you to make your code readable will inevitably loose some (potentially very useful) features in order to make that happen, like #define for example. I admit I am guilty of intentionally making code less readable, only because I am forced to run it through a painfully awful "security" code scanner. The program is a web api in c# and the only way we can take any kind of data from the db and return it to the caller without the scanner whining is to store the data in a dictionary (dynamic) and then retrieve it back again, so that's been wrapped up in a pair of methods: return obfuscator.get(obfuscator.insert(db.runProc("ProcName", args, or, whatever)))
-
C++ is my favorite language because it does not force you to do anything. That does include making it readable, which is the original author's fault not the language. Languages that force you to make your code readable will inevitably loose some (potentially very useful) features in order to make that happen, like #define for example. I admit I am guilty of intentionally making code less readable, only because I am forced to run it through a painfully awful "security" code scanner. The program is a web api in c# and the only way we can take any kind of data from the db and return it to the caller without the scanner whining is to store the data in a dictionary (dynamic) and then retrieve it back again, so that's been wrapped up in a pair of methods: return obfuscator.get(obfuscator.insert(db.runProc("ProcName", args, or, whatever)))
I agree with you. I would say my complaint - if anything - I mean, I LOVE C++, is that it makes it easy to do The Wrong Thing(TM), and that includes hiding intent. Showing intent is everything, particularly in C++ where there are a billion ways to skin a million cats. However, that takes practice, is not always possible without comments, and is easy to ignore if you get lazy.
Real programmers use butterflies
-
I agree with you. I would say my complaint - if anything - I mean, I LOVE C++, is that it makes it easy to do The Wrong Thing(TM), and that includes hiding intent. Showing intent is everything, particularly in C++ where there are a billion ways to skin a million cats. However, that takes practice, is not always possible without comments, and is easy to ignore if you get lazy.
Real programmers use butterflies
I would say that the
PEEK
s andPOKE
s, segmented memory addressing, andgoto
s in my youthful program studies, were more intent-hiding than almost any of the C++ code I've seen since then! Some early Basic programs had me head scratching a lot!Our Forgotten Astronomy | Object Oriented Programming with C++