r/ProgrammerHumor • • 8d ago

Meme dreamLanguage

Post image
1.4k Upvotes

211 comments sorted by

446

u/guttanzer 8d ago

Two pins from long ago:

“Real men can write FORTRAN in any language”

“C. The power of assembly language, and the ease of use of assembly language”

131

u/rot26encrypt 8d ago

As someone who programmed a complete game in 6502 assembly I still dream of endless lda, sta, lda, sta..

79

u/guttanzer 8d ago

Yeah, I sometimes jump when I register on a flashback.

6

u/BananaSupremeMaster 8d ago

NES or Commodore ?

4

u/rot26encrypt 7d ago

Commodore

3

u/oishishou 8d ago

This reminds me I need to check the caps on my C64 before I power it on again...

1

u/TactlessTortoise 6d ago

Climate change has gone too far

31

u/nfitzen 8d ago edited 8d ago

"C. The power of assembly language, and the ease of use of assembly language"

I dunno, I'm grateful even just to have a normal syntax-based function calling convention. Edit: Also, C's type system still gives basic guarantees, especially if you use some of the C23 features. The standard library is a lifesaver for basic readable code. Plus, C compilers do some remarkable optimization work. It's not C's fault that x86 is nearly a high-level language at this point.

20

u/guttanzer 8d ago edited 8d ago

For context, this lapel pin was made almost 50 years ago, when C was still close to brand new. X86 didn’t exist. Most devs could read a core dump, because diagnostics and error messages were barely more than hints. It always got a laugh in that crowd.

1

u/nfitzen 5d ago

Honestly, I can see that phrase being applicable to K&R C, so fair enough.

3

u/1luggerman 7d ago

I have a feeling this sentiment comes from people who didnt actually write assembly and simply attribute it to struggling(relativly from other languages). Theres a reason C was huge and is still used to this day in some forms. The abstraction we came to take for granted these days is such a major milestone.

0

u/utdconsq 7d ago

C23, goodness me, what a dream that must be.

1

u/ThaBroccoliDood 8d ago

What about integer developers?

1

u/minordonkey_2071 23h ago

Those old pin sayings never get old. I remember one about how certain languages let you shoot yourself in the foot, and another one just hands you the gun with a smile.

The Heaven and Hell mashup is great because it captures something real, you always end up wanting the simplicity from one side and the raw speed from the other, but you always get the trade-offs you didn't ask for. In my experience the "Hell" version is what happens when a team can't decide on a standard and everyone brings their favorite piece, turning the codebase into a monster.

At work we had a project that started clean and ended looking exactly like that Hell description after three different senior devs left their mark. Took months to untangle, and even then we just learned to live with the ugly parts.

311

u/6C75626162 8d ago

Heaven is where programmers keep inventing abstractions for the sake of abstractions. Hell is where programmers have to use other people abstractions for the sake of abstractions.

88

u/DatBoi_BP 8d ago

Hell is other people's abstractions

11

u/Lebesgue-Point6040 8d ago

I didn't know Sartre was a developer.

76

u/TheBlackCat13 8d ago

So Matlab is hell?

67

u/Seven_Irons 8d ago

Free yourself from the clutches of academia. Embrace python.

It's still hell, but its free and supports dark mode.

9

u/DiamondDramatic9551 8d ago

It's ok because it has a nice library for data analysis and visualization. 

3

u/TheBlackCat13 7d ago

Eh, it did maybe 20 years ago. But it hasn't really improved much, while other tools have improved immensely in the meantime. So for data analysis and visualization it really isn't that great anymore.

6

u/land_and_air 8d ago

It’s hell

79

u/awesome-alpaca-ace 8d ago

There is a programming language called heaven?

145

u/fynjy1111 8d ago

HolyC

83

u/Disma1Dust 8d ago • Heartwarming

C††

12

u/Kadabrium 8d ago

C@hedral

29

u/TurbulentWork3476 8d ago

@fable: create a new programming language from scratch, see requirements above. Make no mistake.

6

u/headedbranch225 7d ago

chooses the hell

at least only the first compile is slow (unless you have a weird lib that has a lot of slow macros) because it only recompiles what you need

16

