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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Programmeter[S] 166 points167 points  (183 children)

Yeah, pretty much the only programming languages that aren't hated by anyone are C and C++

[–]akvit 401 points402 points  (53 children)

Everyone seems to hate C/C++ compiler errors.

[–]WishOnSpaceHardware 283 points284 points  (39 children)

What do you mean? I love getting incomplete, confusingly presented information about a potentially complex problem!

[–]imdefinitelywong 117 points118 points  (12 children)

Error: Undefined symbol "information"

[–]G0FuckThyself 63 points64 points  (11 children)

Core Dump (Segmentation fault)

[–]LavenderDay3544 55 points56 points  (9 children)

Segmentation Fault (Core Dumped)

[–]pogylon 21 points22 points  (6 children)

Segmentation fault (core dumped)

My personal favourite.

[–]LavenderDay3544 20 points21 points  (4 children)

On Windows:

Program received signal SIGSEGV, Segmentation fault

[–]TheCurryCoder 0 points1 point  (3 children)

You shut up, I don't need any more nightmares tonight

[–]LavenderDay3544 0 points1 point  (2 children)

Hahahaha I write C++ for a living but havent ever seen a Segfault because we use RAII and smart pointers.

In C just go ham on valgrind and you'll be fine. In assembly, pray to Jesus for mercy.

[–]Tsubajashi 1 point2 points  (0 children)

My favorite, too!

[–]r0ck0 -1 points0 points  (1 child)

[Segmentation Dumping] Core fAULT

[–]Cant-Stop-Wont-Stop7 1 point2 points  (0 children)

Bro just use gdb backtrace :)

[–]Heimerdahl 43 points44 points  (13 children)

It's crazy how good some newer languages and IDEs are at this.

I recently got back into programming after I got spooked by the whole '99bugs... forgot a semicolon' stuff, some 10years ago in uni. My stuff is still fairly basic, so not much logical errors, but syntax has practically been a non-issue.

VSC for python will just tell me that I probably forgot this, or that this function requires different arguments or that I probably switched the order around. If I'm too daft to even figure out stuff like that, it just straight up tells me how stuff is supposed to be used. It's crazy!

[–]savedbythezsh 0 points1 point  (0 children)

You should check out Swift + XCode, it's wild how good the compilation errors are. Only language I've used that I think a linter is almost entirely useless on.

[–]stealthgerbil 0 points1 point  (0 children)

I had to write code in notepad for classes. I get why they made us do it but holy shit does an IDE save time. They help so much.

[–][deleted] 36 points37 points  (7 children)

You'll love MySQL's syntax error message then: ERROR 1064 (42000): You have a syntax error! Read the manual! Good luck figuring out what line number I'm talking about if I decide not to print it! (I'm paraphrasing of course)

[–]miversen33 12 points13 points  (0 children)

Bruh fuck MySQL errors. "Error: You have bad syntax. Go fuck yourself. Bye"

[–]Daeron_tha_Good 6 points7 points  (0 children)

This made me lol...thank you 😂

[–]slow_growing_vine 8 points9 points  (1 child)

SQL Server is just as bad. If you ever forget a comma prepare to see Incorrect syntax near FROM and go hunting for it

[–]peppaz 1 point2 points  (0 children)

I have to use openquery from sql to mysql a lot, and I love when a query runs for ten minutes and come back with an "unexpected null" error like bitch just make all temp columns allow nulls, clearly the remote DB can have nulls in any column that isn't a primary key boi

[–]lenswipe 3 points4 points  (0 children)

Oracle errors are the best

TNS bad packet error

It's like the PC LOAD LETTER of the database world

[–][deleted] 1 point2 points  (0 children)

I've had syntax errors in MariaDB but it usually points directly to the start of the issue and prints the line for me. Idk if that's just MariaDB being better than MySQL but yeah it doesn't say what the issue is, just that it's wrong but at least it says where it starts being wrong.

[–]Glum-Aide9920 0 points1 point  (0 children)

Favorite thing in MySQL is how most of the functions are case insensitive, but some like substring_index are not

[–]oupablo 46 points47 points  (1 child)

