News for hackers. Stuff that matters.
Re:Java Was Strongly Influenced by Objective-C by jcampbell1 on Wednesday December 26, 2012 @10:19PM (#4972195)
The only difference I know of is that you can override inherited class methods, but not in Java. Is that really an important feature that you use? I suppose you could use it to do "factory" stuff, without an actual factory class.
Re:Java Was Strongly Influenced by Objective-C by malbs on Wednesday December 26, 2012 @10:22PM (#4972207)
exactly!

Imagine my surprise when I disovered Delphi has class methods too, but they were not copied to C#. I guess most of the time they're not particularly useful, but when you do need to create some factory code, having pure virtual class methods (template methods), is really useful.

Downside w/ Delphi is the metaclasses do not implicitly exist - you have to manually define it, eg TMyObjectClass = class of TMyObject; They should just be implicity, when you define a class, the metaclass is defined too. I guess when they first designed it memory constraints were still a consideration