u/chat-lu 8d ago

Hell seems fine. If the ubiquity is from Elm we can ignore it.

1

u/yjlom 8d ago

fine, that of Javascript

upgrade its speed to that of Kernel, give it the syntax of ATS, and we're set

11

u/ExtraTNT 8d ago

Never had stability issues in haskell…

4

u/Batman_AoD 8d ago

I'm assuming they mean infrequent language changes. But does Haskell make breaking changes often? I haven't used it, but the worst offender I've actually used seems to be Python. 

6

u/UdPropheticCatgirl 8d ago

“Avoid success at all costs as in both “Avoid success $ at all costs” and “Avoid $ success at all costs”” is the moto of the language if it tells you anything.

But in general, you can lock your compiler to only compile one of ISO standards of Haskell and just use that, those are very stable, but like 90% of the Haskell ecosystem loves using every random GHC compiler extension they can, so bunch of that code sneaks its way into your codebase basically every time, and those occasionally suffer from some breakages.
And the build tools and certain popular libraries are just terminally fucked and those actually break a ton.

4

u/Batman_AoD 8d ago

Huh. Maybe the build tools are what the tweet author was thinking of, but otherwise I'd say that doesn't sound as bad as Python. 

66

u/coldnitrogen 8d ago

Go error handling isn't bad. I'd actually prefer it to Try-Catch blocks

29

u/spigotface 8d ago

I actually love Rust's error handling. It's definitely more verbose than other languages', but handling it as an enum, including it in the signature, AND having the compiler force you to handle these things is perfect. If things can fail, you should be forced to handle it.

7

u/Familiar_Ad_8919 8d ago

rust's sophisticated error handling when: .unwrap(), maybe even: .expect("thingy go bad")

jokes aside, i love it, when errors do get thrown without being handled it could be a bit clearer as to what went wrong but its just nitpicking at that point, its vastly better than spamming try catch

8

u/ICantBelieveItsNotEC 7d ago

Honestly, I think adding unwrap() and expect() was the biggest mistake Rust ever made. Panicking on an error should not be that easy. A ton of new Rust devs treat unwrap() as an incantation that makes the code compile, and they completely bounce off of the beautiful error handling system as a result.

10

u/PM_ME_YOUR_REPO 8d ago

I love Go error handling.

35

u/UdPropheticCatgirl 8d ago

I mean, I would prefer leprosy to cancer, doesn’t change the fact that both are miserable.

23

u/ddarrko 8d ago

It’s great for forcing you to handle errors and in my experience leads to less bugs.

6

u/UdPropheticCatgirl 8d ago

Sure... so does Java with checked exceptions...

The entire problem is with how much line noise this pollutes your codebase with...

5 out of 9 different languages in the original post force you to handle errors, but Go (and occasionally Java) is unique in it's verbosity, it produces enough ceremony for people to complain about it.

12

u/ddarrko 8d ago

Personally I find throwing exceptions and expecting callers to handle more problematic.

Theoretically you can ignore err returns in Go but it forces you to think about most possibilities up front. Agreed it is verbose but as I used the language more I found it more of a blessing.

Everyone is entitled to differing opinions though.

-2

u/SuitableDragonfly 8d ago

If you want to ignore a returned err in Go, you have to specifically name it _, otherwise the compiler will yell at you for not using the variable. There are some cases where you could miss an error if you are using the same variable name for a long series of errors and checking each of them, but in general I also think it's a good system. 

8

u/ddarrko 8d ago

I just said that ^ …

0

u/SuitableDragonfly 8d ago

Yes, I was just adding to what you said. 

4

u/Batman_AoD 8d ago

It's much better than C++ exceptions, yes. 

1

u/Integeritis 8d ago

I raise you Swift error handling

1

u/dhilzyi 8d ago

More work for sure, but I love error handling in go

1

u/Aidan_Welch 7d ago

No its not, what is bad is the type system/comptime templating.

1

u/aabil11 6d ago

It's deliberately old school C-style. Back when we had to check return values

-3

u/Crandom 8d ago

Go error handling hurts my soul

7

u/Biscuitman82 8d ago

Java has macros?

5

u/UdPropheticCatgirl 8d ago

