h a l f b a k e r ynon-lame halfbakery tagline
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
browse anonymously,
or get an account
and write.
register,
|
|
|
Please log in.
Before you can vote, you need to register.
Please log in or create an account.
|
Flat OO
"Like" construct replaces Object Oriented inheritance and interface writing | |
Compiling the following definitions in FlatOO gives an object hierarchy in a regular OO language (smalltalk, java, C#, C++...)
So you dont need to "design" the hierarchy.
The compiler can also find equivalents, and shorten your code, and the IDE can help you when you write Different or Like to show
you what the possibilities are.
Struct S:
...
Object A:
Member m
Method:a()
Params: b,c,d
Returns: Like S
Property:P
Set params: e,f.
Returns: Like method a
Object B
Like A
Without P
Different B Insteadof bla1 Does blu
Different B Insteadof bla2 Does blu1
Different B returns C
[link]
|
|
trusting you know what you are talking about |
|
|
Uh...... hmm... uh.. uh..
I am so lost and confused that I decided to bun it also. |
|
|
[m-f-d], Genetic engineering magic. |
|
|
If you understand this domain then comment, else don't. |
|
|
Especially clueless mfd suggestions. |
|
|
It's a joke, [bris], but not a clueless one. In this idea [pashute] has replaced normal OO polymorphism with a more granular and controlled method of inheritance (and the reverse), much like genetic engineering. If I were mfd-ing, I'd spell it out. |
|
|
Ah, okay. Sorry, [Shz]. I think I have a vague notion of what is being proposed but it's well out of my understanding. |
|
|
Not sure I understand the expression, "Although not entirely exactly like this at all...," either. ;-) |
|
|
No worries, [bris] - it's Friday! I have no idea if a compiler can be written to understand this, but it is an interesting concept, possibly deserving a paradigm name of its own, and certainly halfbaked, so +. |
|
|
So this is nothing to do with model railways...? |
|
|
This is nice. Very nice. I know exactly what you are saying. Would be hell to write the first compiler, but still. |
|
|
As a Java programmer-in-the-making, I know this would be very, very, useful. It is hard to explain to non-programmers. |
|
|
Big, hearty programmer's bun for you. |
|
|
Thanks and sorry to all non-programmers. I dont know what the javascripts prototype is, but here I'm "deleting" as well as adding functionality directly to an inherited class, from it's "brother.
When you compile, you get an automatic class hierarchy, perhaps asking you if it should be interface implementation or class inheritance. |
|
|
FlatOO is about making programming easier. |
|
|
I suppose you Are using arraylists, databasese objects, web or XML objects etc. All of these extensively use inheritance and interfacing. Anything that is not just an end package (i.e. any DLL or API or framework) must use inheritance. And that is what FlatOO is for. If you are just writing a WinForm with a few buttons, use the current langauges and available IDEs. |
|
|
Well, take of the lipstick and the fishnet stockings, and remove that stupid wig! |
|
|
na, i like the only difference being my choice of who i have sex with. |
|
| |