by nene · 15y ago · 0 comments
class Foo implements Comparable Observable Deniable ...
Why not have interfaces like in Go, where you just define a set of methods and all classes having the methods will automatically implement the interface. Collection<E>
HashMap<K,V>
HashSet<E>
LinkedHashMap<K,V>
List<E>
Map<K,V>
Set<E>
Why not just Array and Hash? And what's up with the whole generics thing - that's just plain old Java. int
bool
String
Object
Why do some types start with lowercase and some with uppercase letter. Why not use a sensible naming convention? square(n) => n + n;
square(5); // returns 25
square2(n) { n + n; }
square2(5); // returns null
Why not have an implicit return value everywhere?I could go just on and on...
Primitives and objects, it kind of makes sense but I do see your point.
> Although you might expect int and double to be primitive types, they're actually interfaces that extend the num interface. This means that int and double variables are also nums.