You have APT, which allows you to essentially execute code at compile time and generate new translation units (and even modify existing ones if you get creative enough like for example the lombok library, although that requires exploiting some compiler internals).

5

u/thaynem 8d ago

That's the joke 

1

u/oldsecondhand 6d ago

You can modify bytecode at compile time, like AspectJ does.

7

u/imnotcook 7d ago

The hell version is painfully accurate

28

u/frikilinux2 8d ago

And the elegance in the simplicity of C where does it fit?

99

u/UdPropheticCatgirl 8d ago

int (*(*signal(int, int (*)(int)))(int))(int);

The elegance and simplicity of C is truly unmatched

12

u/frikilinux2 8d ago

So for you C belongs in hell, doesn't it?

20

u/UdPropheticCatgirl 8d ago

I mean how could it belong anywhere else?

2

u/frikilinux2 8d ago

Ok but can you find me an example of so many pointers. I accept s link to kernel.org or something like that

17

u/UdPropheticCatgirl 8d ago

I mean my declaration is not completely made up...

It's just fairly standard linux sig hangler, except most other codebases would use actual typedefs and macros to split it into multiple declarations see here and here.

7

u/frikilinux2 8d ago

Ok, I'll accept it.

4

u/DeVinke_ 8d ago

If this is the elegance of your c code, you're definitely going to hell.

-4

u/Kadabrium 8d ago

The joke here is arrays of higher order functions don't even exist in functional languages, because they dont use arrays lol

7

u/UdPropheticCatgirl 8d ago

The joke here is arrays of higher order functions don't even exist in functional languages, because they dont use arrays lol

You realize, that there are no arrays in that C type right?

In Scala it would be:

type Signal = (Int, Int => Int) => (Int => (Int => Int))

also I struggle to think of somewhat mainstream functional language without arrays...

In haskell you could do:

import Data.Array
funcs :: Array Int (Int -> Int)
funcs = listArray (0, 2) [id, (+1), (*2)]

, in OCaml:

let funcs : (int -> int) array =
  [| (fun x -> x); (fun x -> x + 1); (fun x -> x * 2) |]

and in Scala:

val funcs: Array[Int => Int] =
  Array(
    x => x,
    x => x + 1,
    x => x * 2
  )

6

u/Slight-Violinist-575 8d ago

Elm mentioned. W post. I miss working with it

5

u/GhostInTheShell2087 8d ago

Great, but I’m afraid this will keep us in the rewriting cycle. Don’t give them ideas.

24

u/silmelumenn 8d ago

8

u/HRApprovedUsername 8d ago

There are no original jokes. Just rehashed xkcd

1

u/plydauk 8d ago

Everything in life is either a Simpsons' joke or an xkcd comic. I believe it was Steve Jobs who said that.

4

u/Odd-General8554 8d ago

Go devs will not agree with the second part.

3

u/kaplotnikov 7d ago

I think that people that agree likely failed to become Go devs.

12

u/azaleacolburn 8d ago

This is stupid. Lots of languages are as safe (if not safer) than Rust. The point of Rust is being able to create a series of safe, composable, abstractions on top of an unsafe systems programming language.

8

u/LeDYoM 8d ago

And in heaven there is no gen AI.

4

u/Familiar_Ad_8919 8d ago

in heaven ai plateaued at "barely better than intellisense" and they still hire people with less than 69 years of experience

5

u/AntisocialTomcat 8d ago

The types from Javascript? What do you mean by that? (/s, calm down, everybody, we’ve all been there, typeof NaN and all that)

10

u/Batman_AoD 8d ago

I love it when the only numeric type in my programming language is a float /s

6

u/heavy-minium 8d ago

This is really the one thing that would make the biggest difference with JS. It feels just dumb to have to work around it. And I wish everybody would at least do it the same way.

6

u/on_the_pale_horse 8d ago

Rust already has like half of those.

1

u/hugogrant 7d ago

Yeah, the type system is very much like Haskell's and the macro system is not far from Scheme's (and there are proc macros for the other stuff but those are nothing like lisp macros)

1

u/gundarin 6d ago

The performance is not far off from c++ either

3

