3 ms·
Swing also seems to be heavily inspired by AppKit. Although leaving out messaging and leaving in both int and Integer are weird choices if their language was s
by astrange 5y ago
Swing also seems to be heavily inspired by AppKit.
Although leaving out messaging and leaving in both int and Integer are weird choices if their language was supposedly inspired by Smalltalk/ObjC.
- pjmlp 5y agoPerformance mostly.
- xxs 5y ago>Although leaving out messaging and leaving in both int and Integer Both are great choices... from performance point of view. Java is still modeled after plain C 1st and foremost. int should be the default and Integer(and Long) should be avoided. Up to java1.5, it took a manual operation (Integer.valueOf/intValue) to convert, so it was not abused as much. Marked integers have been in the works and they take a significant engineering effort for a nice to have feature. When collection framework was introduced, it should have had primitive Maps/Lists - there was a regret (around java8 times) not including them initially - Streams attempted to amend the damage. The primitive types map directly to the hardware. Wrapped ones - they are pointer to an immutatable primitive and enjoy little optimization from the JIT. As for swing, beans and properties - I'd say Delphi would have the most similarities.