so I've been trying a bit of things recently, I finally left rust after realizing that I'm going nowhere because I'm just too lame to understand how to do things the proper way, most people just give me a vague outline of what I should do and make it sound like it's obvious what I would need to do next, which it really isn't, some tell me just read rust code and you will learn how to do things the rust way, which is not really true because rust is possiblly the thing that I've read far too much code in, the language that I tried using the longest, so I just said ok this is not taking me anywhere, and then left it.
Ok, what then, go? Nope, I hate it, java? Don't exactly have anything against it but people have to hate it for a reason, dart? Far too immature, python? I hate dynamic languages, and not jus because static typing, it's because of how much a mess not having an official compiler can have for audiogames.
so, C#, seems like the perfect choice, and I love it, but.
C# is the worst modern language with documentation, and I really mean the worst there is no way of documentation, nothing, you're just expected to read file by file, even if a file is 2000 lines with mostly private definitions and you have no idea what you're looking at or where it is, which is sorta exosting, and there's just something that doesn't make me feel safe about the libraries, I now have to make a binding to openAL soft because yay no one made an actual good binding to it, which is really annoying I guess but not that much of a big deal, but the stuff added up and I'm not sure if I should continue there or not, I honestly really love rust, I think it's the perfect language, which is why I've been fighting it for 2 years, but I just can't go anywhere with it, I guess I'm just dumb? IF it's that obvious to everyone then it's probably me or something? Not sure at this point lol.
I know I think I said the same thing multiple times before, so lets go a step forward and give you the biggest issue with me and rust.
So imagine this. I'm making a server, no async, no threads, no parallel code what so ever, good old single threaded server, I have a collecton of players that I would eventually need to access at some point, when recieving packets, for example, I would get the player using the peer ID, then depending on the packet, maybe change the coordinates, or anything, basically, mutable access.
then I have maps, which are the same things, though I suppose maps will mostly be immutable except when an admin will update the map data?
ok, I have the server struct, lets say I somehow can pass it around to all the parts that needs it, even though that's impossible without doing bad global stuff that break because you shouldn't do it that way due to ownership rules and no surculars, here we come to the next issue, mutable accesses more than a time
I can't bring an exact example because I can't bring an exact code that makes this happen, but I will basically, after accessing the player, do something, maybe access a mutable server function, which will error because I'm borrowing player mutablly then I borrow the function mutablly again, I don't exactly remember if that causes it, but I'm pretty sure my issues go to something like that, I have something borrowed, like a player, then I borrow another player, or a player is borrowed and I call a mutable function from server, which is holding the player Vec, so it considers it mutiple borrowing of server, or I could be borrowing a player, then I need to for loop through all the players mutablly, then call a mutable server function, it goes on, I guess you'll probably tell me to seprate them instead of making them linked like that, but how? How would I make it accessible without global, and without making every function take 8 arguments, which will force me to change the arguments each time I add a new necessary collection or something like that?
Pages 1