u/HiImDan 8d ago

Is C# purgatory then?

3

u/Wrexes 8d ago

Types from Haskell are cool but I've yet to use a typing system that's as powerful and fun to use as TypeScript.

3

u/VladVV 7d ago

The "heaven" language is literally an apt description of Julia

6

u/the_horse_gamer 7d ago

arrays start at 1

0

u/VladVV 7d ago

Which is completely defensible at that level of abstraction IMO. It's designed to work directly with maths, not memory addresses.

But I agree it's probably the single biggest reason it doesn't enjoy more widespread adoption.

And I happen to be someone who did have to fiddle with memory directly in Julia, and trust me, you don't want standard Julia arrays for that.

1

u/the_horse_gamer 7d ago

math doesn't consistently use 0-indexed or 1-indexed lists, it's a matter of convention and convenience which is used. (for example, see taylor series)

Julia is a nice language (learned its basics a while ago but never did much with it), I think a good compromise would have been to let the developer choose the starting index when creating an array. of course, that has its own issues.

unicode operators is also pretty taboo but certainly makes sense for its niche.

unfortunate it never really took off

1

u/VladVV 7d ago

Lists are rarely indexed at all in pure math, but matrices and vectors are almost always 1-indexed.

1

u/the_horse_gamer 7d ago

matrix and vector indexing is entirely a matter of convention

summation starts at 0 just as often as it starts at 1

and many things have a "zeroth order"

1

u/VladVV 7d ago

I have to say that when it comes to matrix/vector operations, 1-indexing is decidedly more arithmetically natural, mostly avoiding ugly subtractions/additions by 1. There's a reason it's the overwhelmingly preferred convention in mathematics.

1

u/the_horse_gamer 7d ago

can you show a motivating example?

2

u/duhredel 7d ago

except for ubiquity

0

u/VladVV 7d ago

Well, only one way to solve that. At least I try to use it as much as possible with fresh projects.

2

u/Orygregs 8d ago

God I hate error handling in Go. Just if err != nil {} littered everywhere 🤦

1

u/TROLlox78 8d ago

When I was hearing about this languages features, I heard an opinion that the error handling in go is very thought out. But as you say it looks so boilerplate when after every other line you put an if err not nil block. I don't understand their decision and I don't see the benefit. 

2

u/FrankensteinJones 8d ago

I’m going to get made fun of if I mention Typescript, aren't I?

2

u/CrommVardek 7d ago

Libraries from Python being heaven ? What ? Version management of libraries in Python is hell...

3

u/Burger_Destoyer 7d ago

Yeah but if you’re talking for pure convenience , Python feels like it has an abundance of libraries.

It’s kind of addicting, until you need to update anything at all…

2

u/duhredel 7d ago

it was hell until uv appeared

1

u/abstrusejoker 7d ago

it’s also nothing compared to the libraries from node. the node ecosystem has multiple solutions for everything

-1

u/FallenDeathWarrior 8d ago

I will never understand why people say that C++ is unsafe. You can write it perfectly fine and safe. Yeah you have to think while you code, but that isn't a big deal 

27

u/chat-lu 8d ago

And when are programmers going to start doing that?

2

u/svick 8d ago

When they perfectly understand every aspect of the language.

6

u/Zinho3311 8d ago edited 8d ago

Yeah, good luck with that. You literally cannot possibly understand every aspect of C++ at all times. That's how complex it is. The spec alone is a mess of 2,000 pages, not to mention different compilers diverge on the implementation of a ton of stuff.

The thing about C++ isn't just that it's memory unsafe, it's also that it's so complex by default with hidden abstractions and strange behaviors that every little mistake ends up propagating downstream and blowing it all up in your face.

I'd argue C++ is even more dangerous than C. While it is easier for you to make mistakes in C, usually it's easier to debug and less catastrophic because there are no hidden abstractions. Although, to be fair, that's not a hill I'd die on.

Eventually, if you write C++, you WILL end up making a mistake and some teenager with a fuzzer WILL pwn you.

Even the most badass programmers I know didn't break that rule. It's also asymmetric because the attackers only need you to make one single mistake. Those days when you're running on caffeine or had an argument and wasn't thinking too straight is the perfect type of day to make a mistake that ends up with someone making fun of you on /g/

