Yo whatup

  • 0 Posts
  • 60 Comments
Joined 3 years ago
cake
Cake day: September 28th, 2023

help-circle








  • Java doesnt have value types or structs. You have primatives (booleans, integer types and float/double) and then everything else (even the uppercase primative types like Boolean) are reference types, IE on the heap. For stuff that plays with pointers you generally just call into native code, get back a long (the pointer to whatever you just allocated) and you call into native code to do stuff with the pointer. Native code can make a proper java object but it’s involved and has all the same cons as allocating one in Java land.

    Supposedly records (a pseudo struct) might get stronger optimization options (IE put on the stack) but fundementaly reference types are just pointers and if you get an object via constructor or parameter the language must support you putting it in global state






  • Probably about the same. Only realized at some point cause I was complaining about how a teacher always had us close our eyes and imagine shit. I was like tf are we doing this for when it doesn’t do anything. And I got confused looks and somebody asked if I could see pictures in my head. I thought they were screwing with me and lo and behold most people can actually see things in their head similar to dreams.

    Similar thing went down for the internal monolog. I believe I sort of complained offhand how movies/shows always depict people thinking as them just talking but how there wasn’t exactly a better way to do it. Friend laughed and said something like “Well and obviously that’s how people think too”. Wouldn’t have thought he was screwing with me if he wasn’t constantly making things up lmao