Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For example, why is it not easy to add an "onClick" event handler method to a particular button in a Java GUI?

Lack of pointers. An event reference is a double pointer: to the method and to the object that is "self" or "this" for the execution of the event handler. Since they refused to have pointers in the language, they devised that convoluted solution.



When I try to design an "ideal" GUI system on paper, I start with a relational model. Relational is quite adept at dealing with "pointers" in terms of foreign keys. A given snippet of behavior (such as an event-handler method) can be easily associated with multiple things; something OOP has a hard time with. Thus, we don't have to go back to direct address pointers to solve this issue, but rather learn from relational modelling, as I hinted at in a nearby reply.

(One problem with traditional RDBMS and GUI's is that different widgets need a variety of similar and often overlapping attributes {columns}. It's not realistic to have a table dedicated to each widget "type". Thus, I propose using "dynamic relational" instead, in which column existence is optionally situational.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: