Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Don Kiddick:
For instance the Template Method pattern.
For instance the Template Method pattern.
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Tony Morris:
Ernest, are you proposing a language? I already have one underway.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ernest Friedman-Hill:
I wonder if even this is missing a crucial final step. Maybe classes are types at all -- only interfaces are.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tony Morris
Java Q&A (FAQ, Trivia)
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
.Originally posted by Ernest Friedman-Hill:
I wonder if even this is missing a crucial final step. Maybe classes aren't types at all -- only interfaces are. What would the language look like if you couldn't even declare a variable of class type?
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Ilja Preuss:
I have the strong feeling that this is an instance of different Software Development Attitudes.
Originally posted by Michael Ernest:
I've been thinking a while myself about writing a language that starts with what good sample code would look like, then working back to the structure needed to support it. A somewhat different project than yours, EFH, but one that speaks to the final question you posed. Why not decide how it should look, then work backwards?
I've been thinking a while myself about writing a language that starts with what good sample code would look like, then working back to the structure needed to support it.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Ernest Friedman-Hill:
My recent worry about this whole "concrete inheritance" issue is actually not due to mistakes made by Sun in the APIs, although those are legion. My interest is due to design mistakes I myself made as a younger man, when Java itself was quite new, that I even now still have to live with.
Ten years ago, I was, unsurprisingly, ten years less experienced, and didn't know the headaches I was causing. I feel the need to do some directing of my own sweet self, via a time machine.
Barring that, a language that stops other younger programmers from making similar mistakes seems quite appealing to me.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
To live with in which ways? Why can't you refactor, for example?
Originally posted by Ernest Friedman-Hill:
Public APIs are forever
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tony Morris
Java Q&A (FAQ, Trivia)
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Originally posted by Tony Morris:
By ensuring symbiotism on your interface operations, only exposing as much implementation detail as you need to (such as declaring only final classes, private constructors and avoiding other language constructs that violate encapsulation) you would never have the problem of having a broken public API.
In fact, that is one of the many joys of inheritance; if you need to add an operation, you simply inherit from existing operations while maintaining type safety. If you need to *remove* an operation, you didn't have symbiotism in the first place, and as a result (though not directly), it's an invalid software requirement, and the whole thing should be rewritten; of course, in practice, this may be unacceptable, in which case, you provide the optimal workaround, which is context dependant.
I'm not sure I'm following you - just want to notice that "adding an operation" is not my typical use of inheritance.
It seems to me that we continually talk about encountered problems without acknowledging the underlying fundamental flaws. Concrete inheritance is an implicit software requirement defect.
You keep saying that, and I keep not understanding what you mean by it. So until we find a way for me to understand what you mean by "concrete inheritance being an implicite software requirements defect", I feel unable to discuss in which ways I see it as a fundamental flaw.
Part of my problem might be related to the fact that I don't see requirements as a strong driver in deciding about the usage of inheritance. To me, maintainability and extensibility are much stronger forces on the structure of the solution domain (i.e. the system that is supposed to solve the problem) then the structure of the problem domain (the requirements) is.
[ September 10, 2005: Message edited by: Ilja Preuss ]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
My preferred approach to public APIs is to only publish interfaces and factories.
Still, I don't see how any approach could fully prevent the need to change a public API. After all, the requirements on the API change with time, and with the requirements possibly even what is considered implementation detail.
I'm not sure I'm following you - just want to notice that "adding an operation" is not my typical use of inheritance.
You keep saying that, and I keep not understanding what you mean by it. So until we find a way for me to understand what you mean by "concrete inheritance being an implicite software requirements defect", I feel unable to discuss in which ways I see it as a fundamental flaw.
Part of my problem might be related to the fact that I don't see requirements as a strong driver in deciding about the usage of inheritance. To me, maintainability and extensibility are much stronger forces on the structure of the solution domain (i.e. the system that is supposed to solve the problem) then the structure of the problem domain (the requirements) is.
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Ilja Preuss:
I have the vague feeling that making mistakes simply is part of the learning experience. So I'm not sure that a language should protect us from that. I feel more inclined to belief that beginners should be guided by experienced mentors. Might just be me, though...
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
"I'm not back." - Bill Harding, Twister
Originally posted by Ernest Friedman-Hill:
I can't find anything specific to disagree with here, but this line of argument still makes me uneasy. If giving the programmer all the rope they need to hang themself is a good idea, why are we programming in Java rather than C++? Surely C++ lets you do many things that Java doesn't.
Good programming tools let you think about the problem, rather than about your process. Rather than asking people to avoid certain possibilities because they lead to trouble, doesn't simply making those troublesome possibilities illegal make everyone ultimately more productive? It's one less thing to worry about.
Isn't that what Java was designed to accomplish?
So is Java Newspeak already? Or is it not Newspeak enough?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Michael Ernest:
Making mistakes is one way to call it; experimentation is another. Finding fault in the process seems to me needlessly harsh. Finding the edge at which things seem to work by themselves or don't is, outside the realm of personal safety, a critical step. People who aren't willing to experiment never get the insights that come from that.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ernest Friedman-Hill:
Good programming tools let you think about the problem, rather than about your process. Rather than asking people to avoid certain possibilities because they lead to trouble, doesn't simply making those troublesome possibilities illegal make everyone ultimately more productive?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Originally posted by Michael Ernest:
I think general-purpose programming is still more art than science and will be for some time.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Sorry, my dictionary doesn't know "newspeak"...
Originally posted by Jim Yingst:
[CLG]: In reviewing my code I notice all (slight exageration) my classes are either abstract or final. I guess I dont have much concrete inheritance.
No, concrete inheritance refers to inheriting an implementation, as opposed to inheriting only a declaration. Whenever you extend a class, you're inheriting method implementations - that's what's meant by concrete inheritance here. Conversely if you implement or extend an interface (with a class or interface, respectively), you're not inheriting implementations, only declarations. If you've got abstract classes, you must be extending them - thus, you're using concrete inheritance.
[ September 12, 2005: Message edited by: Jim Yingst ]
Originally posted by Ernest Friedman-Hill:
Inheriting implementation from a class is one thing, but inheriting type is quite another.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|