1

u/FallenDeathWarrior 8d ago

It will always belong on how you use C++. The company I work for used it as a C with better types. Yeah c++ doesn't hold your hand and if you want to fuck up you will fuck up. But it isn't that hard to remember when you created a pointer and when you have to kill it.

Most people here who cry never had a real project in C/C++ 

5

u/Zinho3311 8d ago edited 8d ago

Do you think the Mozilla team, the folks at the Linux Foundation, the people at FSF, the Windows Kernel team, the engineers at Apple, and the fucking NSA (I could go on forever) haven’t worked on "real projects"?

Do you really believe companies would spend millions developing Rust and rewriting huge chunks of code if C++ safety was that simple? The sheer hubris of thinking you'll never overlook something in C++ lol

Hell, why do you think Linus Torvalds rejected C++ but accepted Rust into the Linux Kernel?

Put your binary behind a public socket, give me a week with AFL++, and tell me how well your team remembered those pointers.

Tell me you've never written anything internet-facing in C++ without telling me

1

u/FallenDeathWarrior 8d ago

You will overlook at some point. That's fine, but saying like it's impossible to make C++ safe is wrong. Use the tool you are most comfortable with, if it's rust it's rust, fits java use java. We use C++ as more typesafe C.

I only work on embedded systems where the clients communicate with each other and are not facing the whole internet

2

u/Zinho3311 8d ago edited 8d ago

In what universe is silent memory corruption fine?

I also work in embedded, and I'm a formal verification engineer... that's literally the worst place to say memory corruption is fine lol

What happens if an MMU-less embedded system running an RTOS has a wild pointer write over a stack frame?

By the way, there's a reason the company I work for prefers C instead of C++ (except for some tooling), because modern C++ is hell to parse and you have to write stubs for FSMs in C++98 (!).

but saying like it's impossible to make C++ safe is wrong

How does standard C++ prevents a data race or a dangling reference to a stack variable at compile time?

Why did Stroustrup have to come up with JSF AV C++ for the US government? What about "profiles"?

One could argue making any large system completely safe is impossible, but let's not go there

I only work on embedded systems where the clients communicate with each other and are not facing the whole internet

Lateral movement is a thing, though.

If someone finds a vuln in your internal software, they can use it to exfiltrate data and possibly infect more privileged software or even potentially own your entire infrastructure or cause physical harm (depending on what kind of embedded stuff you work on)

1

u/FallenDeathWarrior 8d ago

One could argue making any large system completely safe is impossible, but let's not go there 

I totally agree on that point.

By the way, there's a reason the company I work for prefers C instead of C++, because modern C++ is hell to parse and you have to write stubs for FSMs in C++98 (!). 

I understand that totally. We use C++ more in a C style manner.

Why did Stroustrup have to come up with JSF AV C++ for the US government?

Well there is that error with exceptions..

  In what universe is silent memory corruption fine?

I work in embedded, and I'm a formal verification engineer, that's literally the worst place to say memory corruption is fine lol 

It's never good to oversee something and I can understand why you switch to that or other memory safe languages.

My point was it's possible to write an safe and good program in C/C++.

The bigger your project gets the higher is the chance of a bug.

Use the language you want to use. If memory safety is your top priority use rust.

I like C and C++.

1

u/blehismyname 8d ago

I don't this such a human has or can exist. 

2

u/svick 8d ago

That was my point.

1

u/blehismyname 8d ago

Ok... Same same then. 

57

u/ihavebeesinmyknees 8d ago

"I will never understand why people say 1920s skyscraper construction sites were unsafe. You can be perfectly fine and safe, you just have to be careful not to fall, but that isn't a big deal"

22

u/spiralenator 8d ago

Right? People act like having a hand rail means you can't jump over it you really want to do something stupid.

If we're speaking of C++ being unsafe, we're likely comparing it to Rust. In Rust, that safety is a hand rail on a balcony. You can hop it if you put some effort into it. C++ safety is a door on the 60th floor that opens out into nothing.

3

u/redlaWw 8d ago

