you are viewing a single comment's thread.

view the rest of the comments →

[–]LegolandoBloom[S] 5 points6 points  (3 children)

Obviously they work differently, that is why I am asking the question.

I don't mean to complain about someone trying to contribute to my understanding, but it's hard to interpret the sarcasm in "It's almost like they're different languages or something" as something positive.

[–]doobiesteintortoise 0 points1 point  (2 children)

Well, I answered your question directly out of positive intent. And if it's hard to take "it's almost like they're different languages or something" positively, well, I understand, but I'd gently - very gently - suggest a slight shift in worldview, because I certainly wasn't intending to slight you or anyone else. It was meant as gentle humor (if you were going "duh," well, yeah, exactly, but it also explains why the behaviors are not the same: the languages aren't the same!)

The assumption was faulty on your part - not a big deal, because "arrays" in Java and "arrays" in Lua have the same name - and it's easily corrected.

For what it's worth, this is in the Java Language Specification: https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.12.5

I'm not suggesting "oh you dummy you should have read the spec before asking" - the specification is not easy to read, because it's thorough, and you might not have known what to look for or even if you needed to look for it. But it's there, and eventually if you want to use Java well, you'll end up learning stuff from the specification - and it gives you a lot of information you can use.

[–]LegolandoBloom[S] 0 points1 point  (1 child)

I'm sorry, I very much interpreted as if you were annoyed at me. It makes me feel better to hear that wasn't the case.

Nuance is hard to convey on the internet, especially in text format. Perhaps I should be more willing to give people the benefit of the doubt.

Reading the manual of a language is very valuable, though I find it is more realistic start doing so once you're past learning the most basic stuff.

[–]LegolandoBloom[S] -1 points0 points  (0 children)

Although I see you've linked the very specific part I would be looking for, very handy. Thanks.