5 ms·
Here are a few hints in the manual: "you can add objects to a collection, but not primitives". Why not? "The collection and list classes used frequently in G
by mahmud 16y ago
Here are a few hints in the manual:
"you can add objects to a collection, but not primitives".
Why not?
"The collection and list classes used frequently in Gosu rely on the Java language’s collection classes. However, there are important differences because of built-in enhancements to these classes that use Gosu blocks, anonymous in-line defined functions that are not directly supported in the Java language."
It also has some type-inference that converts:
var str = {"foo", "bar", "baz"}
To
ArrayList<String> str = new ArrayList<String>();
str.add("foo").add("bar").add("baz");
Or some such.
LtU wont be going wild over this any time soon.