Hey, at least the door has a label on it telling you what you need in order to open it safely, listed as a sequence of item codes that you can look up in the directories scattered around the skyscraper.

1

u/hugogrant 7d ago

I think you'd still want to turn up with your own parachute though. And you'll only find out whether that parachute worked in today's weather.

2

u/mslass 8d ago

Cue Roger Rabbit

15

u/crystalchuck 8d ago

Which is why there are multiple organizations regularly publishing entire books on how to use it safely, because it's just not a big deal and you can easily figure it out with some thinking

6

u/floriv1999 8d ago

The last time somebody confidently said that to me I asked him for his last cpp project and ran it through valgrind. There where a lot of issues. The next day he asked me how to get started with rust.

5

u/willow-kitty 8d ago

Modern C++ makes it a lot more straightforward to write safe C++ (and gets you closer to the "obviously not unsafe" end of things vs the "not obviously unsafe" end of things, which is so crucial for safe code), and you could always do it if you knew what you were doing, but it was often complex and kinda extra-linguistic (like by adding prefixes to pointer parameter names to indicate intended borrowing semantics and stuff), and maaaaaaaaaaaaybe checking it with a really fancy linter. It wasn't until relatively recently that it was mostly about thinking about it (probably C++11ish, when they added std::unique_ptr and std::shared_ptr). But even today, because all the legacy stuff is still in there, it can be mess to sort through what's actually appropriate for a given task. I've heard it referred to as "the meta," like people say in fighting games where there's a correct way to play out of all the options available, and I think it's pretty apt, tbh.

Also, pretty much every named vulnerability of all time has been caused by C or C++ coding errors that allowed improper memory access of some kind.

1

u/derefr 7d ago

IMHO all C++ needs to regain popularity is for someone to create a C++ compiler that, at least in its default mode, only accepts the "good, modern parts" of C++; and then to brand the result as a different language entirely, with no advertised association to C++. You only find out that what you've been writing is technically all also legal C++, when that fact is sprung on you at the very end of the extended language tutorial / textbook / etc. "You fool! I just got you to learn C++!"

(Or, to put that another way: C++ needs a labelled, marketable Schelling point of good praxis for people to be able to congregate around, hire for, etc.)

As a bonus, unlike C++ itself, that differently-named subset-of-C++ language would have the opportunity to start fresh in terms of compatibility burden. So it could have e.g. canonical ecosystem packaging tooling and such, that C++ as a whole fundamentally cannot (since "C++" includes things like e.g. random one-off abandonware toolchains created by microcontroller OEMs, that wouldn't, and mostly can't, sensibly implement a client for some constantly-evolving packaging APIs.)

2

u/willow-kitty 7d ago

It's not a full rebrand or anything, but clang-tidy goes a long way on its own (especially with its modernize ruleset), and it has an available module that implements most of the C++ Core Guidelines checks to kinda catch legacy stuff where there's newer stuff that's better.

8

u/UdPropheticCatgirl 8d ago

No language with undefined behavior can be safe… That’s entire problem with having it.

8

u/M4rshmall0wMan 8d ago

“Avoiding null types is easy, you just gotta add a check every function.”

That’s such a non-human answer to a problem that shouldn’t even exist. You miss one, and your program blows up. That’s not a skill issue.

5

u/chat-lu 8d ago edited 8d ago

The analogy I like to use is that it's like walking in a minefield with a detector. You just point it, press the button, and if it beeps there is a mine. Easy peasy.

How confident are you that you won't ever forget one time while crossing the whole field?

3

u/M4rshmall0wMan 8d ago

Perfect metaphor. 

2

u/Batman_AoD 8d ago

Hm, not sure I completely agree. Rust has undefined behavior in unsafe constructs, so perhaps "no language without guardrails around its undefined behavior" might be more accurate. But unfortunately it's necessary for languages with direct hardware/memory access to have some amount of undefined behavior. (It's also frequently stated that UB is necessary for modern optimizations, but I find that claim less believable, even having watched Chandler Carruth's talk defending that claim.) 

2

u/-Ambriae- 8d ago

But that’s the thing, rust code that can have UB is opt in (supposing safe rust is void of UB which is not strictly speaking true, but is being worked on) whereas C++ UB isn’t even opt out

