Stop comparing programming languages
- Python is versatile
- JavaScript is powerful
- Ruby is elegant
- C is essential
- C++
- Java is robust
Just accept it, all languages suck
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
That’s why Haskell is so loved. Nobody uses it.
Fortran would like a word.
I love how after a decade pandoc is still Haskell’s “killer app”. smh
I mean to be fair, that’s a pretty useful tool.
Yes, just flip binary directly to the cpu
not zig
Writing raw byte binaries ftw!
(Jokes aside, all programming languages have their good and bad things. Some just have more bad than good. And i say that as a C/C#/typescript/asm developer :p
Not Scala and Rust. They are my beloved, my sweethearts, my knights in shining armor.
Ok Rust does have some major issues, but not Scala…
Oof, slow compile times to target, of all things, the JVM? Implicit methods?
Some(null)
? Function call syntax where the difference between a tuple argument and a sequence of non-tuple arguments can be determined by whether or not there’s a space before the parentheses?There are definitely some major issues with Scala.
They also thought the best thing to take from Python is that version 3 should not be backwards compatible with version 2
I think that’s good when the objective is to improve the language. One key thing that holds many languages back is that they’re stuck with historical baggage, and it can be pretty difficult to replace/remove “outdated” stuff without breaking everything.
I do not want to be stuck using Python 2, or Scala 2 (although there exist people who use Scala 2 instead of Scala 3).
Where I’m working we’re heavily using Spark, which kind of blocks us from upgrading. There seem to be ways to get Scala 3 to work, but we also have old terribly written baggage code no one understands. Just upgrading between 2.12 to 2.13 was a journey.
I agree that the slow compile times are pretty bad (maybe even deal-breakingly for large projects). I think it’s kind of necessary for a language with as powerful of a syntax as Scala though, it’s pretty absurd how expressive you can get. Maybe if it didn’t target the JVM, it’d be able to achieve way faster compile times – I don’t really see a point of even targeting JVM other than for library access (not to say that that isn’t a huge benefit), especially when it has relatively poor compatibility with other JVM languages and it’s nearly impossible to use for Android (don’t try this at home).
Even more so, I think that null handling isn’t nice – I wish it were more similar to Kotlin’s. One thing I’m really confused as to why Scala didn’t go all-in on is Either/Result like in Rust. Types like that exist, but Scala seems to mostly just encourages you to use exceptions for error propogation/handling rather than returning a Monad.
A more minor grudge I have is just the high-level primitive types in general – it’s pretty annoying not being able to specify unsigned integers or certain byte-width types by default, but if it really is an issue than it can be worked around. Also things like mutable pointers/references – I don’t actually know if you can do those in Scala… I’ve had many situations where it’d be useful to have such a thing. But that’s mostly because I was probably using Scala for things it’s not as cut out to do.
With the tuple arguments point, I get it but I haven’t found it much of an issue. I do wish it wasn’t that way and it consistently distinguished between a tuple and an argument list though, either that or make functions take arguments without tuples like in other functional languages or CLI languages (but that’d probably screw a lot of stuff up and make compile times even LONGER). I saw someone on r/ProgrammingLanguages a while back express how their language used commas/delimiters without any brackets to express an argument list.
I think an actually “perfect” language to me would basically just be Rust but with a bunch of the features that Scala adds – of course the significant functional aspect that Scala has (and the clearly superior lambda syntax), but also the significantly more powerful traits and OOP/OOP-like polymorphism. Scala is the only language that I can say I don’t feel anxious liberally using inheritance in, in fact I use inheritance in it constantly and I enjoy it. Scala’s “enum”/variant inheritance pattern is like Rust enums, but on crack. Obviously, Rust would never get inheritance, but I’ve found myself in multiple situations where I’m thinking “damn, it’s annoying that I have to treat <X trait> and <Y trait> as almost completely serparate”. It would especially be nice in certain situations with const generic traits that are basically variants of each other.
Plus, I’ve always personally liked function overloading and default arguments and variadics/variadic generics and stuff, but the Rust community generally seems to be against the former 2. I just really hate there being a hundred functions, all a sea of underscores and adjectives, that are basically the same thing but take different numbers of arguments or slightly different arguments.
The custom operators are a double-edged sword, I love them and always use them, but at the same time it can be unclear as to what they do without digging into documentation. I guess Haskell has a similar problem though, but I don’t think Scala allows you to specify operator precedence like Haskell does and it just relies on the first character’s precedence. I would still want them though.
How it goes now, though, is I use Scala 3 for project design/prototyping, scripting, and less performance-sensitive projects, and Rust for pretty much everything else (and anything involving graphics or web). Scala has good linear algebra tooling, but honestly I’ll usually use C++ or Python for that most of the time because they have better tooling (and possibly better performance). I would say R too, but matplotlib has completely replaced it for literally everything regarding math for me.
Sounds like we’re actually in agreement about most of this.
I’m okay with languages limiting their “expressive” power in order to provide stronger correctness guarantees or just limit how “weird” code looks; but this is largely because I’ve worked on many projects where someone had written a heap of difficult-to-understand code, and I doubt such limitations would be appealing if I were working strictly on my own.
I also don’t really see the appeal of Java-style inheritance, but to be honest I didn’t use Scala for long enough to know whether or not I agree that Scala does inheritance “right”.
It does make sense that Rust provides mutability in some cases where Scala doesn’t. Rust’s superpower, enabled by the borrow checker, is effectively “safe mutability.” I hope other, simpler languages build on this invention.
deleted by creator
C pew pew
Stop comparing tools
- Hammer is heavy
- Wrench is elegant
- Saw is versatile
- Screwdriver
- Drill is exciting
such pointless
- Rust has safety and efficiency close to C
- Perl is processing most of your healthcare records
- Ada is doing space stuff
- Go is going places
What happens if I run paint splatters through OCR? Hmmmmm that random output looks like Perl. Holy shit it is Perl!
This actually happening is one reason I love the internet.
Perl? Nah, in this country its vb6, C#, java, gupta/centura and javascript :')
Source: been working for multiple healthcare market leaders in this country for 5 years now
C++ EXISTS
C++ is OVERWHELMINGLY SUPERIOR, if you ask any professional C++ developer.
I was a professional C++ developer for several years, and came to the conclusion that any professional C++ developers who don’t acknowledge its flaws have a form of Stockholm Syndrome.
This is true of every language. If you can’t think of things you don’t like about the language you’re working in (and/or its tooling) you just don’t know the language very well or are in denial.
Ehhh, I mean this more strongly. I’ve never met people more in denial about language design problems than C++ adherents. (Though admittedly I haven’t spent much time talking to Lisp fans about language design.)
It’s made worse by the fact C++11 made a lot of solutions for the deep problems in the language. As the C++ tradition dictates, the problems themselves are carefully preserved for backward compatibility, the solutions are like a whole different language.
And Lisp is small - the first Google result provides a Lisp interpreter in 117 lines of Python code.
C++11 also introduced new problems, such as the strange interaction between brace-initialization and initializer-lists (though that was partially fixed several years later), and the fairly arcane rules around move semantics with minimal compiler support (for example, it would be great if the standard required compilers to emit an error if a moved-from object were accessed).
I know Lisp is minimal, I’m just saying that I expect there are Lisp fans who won’t acknowledge (or would excuse) any shortcomings in the language, just as there are C++ fans who do the same for C++.
Can confirm. Chose to focus on C++ because it literally makes me superior to other people.
C++ is all of those, provided you pick any 10% of it.
You’re not supposed to cast every spell in the evil grimoire.
Well, except “robust”, unless you have very strict code standards, review processes, and static analysis.
(And arguably it’s never elegant, though that’s almost purely a matter of taste.)
When the standard for “robust” is Java–
I see where you’re coming from, but no matter how many null pointer exceptions there are in Java code, you’re almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process’s memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even then, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of “bad stuff” even on hardware that supports segfaults.
Additionally, most languages with managed runtimes that existed when Java was introduced didn’t actually have a static type system. In particular, Perl was very popular, and its type system is…uh…well, let’s just say it gives JavaScript some serious competition.
That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java’s intense marketing (particularly in its early years), which strongly pushed the idea that Java is an “enterprise” language, whatever that means.
There is another That you might say is a little rusty
This meme only works if you don’t include any example that is better than others in every regard.
I keep seeing people talk about Rust, and to be honest I never thought much about it because I’ve never had a reason to use it.
But when so many people in a programmer meme sub are saying “actually no joke Rust is amazing” that makes me pay attention.
So I looked into it and found this: https://github.blog/2023-08-30-why-rust-is-the-most-admired-language-among-developers/
I was caught by surprise and for some reason this joke clicked so much that I laughed for a while. Kudos
C++ is… I got nothing.
C++ is inferior to Rust and should be used in no new projects unless it is absolutely necessary
I believe the trade-offs make Rust the best option to replace C++. Now, i’m not sure about Zig replacing C yet…
The only reason I use C++ is because that’s what all the main audio plugin tools use. It’s warty and annoying, although I’m confused why Java would rank higher
My main experience using C++ was because I got stuck modifying an app written with Qt Creator, an utterly insane cross-platform framework that used (still uses? I dunno, only people in Finland ever used it in the first place) C++ for the under-the-hood processing and Javascript for the UI. For good measure, the application developers had modified all the C++ stuff with macros to the point where it was barely even recognizable as C++. Fortunately, it mattered not at all because the app’s customers were ISPs who just wanted a Skype clone so they could say they had one even though none of their customers ever used the damn thing.
Oh, trust me, Qt is still primarily C++. It’s effectively a massive set of C++ libraries.
Couldn’t we use pure C or Pure Data with hvcc for this?
So we just ignore JavaScript being on that list at sll?
I shit on JavaScript for years… but Deno (built around Rust) is honestly one of the most pleasant tools I’ve used for development, and you get all the completion in VS Code.
JavaScript is powerful
Old joke (yes, you can tell):
“JavaScript: You shoot yourself in the foot. If using Netscape, your arm falls off. If using Internet Explorer, your head explodes.”
C is powerful. Javascript is a husky midwestern gal at a Chinese buffet.
C is the one you want to marry, but JavaScript answers all of your drunk texts.
Java is robust haha
what about Holy C? is it only usable to people that are actually god choosen programmers?
It’s racist
Calling Terry racist is ableist. He was very much equal opportunity, applying the hard r to pale white CIA agents (imagined or otherwise).
You are right he was egalitarian in that.
I also have it on good authority that he had a black friend which gave him the N word pass.
nah, he bought the N word pass from SHV