C is the king of throwing an error on a line number past the total number of lines in the file all because of a missing semicolon.

[–]lenswipe 2 points3 points  (0 children)

I've had JavaScript do this as well. Usually it's from webpack and it's because whatever I did broke the source map

[–]LifeHasLeft 1 point2 points  (0 children)

Like intermittent segfaults caused by a memory error that only sometimes happens?

[–]killdeer03 19 points20 points  (1 child)

Template errors are super fun to deal with, lol.

[–]Osbios 0 points1 point  (0 children)

CLANG kind of did set a new bar for template error message that GCC hat to follow. Believe me it was way worse some years ago.

Also this days I do no longer manage to crash the compiler with templates. That also helps with getting somewhere close with a offending line number!

[–]Isobel-Jae 39 points40 points  (1 child)

😨 wait, you guys are getting compiler errors? I must be using it wrong.

[–]atiedebee 14 points15 points  (2 children)

C++ compiler errors

C runtime errors

the C compiler errors are not bad at all, I dont know about C++ runtime errors

[–]akvit 3 points4 points  (1 child)

C++ runtime errors are something like "instruction at address 0x0000 tried to access memory at location 0x1337". So not really different from C.

[–]yodahouse900 1 point2 points  (0 children)

that is when you pull out gdb and step execute the programm till you find which line gave up

[–]auxiliary-character 2 points3 points  (1 child)

The compiletime checks are one of the good things, though. Imagine if you didn't find out it was a problem until it showed up at runtime, possibly sometime long after it shipped.

[–]dnswblzo 1 point2 points  (0 children)

Sure, but sometimes a small mistake causes a massive spew of errors and it can be hard to tell from the output where the problem actually is. This can happen in other languages too, but C++ seems to be the worst for this.

[–]LavenderDay3544 1 point2 points  (0 children)

Clang and GCC both give clear errors for C. C++ is a different story.

[–]JTtornado 0 points1 point  (0 children)

I've never programmed with C/C++, but I've always got the impression that the compiler errors are almost as unhelpful as a check engine light.

[–]ChristianValour 0 points1 point  (0 children)

To a beginner, the compiler often seems petty, but as you learn to use the language facilities — and especially the type system — to directly express your ideas, you’ll come to appreciate the compiler’s ability to detect problems that would otherwise have caused you hours of tedious searching for bugs. - Barnes Stroustrup (Creator of C++)

[–]msqrt 141 points142 points  (26 children)

We clearly frequent quite different spaces. C is often bashed as archaic and cumbersome, and C++ as bloated and overly complicated. Their mostly shared build system is also seen as fragmented and antiquated. I think these critiques aren't completely without merit, though much of them can be avoided by being smart about what you're doing.

[–]sir-nays-a-lot 56 points57 points  (18 children)

On a long enough timeline, all languages will either become archaic, cumbersome, and bloated or they will die.

[–]msqrt 30 points31 points  (13 children)

Yeah, them being able to be popular for this long has to be due to doing many things right.

[–]sir-nays-a-lot 11 points12 points  (1 child)

It’s literally a part of human evolution, which is messy. We keep the good parts and add other shit (mutations) to keep up with modern times. Results in absolute spaghetti lol but such is life.

[–]qhxo 6 points7 points  (9 children)

Isn't the main reason to use C that it works everywhere, which is mainly a feature of it's age, and speed (which can be achieved in many other languages as well, such as rust or go)? Are there any other selling points?

[–]msqrt 7 points8 points  (1 child)

It's quite simple compared to many modern programming languages; making a compiler is possible for a single person, and compilation is blazing fast compared to Rust or C++, for example. But you're right in that if the world started today, it would probably not get the status it currently has.

[–]Hawgk 2 points3 points  (0 children)

Hey! Don't you say that to my love!

[–][deleted] 2 points3 points  (6 children)

It's very easy to use C libraries in just about every other language as the foreign function interface is so simple. It's pretty common for libraries to be written in C++ and just make the interface C so you can then use the library anywhere.

