|
|
Subscribe / Log in / New account

Object-oriented design patterns in the kernel, part 1

Object-oriented design patterns in the kernel, part 1

Posted Jun 2, 2011 21:46 UTC (Thu) by cmccabe (guest, #60281)
In reply to: Object-oriented design patterns in the kernel, part 1 by juliank
Parent article: Object-oriented design patterns in the kernel, part 1

> The language coming closest to the optimum is Vala. Private fields are not
> part of an objects ABI, neither is (for callees) whether a method is
> virtual or not.

I'm pretty sure private fields are not part of the ABI in Java, either. Your jar files will continue to work when someone changes private fields in a different jar. It's a nice feature and a lot of modern programming languages have it.

And as you noted, C has it as well. Private stuff stays private in C (as opposed to C++.)

C.


to post comments

Object-oriented design patterns in the kernel, part 1

Posted Jun 2, 2011 23:45 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

Java has very loose ABI. It's possible to add new public methods without breaking it or even modify existing methods to some degree.

There's a nice description here: http://wiki.eclipse.org/Evolving_Java-based_APIs_2

The fact that Java bytecode is essentially a lightly-parsed source code helps immensely.

Object-oriented design patterns in the kernel, part 1

Posted Jun 8, 2011 19:22 UTC (Wed) by marcH (subscriber, #57642) [Link]

Linking at start time makes Java very flexible indeed. It is also what makes every Java program insanely slow to start up.

You cannot have your cake and eat it.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds