Zangoose,

A lot of people here seem to think that Java code is awful and disgusting and no projects should ever use it. The thing about popular languages is that more code existing in a language inevitably means a lot of it ends up being bad. The same thing will likely happen to rust as it gets popular, but that isn’t exactly a problem. It’s possible to have a well-maintained Java codebase.

Debate between functionality of the actual programming languages at this point is pretty meaningless, if they have good development standards then a Java program could end up just as well maintained as rust. Any time saved by compiler enforcement of specific standards (like no using null) would be lost by the fact that the devs don’t know rust tooling. You could just have a requirement in PRs that null isn’t used. Both Java and Rust have usable frameworks for REST API development, so using one or the other comes down to familiarity.

The idea that programming languages make code suddenly good or bad is pretty silly. Different languages have different language-level guarantees which can help produce good or working code. That being said, it’s not like it’s impossible to write good Java code, just like it’s not impossible to write bad rust code. Most people seem to be conflating guaranteed functionality and safety with maintainability, stability, and readability. Rust is still a new language, so although it’s great, Java will probably be the better choice for the latter 3 qualities.

That being said, something like Kotlin would probably have been a better starting point since it can interact with Java (and works like Java in most cases) but also has some nice improvements like stricter null checking (Kotlin nulls are treated similarly to rust’s Option<T>, it’s just described as T? instead and the syntax is generally a lot more concise). There’s also the benefit of being able to write some code in Kotlin and some in Java since they are mostly cross-compatible.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • lemmyworld@lemmy.world
  • kavyap
  • thenastyranch
  • tester
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • tacticalgear
  • Youngstown
  • ethstaker
  • osvaldo12
  • slotface
  • everett
  • rosin
  • khanakhh
  • megavids
  • ngwrru68w68
  • Leos
  • modclub
  • cubers
  • cisconetworking
  • Durango
  • InstantRegret
  • GTA5RPClips
  • provamag3
  • normalnudes
  • anitta
  • JUstTest
  • lostlight
  • All magazines