Rust isn’t a functional programming language. Like many modern languages it has some concepts and features borrowed from functional programming languages, but fundamentally its an imperative language, not a functional one.
Comment on Drop your unpopular opinions here because c/unpopularopinions is filled with popular opinions
ZILtoid1991@lemmy.world 2 days ago
Rust is an “industry plant” language. There’s an active campaign to shield it from criticism, by claiming no part of the language has any drawbacks, and that all haters are Brian Lunduke fans angry about trans people. In reality, it is being pushed onto things where its strengths are more often shortcomings, such as game development, where it’s causing active harm, especially as you’d need something with an actual C++ interop, and not just a trendy language written by someone who got angry for management forcing them to write FactoryFactory classes for stuff that could been a single function. I get that Functional Programming is “mathematically correct”, but it shouldn’t be the only tool, and you just go back being the person who forced you to write the FactoryFactory class, just because they read Uncle Bob.
davidagain@lemmy.world 2 days ago
Katana314@lemmy.world 2 days ago
I ended up avoiding game development in part because of C/C++. Part of that is because you inevitably write C for various library imports, with little object-oriented operation. The other part is the archaic mess of the templating, which is totally unnecessary.
I don’t mind being forced to manage memory carefully, to follow what is actually happening to RAM. RAII also makes a lot of sense to me. But the obtuse declarations are often sideways from that. Worse, while there were new language features around the time I stopped, they were actively avoided.
I wanted to mention that because it seems like the few people who have any knowledge of C are devoted to it. I don’t know enough of Rust to actually champion it, but it isn’t the only language shielded from criticism.
kunaltyagi@programming.dev 2 days ago
If you want a higher language for game dev, use Godot + C#
Katana314@lemmy.world 2 days ago
Now you’re getting into garbage-collected abstraction though. Quite often you don’t have full control of the machine layer with C#.
This is not just saying “C++ is too complicated for me”. It’s also that even beyond managing precisely what memory holds, C++ is not intuitively designed, and deserves a successor fulfilling the same role. The reason game development often moved off C++ was that even as fast as it was, dozens of people would write failing or undiagnosable code in it purely because of the language design.
G_M0N3Y_2503@lemmy.zip 2 days ago
I think the best analogy to highlight the drawbacks of Rust is to say it’s like “Good test coverage.”. If you read that as 100% test coverage you can spend a lot of time doing some trivial overhead that probably isn’t doing a whole lot. But, if you have half a brain it’s probably not particularly harmful. If you read that as effective test coverage, you probably know the problem quite well and it’s probably some overhead, but you get to feel a bit more confident and have some executable documentation.
Neither of which I have heard to be useful or converted in the game industry so it sounds like a waste of time.
That said, if you’re like me and that overhead sounds nice, then you might like Rust :P
kunaltyagi@programming.dev 2 days ago
Tests can improve prove absence of a big. They can’t eliminate it.
In a similar vein, languages like rust can only raise the bar of shooting yourself in the foot, they can’t eliminate it.
My main reason for hating rust is the npm like cargo cult. Please don’t have 50 reps which you update every few months. It’s impossible to do anything else except vendor most rust crates.
G_M0N3Y_2503@lemmy.zip 2 days ago
Exactly. I think npm and cargo just make Dependency (mis) management more accessible. You still need to choose worthwhile dependencies, and if you don’t want to update frequently, dependencies with stable long term support.
0x0@lemmy.zip 2 days ago
Cherry on top is wanting to replace well-established, battle-tested, decades old software that had all of its serious issues ironed out long ago with Rust… because said software is written in C.
Rust, the new Java.
chunes@lemmy.world 2 days ago
Java’s syntax is at least nice to look at. Rust on the other hand…
ZILtoid1991@lemmy.world 2 days ago
If you like Java’s syntax and you were thinking “what if someone made Java, but actually good”, then try out D!
Positives include being extremely fast compile time, an optional garbage collector, and unlimited metaprogramming power.
Negatives include AI slop seeping into development for “hype” reasons (likely will result in a schism), some devs think the solution for the unpopularity of the language is joining the never-ending tech hype cycle (one of its consequences being an optional borrow checker), and opting out the garbage collection is a bit of a struggle though doable, especially if you can live without D native classes through
betterC(C++ classes are still available, though interop with external code is not 100%, as constructor mangling is even weirder than standard C++ symbol mangling) and use the C standard library for basic things (memory-safe strings in D are fat pointers, and C does not like that).kunaltyagi@programming.dev 2 days ago
No other language has a fish in it. Well except fish the shell with an epic command/plugin called bass
ZILtoid1991@lemmy.world 2 days ago
Can you elaborate on it?
chunes@lemmy.world 2 days ago
Fish is one of my favorite esolangs. Basically an improvement on Befunge.