Earlier quoted context omitted.
But a type error isn't an edge case! It means you've written something the compiler can't understand. > This is why typescript is so popular on the web - you can quickly prototype something with JS, then once you find the right solution, add types and productionize the code I think you've got it backwards - TS is popular because people want to use types up front, but it has to work with JS, which is so dynamic that i…
A type error means a type error, and nothing more. Type errors do not mean "incorrectness." Here is an example of something you can't do in rust, but can do in other statically typed languages. ```rust struct Type1 { id: u32 } struct Type2 { id: u32 } fn main() { let obj1 = Type1 { id: 1 }; let obj2: Type2 = obj1; // compile error, Type1 is not Type2 } ``` This code works perfectly fine. These two structs have the sa…
Leaving Rust gamedev after 3 years
851–860 of 996 posts
Re: Leaving Rust gamedev after 3 years
#852Re: Leaving Rust gamedev after 3 years
#853Earlier quoted context omitted.
Sorry I got lost in that sentence. What is Rust's model?
Rust has traits on structs instead of using inheritance. Aka composition.
If I say "I don't care about safety, I care about expressiveness. Which is Rust's model"... "which" has to refer to one of the other things I just mentioned (safety or expressiveness) not some other concept.
Re: Leaving Rust gamedev after 3 years
#854Earlier quoted context omitted.
That assertion was specifically qualified in the context of database engines, for which it is true. I definitely write bugs but I haven't seen a segfault or memory corruption in years. That is more of a C thing than a C++ thing. It is kind of difficult to have a segfault or memory corruption with explicitly paged object memory, since there can't be any pointers and these complex objects are bound-checked at compile-t…
So you're saying if you write your database engine in C++ you're not going to see any segfaults? https://jira.mariadb.org/browse/MDEV-14248?jql=text%20~%20%2...
I always found it theoretically interesting that schedule-based safety architectures, which are focused more on optimal resource allocation than safety per se (its all about extreme throughput traditionally), asymptotically converge on memory safety too as a practical matter for the same reason they also require almost no locking. By doing the safety analysis (many kinds, not just memory) at runtime, tiny dynamic modifications to the execution schedule are sufficient to provably (using TLA+ and similar) avoid many types of "unsafety" without the design compromises required to enable some of this analysis at compile-time. It requires a non-traditional software architecture, and it doesn't play nicely with a lot of existing code, due to the level of execution control required but I see more and more systems being designed this way at the high-end of the data infrastructure market.
Re: Leaving Rust gamedev after 3 years
#855I also had the same bad experience with Rust outside of Gamedev. Probably a lot of other people too, but people don't talk about it much, because the Rust community is the most religious programming language community I've ever seen in my life. Before Rust, the Scala community was also pretty bizarre (Java too for a while), but nothing was on Rust's level. The worst part about Rust isn't technical, it's the crazy com…
I mean, your comment is actually contributing to the problem. You can 100% criticize the community - and thus push them to clean up that shit - without straying into characterizing it like that. It's fanning the flames and just doesn't really help.
Like what? To criticize a community, you have to characterize it. And of course they didn't say everyone was like this.
> Of course, there are many people in the Rust community who are not religious and try to improve the language
Re: Leaving Rust gamedev after 3 years
#856Earlier quoted context omitted.
For me, the closest language currently is F#. The open-source ecosystem is not as massive as Go's or the JVM's, but it's not niche either. F# runs on .NET and works with all .NET packages (C#, F#, ...). If the .NET ecosystem can work out for you, I recommend taking a closer look at F#. F# allows for simple code, which is "functional" by default, but you're still free to write imperative, "side-effectful" code, too. I…
Do you know of or have any shareable (sample) projects implemented in your way of doing F#? It sounds very intriguing to me
Re: Leaving Rust gamedev after 3 years
#857Earlier quoted context omitted.
Now I'm wondering how far people could go a hypothetical Rustscript* that transpiles to Rust (or hooks into rustc?), introduces extra features such as reflection, removes lifetimes, and changes the defaults around things like monomorphization. * name intentionally made to make people angry
If you're removing lifetimes from the script, I'm not sure how you're then transpiling to Rust, unless you wrap everything with reference counting, at which point you're better off using a language with GC.
Re: Leaving Rust gamedev after 3 years
#858Earlier quoted context omitted.
Some people "care about shipping a product" others "care about programming". That is why virtually no videogame is made with Rust.
In other words, "shipping a product" is incompatible with decent code. This is why virtually all proprietary codebases aimed at "shipping a product" are a clusterfuck.
There's so much software out there, and lots of it works. Focusing on the small amount that could be messy and insisting you're not like the "sheeple" coding it is so lame.