Release Notes and GTK3
Release Notes and GTK3
Posted Sep 25, 2008 7:21 UTC (Thu) by tetromino (guest, #33846)In reply to: Release Notes and GTK3 by alankila
Parent article: GNOME 2.24 available
Posted Sep 25, 2008 9:28 UTC (Thu)
by alankila (guest, #47141)
[Link]
Posted Sep 25, 2008 10:30 UTC (Thu)
by epa (subscriber, #39769)
[Link]
C# deals with this in an elegant way by allowing properties with 'get' and 'set' methods which are exposed through the normal syntax. If you don't want the accessor to do anything except set the field, it can be generated for you, so no boilerplate is necessary. I hope other languages will adopt something similar.
Posted Sep 25, 2008 11:36 UTC (Thu)
by dgm (subscriber, #49227)
[Link]
Release Notes and GTK3
Release Notes and GTK3
If you allow direct access to structure fields, there is basically no sane way to implement new classes in languages such as Python or Java.
That's often true, and yet it is a real annoyance to cruft up the syntax with 'a.setY(b.getX())' instead of 'a.y = b.x', and to write boilerplate methods for every field you want to expose.
Release Notes and GTK3
It's not clear to me if you mean mere subclassing in an application's code, or subclassing for writing new classes for others to consume.