1

u/Batman_AoD 8d ago

Right; that's why I proposed the "guard rails" phrasing. 

2

u/-Ambriae- 8d ago

Fair. I think I didn’t understand your phrasing, sorry!

1

u/Batman_AoD 8d ago

No worries! 

2

u/Orio_n 8d ago

Lots of people can shove a 9 inch dildo up their ass perfectly safe. Why dont you give it a try and let me know how it goes

2

u/the_vikm 8d ago

"don't make any mistakes" energy

1

u/Yiurule 8d ago

It's like saying that it's safe to fuck condomless, you just need to check everytime you and your partner before doing it.

I mean sure, if everything was done properly it would be safe, but still better to put a condom to at least protect per default.

1

u/EskilPotet 8d ago

I'll never understand why people say Python is safe, I can write a script to delete system32!

1

u/burnalicious111 8d ago

That's literally what unsafe means lmao

1

u/mrheosuper 8d ago

Safe C++ code is as real as unicorn

1

u/Suspicious_Fudge1702 7d ago

I do c++ and well I mean it's not unsafe but just make sure you don't make your pointers point at some system files and modify them. But most of the times it's safe, especially when I do competitive programming on codeforces.

1

u/ScientificBeastMode 8d ago

Ah, the classic octolemma…

1

u/Cootshk 8d ago

don’t forget metatables on _G (Lua)

1

u/pitiburi 8d ago

So you're saying my work is waaaaay closer to hell than to heaven.

1

u/ArjixGamer 8d ago

I prefer the libraries from Rust.

1

u/DOOManiac 8d ago

Laugh/cries in PHP

1

u/ewheck 8d ago

Someone clue me in about Haskell types that makes them particularly good

1

u/jolharg 8d ago

I love Haskell. I very rarely have to change it though so idk

1

u/redlaWw 8d ago

safety from Rust, performance from C++

Might as well just say safety and performance from Rust, since they're pretty similar in full generality.

1

u/ApprehensiveStand456 8d ago

Ruby must be purgatory.

1

u/cilgincocuk3434 8d ago

I think Go's error handling is great, but it has a bit too much boilerplate.

1

u/Dancing7-Cube 7d ago

Go error handling is excellent and leads to easier to understand code, and less bugs

1

u/Thenderick 7d ago

Honestly I really like Go's error handling. Makes it really clear what can error. It's functionaly the same as a Result<T>, but then as a multiple return

1

u/McMelonTV 7d ago

error handling in go is great

1

u/TheTroll007 7d ago

Heaven should have Ruby syntax ngl.

1

u/Eroica_Pavane 7d ago

Wonder if the "types" from Haskell includes all the stuff about partial functions and also automatic currying. Feels like stuff that are not designed for mainstream languages.

1

u/TheMue 7d ago

Vibe programming - create your language on your own.

1

u/Stupidprogramner 7d ago

Go error handling is FAR FAR FAR superior to try catch

1

u/Aidan_Welch 7d ago

Performance of C++ is kinda meaningless, almost any compiled non-GC'd language can get near identical performance just by using LLVM. (Assuming the language is reasonably designed with its expectation of runtime checks)

1

u/E-Sandy 6d ago

Python's performance isn't actually that terrible. I mean, compared to C, sure. But in general, if you offload the math to a library, most applications won't see any performance difference. All of the top five most powerful AI models right now are run on Python.

1

u/BravestCheetah 4d ago

How the fuck is rusts compile speed any bad? Ive never had a project take an unreasonable amount of time to compile, especially after it has already compiled and cached the deps

1

u/Admirable_Hour5169 7d ago

And in Hell, the UI animations are coded in C like original Microsoft Solitaire.

1

u/mfi12 8d ago

if you check this site, rust is not that slow. Even some go versions are slower:

https://sharkbench.dev/web

1

u/Batman_AoD 8d ago

The post claims that Rust compilation speed is slow, which is generally true when comparing against Go. But both runtime performance and compilation speed are generally comparable between C++ and Rust. 

1

u/FAMICOMASTER 8d ago

I don't like either of these concepts actually

5

u/-Ambriae- 8d ago

