5 ms·
If I have all the time in the world, sure. When I'm racing against a deadline, I don't want to wrestle with the borrow checker too. Sure, it's objections help w
by noisy_boy 1y ago
If I have all the time in the world, sure. When I'm racing against a deadline, I don't want to wrestle with the borrow checker too. Sure, it's objections help with the long term quality of the code and reduce bugs but that's hard to justify to a manager/process driven by Agile and Sprints. Quite possible that an experienced Rust dev can be very productive but there aren't tons of those going around.
Java has the stigma of ClassFactoryGeneratorFactory sticking to it like a nasty smell but that's not how the language makes you write things. I write Java professionally and it is as readable as any other language. You can write clean, straightforward and easy to reason code without much friction. It's a great general purpose language.
- willtemperley 1y agoJava is incredibly productive - it's fast and has the best tooling out there IMO. Unfortunately it's not a good gaming language. GC pauses aren't really acceptable (which C# also suffers from) and GPU support is limited. Miguel de Icaza probably has more experience than anyone building game engines on GC platforms and is very vocally moving toward reference counted languages [1] [1] https://www.youtube.com/watch?v=tzt36EGKEZo https://www.youtube.com/watch?v=tzt36EGKEZo
- nayuki 1y ago> GC pauses aren't really acceptable Java has made great progress with low-pause (~1 ms) garbage collectors like ZGC and Shenandoah since ~5 years ago.
- BigJono 1y agoPeople have 240hz monitors these days, you have a bit over 4ms to render a frame. If that 1ms can be eliminated or amortised over a few frames it's still a big deal, and that's assuming 1ms is the worst case scenario and not the best.
- palata 1y agoWhat about the C# garbage collector? Is it much better? Because Unity is in C#, right?
- pjmlp 1y agoUnity uses aginging Mono runtime, because of politics with Xamarin, before its acquisition by Microsoft, migration to .NET Core is still in process. Additionally they have HPC#, which is a C# subset for high performance code, used by the DOTS subsystem. Many people mistake their C# experience in Unity, with what the state of the art in .NET world is. Read the great deep dive blog posts from Stephen Toub on Microsoft DevBlogs on each .NET Core release since version 5.0.
- vips7L 1y agoI don’t think you need to work in absolutes here. There are plenty of games that do not need to render at 240hz and are capable of handling pauses up to 1ms. There’s tons of games that are currently written in languages that have larger GC pauses than that.
- willtemperley 1y agoYes and it's impressive. For the competitive Minecraft player, I suspect starting their VM with XX:+UnlockExperimentalVMOptions is normal. A casual gamer is however not going to enjoy that.
- nayuki 1y agoAre you sure that enabling ZGC or Shenandoah requires UnlockExperimentalVMOptions ?
- willtemperley 1y agoLet's get back to the point. Is Java a good gaming language?
- pjmlp 1y agoHe would vouch as great as he might be, he has a bias, and Mono GC was never a great implementation. Also here is how great his new Swift love performs in reality against modern tracing GCs, https://github.com/ixy-languages/ixy-languages https://github.com/ixy-languages/ixy-languages
- willtemperley 1y agoInteresting link, but that's a nearly 7 year old version of Swift (4.2) running on Linux. I wonder how the performance would be with Swift 6.1 which has improved support for Linux.
- pjmlp 1y agoProbably much better, given the improvements on the Swift optimizer, but just goes to show "tracing GC" bad, "reference counting GC" good isn't as straighforward as people make it to be, even if they are renowned developers.
- willtemperley 1y agoIt's a cherry picked, out-of-date counter-example. Swift isn't designed for building drivers. In reality, a lot of Swift apps are delegating to C code. My own app (in development) does a lot of processing, almost none of which happens in Swift, despite the fact I spend the vast majority of my time writing Swift. Swift an excellent C glue language, which Java isn't. This is why Swift will probably become an excellent game language eventually.
- pjmlp 1y agoIt surely is, according to Apple's own documentation. > Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics. -- https://developer.apple.com/swift/ https://developer.apple.com/swift/ If developers have such a big problem glueing C libraries into Java JNI, or Panama, then maybe game industry is not where they are supposed to be, when even Assembly comes to play.
- im3w1l 1y agoI have found that the ClassFactoryGeneratorFactories sneak up on you. Even if you don't want to the ecosystem slowly but surely nudges you that way.
- noisy_boy 1y agoThat has not been my experience. Sure, you don't have any control over the third-party stuff but I haven't seen this issue being widespread in the mainstream third-party libraries I've used e.g. logback, jackson, junit, jedis, pgJDBC etc which are very well known/widely used. The only place I've actually seen proliferation of this was by a contractor, who I suspect, was trying to ensure job security behind impenetrability.
- pjmlp 1y agoIt is ironic how Java got that stigma and other systems that are just as bad, or worse, like Objective-C, have not.
- im3w1l 1y agoWell I have never used Objective-C so I can't comment on it.
- pjmlp 1y agoOn Objective-C, due to the way the language works, besides ClassFactoryGeneratorFactories, you would need to add all parameter names to the identifier. Here, enjoy https://github.com/Quotation/LongestCocoa https://github.com/Quotation/LongestCocoa There is even a style guide on it, https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html#//apple_ref/doc/uid/20001282-BCIGIJJF https://developer.apple.com/library/archive/documentation/Co...