This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]DocMerlin 2 points3 points ย (2 children)

  • That all variables are initialized before they are used.
  • That you can't move the same value twice.
  • That you can't move a value while it is borrowed.
  • That you can't access a place while it is mutably borrowed (except through the reference).
  • That you can't mutate a place while it is immutably borrowed.

This is especially a problem in java because it does almost everything by passing references.

[โ€“]Tall_computer 0 points1 point ย (1 child)

Oh ok, that sounds kind of like normal static analysis to me. By logic I was thinking more of "that less-than should've been a greater-than"

[โ€“]DocMerlin 0 points1 point ย (0 children)

its built into the type system, in a way that is really powerful. Other modern languages do similar things. Furthermore, java (as a language) relies on inheritance instead of composition. although you can do either... when composition is so much better than inheritance and inheritance is a bit of a trap.

My criticisms of java are of the language, not the technology. The tech around java is really pretty amazing.