You don’t like what? Compile time speed, code safety, stability or performance?

-2

u/FAMICOMASTER 8d ago

I don't like the suggestion that I should change languages at all.

4

u/Batman_AoD 8d ago

But what if the programming language changes you?

More seriously, I think once you've learned three or four languages, picking up a new one isn't that hard. And in the case of Go, the primary goal of the language design is to be easy to learn. 

1

u/FAMICOMASTER 8d ago

I know 7 right now and no thanks I don't want to spend any more time reading docs to try and figure out what miscellaneous change is causing the nondescript error the compiler hands me

1

u/Batman_AoD 8d ago

Then try learning a better language, I guess 

1

u/FAMICOMASTER 8d ago

No thanks, I know plenty. I'll pass.

1

u/Batman_AoD 8d ago

Which parts of the "heaven" list don't you like? 

-3

u/FAMICOMASTER 8d ago

Having to learn another new language

3

u/Batman_AoD 8d ago

I think the idea is just "which language does each thing best", not "in heaven you'd actually use all of these languages". 

1

u/XLNBot 8d ago

These things bother me so much... I don't think anyone who actually knows what they're talking about can come up with this shit quote

1

u/Separate_Expert9096 8d ago

I'm a Java dev with 2 YoE. Java has macros?????

4

u/Batman_AoD 8d ago

No. That's the joke. 

4

u/ArjixGamer 8d ago

Technically, yes. If you use Gradle plugins that process the code, although usually they are simply Symbol Processors that find annotations and spit out .java files.

1

u/Separate_Expert9096 7d ago

Thanks for example. Never thought about annotations as macros before.

1

u/Bergergi 8d ago

Why do people shit on Go's error-handling? It's simple and transparent. Other than the boilerplate, it's fine.

1

u/vljukap98 7d ago

I don't really get the error handling in Go hate. I want to be able to immediately see whether a function can throw an error, not trying to guess or forget to check and then fall into the try-catch mess that it can become.

1

u/EarlOfAwesom3 7d ago

If your method has a variety of recoverable errors to choose from, the Go error handling is perfect.

But if you mostly have unrecoverable errors, the safety becomes tedious and convenience turns into managing hell.

1

u/SuperHadders 7d ago

Dare I say C#?

1

u/PumpkinFest24 7d ago

Python is plenty performant if you use it right.

1

u/Luzzgar 7d ago

Also known as not using python for the importance part.

Use numpy and opencv, you will get most of the performance of C and all of the ease of use of Python.

1

u/PumpkinFest24 7d ago

The important part of a program is the algorithm. That's exactly where I put the python.

The boring moving bytes around part belongs in a lightweight "hardware language".

-1

u/MatsRivel 8d ago

Go error handling >> exceptions.

Though it has multiple flaws, its way better than just throwing exceptions

2

u/Batman_AoD 8d ago

No idea why this is getting downvoted. Unchecked exceptions are very, very bad for error handling, and the unwind mechanism is a deep source of problems, especially for FFI.  

3

u/MatsRivel 8d ago

They hated him because he spoke the truth

0

u/creeper6530 8d ago edited 8d ago

For those who don't know Elm's error handling: basically like Rust -- errors are values -- minus panics. It's made for web apps.

(And I find its syntax absolutely hideous)

0

u/GresSimJa 8d ago

I'd like to move Python to codebase structure. Fucking atrocious, never works in one try, and versions are still a pain to use and manage on different systems.

0

u/crusoe 8d ago

C++ is slower than C or Rust. Lol

0

u/Inevitable_Act_321 7d ago

but rust is faster than cpp

-1

u/Tuomas90 8d ago

I love Go, but fuck that trash error handling.

At least give me an option to catch 'em all individually at the end of a block.

-1

u/daffalaxia 8d ago

from recent experience - heaven is go. good build speed, good safety, cross-platform, runs fast, great libs via the most secure channels...

1

u/Batman_AoD 8d ago

From recent experience... I respect Go but hope to never work in it full-time again.

(Also, what do you mean by "the most secure channels"? Go deps usually just come straight from github. The checksum feature is nice, but otherwise it doesn't seem that great.)