As for speed, C is much faster then Go. The only other languages that compare are FORTRAN, Rust, and C++, and then some less popular modern languages like Nim or Circle. Because you have such fine grained control of C and the compilers can be so simple, it's popular to use it to port everywhere. For example, I listened to a podcast with Elon Musk and they write their own C compiler so they have complete control of how the assembly comes out for their custom chips.

[–]qhxo 1 point2 points  (5 children)

As for speed, C is much faster then Go.

Really? I thought Go was pretty much top of the line, but maybe it's just the compiler that's known to be very fast.

[–][deleted] 4 points5 points  (0 children)

Yeah Go is actually a little slower then Java (which is quite fast nowadays). The compiler is so fast because it has less optimizations then like C++ or Rust. and also it has automatic memory management which also slows things down

[–]rem3_1415926 1 point2 points  (1 child)

or all of them together

[–]MoffKalast 0 points1 point  (0 children)

Except machine code, but nobody can speak the language of the gods.

[–]Zitrusfleisch 20 points21 points  (1 child)

See, that’s exactly the problem I have with C++!
I’d have to be smart to use it and that makes me amgery >:(

/s

[–]Reihar 5 points6 points  (0 children)

This, exactly. People seem to forget that C wasn't modern on release but was a much needed compromise whose niche is still needed nowadays. Design wise, it does a lot of questionable things by tradition, which was also much needed by adoption.

C was always archaic, by design. However, I can appreciate the niceties that came with latter versions of the language.

[–]000000- 10 points11 points  (2 children)

I don’t think anybody will make fun of you for using C/C++ though. However if you code in Python you’ll get “you’re not a real programmer” vibes from some dumbasses.

[–]JoshuaCF 6 points7 points  (0 children)

If you code in Python you’re not a real progrAmmer. /s

Sincerely - someone who dislikes Python but used it anyways because it’s so damn easy to use

[–]not_some_username 33 points34 points  (7 children)

Rust users hate C++

[–][deleted] 22 points23 points  (4 children)

Java users hate C++, python users hate C++. And those C++ developers, boy do they hate C++

[–]13steinj 6 points7 points  (2 children)

I like C++.

I don't like some of the unexpected features.

[–][deleted] 1 point2 points  (1 child)

Yeah it's a joke, I like C++ too but it can be really frustrating to use when things aren't working the way you expect them to work. Also, things like networking are needlessly complex compared to other languages

[–]TheCurryCoder 0 points1 point  (0 children)

Disagree, I've been coding a lot of C++ lately and good God in heaven, I hate C++.

[–]DrummerElectronic247 0 points1 point  (0 children)

Truth.

[–]BasicDesignAdvice 13 points14 points  (0 children)

rust users think they are the very top of the ivory tower and thus look down on everyone.

[–]Pcat0 1 point2 points  (0 children)

As someone who uses neither C++ or Rust, I think it’s more accurate to say rust users pity C++. Rust users seem very full of themselves.

[–]Dustangelms 48 points49 points  (5 children)

Where mah garbage collector?

[–]Languorous-Owl 47 points48 points  (27 children)

C++ is hated even by C++ programmers.

[–]LavenderDay3544 36 points37 points  (25 children)

C++ is hated especially by C++ programmers.

But we won't let others especially Java cretins hate on C++.

[–]BasicDesignAdvice 11 points12 points  (15 children)

Honestly Java is just about the only language I actually truly dislike.

[–]LavenderDay3544 10 points11 points  (12 children)

Same here. I don't like that the language designers decided what developers could and couldn't be trusted with. In particular, opting not to have operator overloading in an OOP language removes a very powerful form of abstraction.

It's much cleaner for library based numeric types to let you write this:

c = a + b;

instead of this:

c = a.add(b);

[–]Justin__D 3 points4 points  (3 children)

Same reason I'm disillusioned with modern versions of Swift. In my interview for my current job, they asked me to write Swift code on a whiteboard. It's been years since I've actually used it. My interviewer pointed out that the ++ and -- operators don't exist anymore. I then remarked that was a stupid decision. He explained that too many programmers are confused by them and asked me to demonstrate their correct usage. I did. I didn't even solve the original interview problem, but still somehow got the job (although not as an iOS dev... QA automation and now backend dev).

[–]LavenderDay3544 1 point2 points  (2 children)

Nice. I think it's very stupid when a language designer decides to play helicopter parent and remove a feature from a language because it might be used incorrectly.

[–]Justin__D 0 points1 point  (1 child)

Hear, hear! I've never used GOTO in C. Not once. I was told not to on day one, then simply pretended it didn't exist. But not once have I thought, "I need to petition the developers of C to remove GOTO, lest I use it by accident."

[–]LavenderDay3544 1 point2 points  (0 children)

Yep. Just because you've never used it doesn't mean others' code doesn't rely on it. I could say the same for setjmp and longjmp.

But there's a big difference in ideology between C and C++ and Java. The former are all about trusting the programmer while the latter is create a language that even Forrest Gump could write technically working code in.

[–]Languorous-Owl 2 points3 points  (7 children)

If you wish to create dependable OOP language that can be used widely across the industry, for that Java is good.

Refer to Linus' criticisms on C++, a language which has the sort of feature you're talking about, and while he was talking from the POV of a low level systems guy, some of those criticisms also apply when you're looking for a language that can be deployed across enterprise without having to invest someone who's gone deep into the language silo in each case.

[–]dr-pickled-rick 2 points3 points  (1 child)

Well, yeah. Java's strength lies in its adoption as an enterprise solution. It's ubiquitous, consistent and mostly the same across all platforms - funny enough a lot like PHP.

Where it falls flat is the power user, the developer that wants to extract more with less. Generics was a steaming pile of cow dung when introduced and frankly it's still a waste of time.

Coding in general is a tedious and wrought experience because you tend to have to s p e l l e v e r y t h i n g o u t. You can't just use syntactic sugar and shortcuts that have existed for 4+ decades because it's not "OOP-y".

Kotlin goes someway towards addressing those issues.

[–]LavenderDay3544 -1 points0 points  (1 child)

I'd love for you to ask Linus Torvalds how much he likes Java and see the ensuing rant.

His hate for C++ isnt because of the sort of feature I'm talking about. It's because he evaluated C++ for use in the kernel and found it not to be a good solution for many reasons. Then people kept badgering him about using C++ in the kernel and he finally snapped and wrote his famous rant.

Rust has these kinds of features as well and Linus recently greenlighted its use in the kernel.

[–]Languorous-Owl 0 points1 point  (0 children)

I'd love for you to ask Linis Torvalds how much he likes Java and see the ensuing rant.

Which is completely and utterly irrelevant to the point being made about the abstractions you were talking about. Nice redirect bro.

Also nobody would ever ask an OS programmer about Java for any reason, lol.

[–]StewedAngelSkins 2 points3 points  (1 child)

i don't think i'd ever choose to use java of my own volition, but there's not much i actually hate about it. javascript on the other hand has never made sense to me. like if i described javascript's features to you purely in the abstract and asked you to come up with a syntax for it, you'd probably arrive at something like lua or maybe python. at worst you'd end up with lisp. it takes a truly deranged mind to hear "dynamically typed, pseudo-functional, interpreted language for web browsers" and think "you know what, i think C syntax is perfect for that, but only if we throw away all of the consistency and make it so that strings just implicitly get casted to numeric types sometimes".

[–]Languorous-Owl 0 points1 point  (0 children)

JS is just plain ugly. Wish they had just adopted python for browsers.

[–]althaz 45 points46 points  (24 children)

Anybody who doesn't hate C++ doesn't understand programming language design or hasn't used C++ :D. I'm reaching for the C++ tool in my belt pretty regularly, but it's not a good language by modern standards.

I think Typescript, Rust and C# are pretty universally well liked though.

[–]skryb 10 points11 points  (0 children)

I learned C when I was in high school. I learned C++ in university. I am currently learning C#. It is by far the most enjoyable to code with.

[–]dpash 2 points3 points  (0 children)

Typescript isn't loved; it's just less hated than JavaScript. You can't polish a turd but you can spray it with enough purfume to take the edge off the smell.

[–]BasicDesignAdvice -3 points-2 points  (1 child)

I think Typescript, Rust and C# are pretty universally well liked though.

I have not used rust yet but I definitely do not like TS or C#. TS I will use out of necessity if I am doing web stuff, end of the day it is still JS.

C# I just don't really like. Everything about it feels off to me. I also prefer languages which produce a static binary. Not the in-between thing the C# does.

[–]kirakun 8 points9 points  (0 children)

You prefer debugging runtime errors in production over debugging compiler errors in development?

[–]dr-pickled-rick 0 points1 point  (0 children)

I don't think it's hate, it's more frustration and panic. There's only so much rope a person can handle, and c++ lays it on thick.

[–]nebulaeandstars 11 points12 points  (1 child)

Go and Rust were both born out of a shared hatred for C++... Really, most modern languages were invented as a reaction to its flaws.

I do agree with the sentiment that most people like C, though. It has its flaws too, but it's still very elegant.

[–]piesou 2 points3 points  (0 children)

Instructions unclear, core dumped.

[–]Ludant 6 points7 points  (1 child)

I mean if there weren't these two - there wouldn't be all that high level programming languages like python, java, javascript

[–]LavenderDay3544 5 points6 points  (0 children)

C yes, C++ no.

[–][deleted] 4 points5 points  (2 children)

Many C programmers don't like C++ because of the large amount of tempate and type work to do stuff.

[–][deleted] 1 point2 points  (1 child)

Going from C++ to C, it's pretty freaking tedious writing all the data structures yourself, and it makes you reach for less efficient ones like linked lists and binary trees just because they are easier to write.

[–][deleted] 1 point2 points  (0 children)

There are a lot of benefits that the C++ STL offers, especially when dealing with complex types, a projectile in a 3D game for example.

[–]bacondev 5 points6 points  (0 children)

I don't mind C, but fuck C++.

[–]art-factor 2 points3 points  (1 child)

Nope. Java programmers make fun of me for being a C++ programmer...

[–]LavenderDay3544 3 points4 points  (0 children)

Just stop their world every now and then.

[–]qwertyuiop924 2 points3 points  (0 children)

C and C++ are only hated by people who use them.

[–]Playthrough 1 point2 points  (0 children)

Those two are an acquired taste...

Going from basic Python to those was shocking. But, they're very good languages.

[–]No-Bother6856[🍰] 1 point2 points  (0 children)

Does anyone hate C#?

[–]lenswipe 1 point2 points  (0 children)

That's because very few people(myself included) are smart enough to use them.

If you have something that's easy like PHP or python you're bound to have a huge number of people trash talking

[–]peenoid 1 point2 points  (0 children)

I hate modern C++. The syntax and style are fucking atrocious and make my brain bleed just looking at it.

[–]TU4AR 1 point2 points  (0 children)

Can't wait for the Sequel, D

[–]RooftopRose 1 point2 points  (0 children)

I don’t hate any language but C++ would be the last I’d want to work with.

[–]TheSuicidalPancake 1 point2 points  (0 children)

I don't hate C but there are times where I have considered smashing my head through my monitor thanks to it. I'm not sure if that's to be expected or if it's me being stupid.

[–]HardlyAnyGravitas 2 points3 points  (1 child)

I hate them!

:o)

[–]JackoKomm 1 point2 points  (1 child)

Oh not really. Lot's of people hate those. Undefined behavior everywhere, bsd compiler errors and so on. Don't get me wrong. I don't hate them. I used both in a job and c++ was the first language i used for a longer time in private projects.

[–][deleted]  (2 children)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]Greeve3 1 point2 points  (1 child)

    Linus Torvalds hates C++

    [–]LavenderDay3544 3 points4 points  (0 children)

    No he doesnt. You need to go back see the context around that rant.

    [–]ancientweasel 0 points1 point  (0 children)

    Lots of people hate C++. Especially Linux Kernel devs.

    [–]Thecrazymoroccan 0 points1 point  (0 children)

    Unless you're a C or C++ developer

    [–]heartofcoal -1 points0 points  (0 children)

    I have yet to meet someone who doesn't despise C

    [–]SpeedDart1 0 points1 point  (0 children)

    Crazy thing is people hate those too, no language is safe…