Re: Static vs Dynamic
From: Darren (pyedarren_at_hotmail.com)
Date: 10/28/04
- Next message: Mario S. Mommer: "Re: C++ sucks for games"
- Previous message: Pekka Niiranen: "Re: clisp on the rise?"
- In reply to: Matthew Danish: "Re: Static vs Dynamic"
- Next in thread: Pascal Costanza: "Re: Static vs Dynamic"
- Reply: Pascal Costanza: "Re: Static vs Dynamic"
- Reply: Matthew Danish: "Re: Static vs Dynamic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 08:15:04 -0700
Matthew Danish <mrd+nospam@cmu.edu> wrote in message news:<87wtxdt7uh.fsf@mapcar.org>...
> pyedarren@hotmail.com (Darren) writes:
> > If you are a bad Java OO designer, yes. You gain nothing particularly
> > useful from either. If you have a good design, you have scoping and
> > checking when you should and you dont rely on casts to fix your lack
> > of design. Casting in the examples we have been evaluating is only
> > necessary because the designs are bad.
>
> No; casting is necessary in order to have polymorphism in Java. If
> you have been paying attention to my other responses, you would
> realize that Java's way of doing polymorphism is inferior and badly
> designed. It is Java's fault.
It is necessary to a degree yes, but if you have to cast excessively
you have an inefficient and poor design and that's not Java's fault.
>
> > You can very easily using reflection without casts. See my solution
> > to Pascal's Visitor Pattern problem. When using reflection properly
> > you don't even need casts...and its the static types that allow you to
> > do it.
>
> This is funny. Do you know where the ideas behind Java's "reflection"
> API come from? Take a wild guess.
Yes I know where it came from. Many languages have capabilities that
were inspired by Lisp. Lisp has many powerful ideas. I use Linux
from time to time, maybe Linux is funny because it was inspired by
unix? Maybe Lisp is funny because it was inspired by machine code?
What's your point?
>
> (And using reflection in such a manner is still quite ridiculous,
> remember what reflection is for: inquiring about the system, and
> perform operations upon the system itself; not for manipulating
> objects within the system!)
That's *one* use of reflection. It is intended for MUCH more then
that. Using reflection like I have is done all the time. Probably
not by Joe IT programmer, but by people that know the language. Ever
hear of J2EE, Javabeans, IDE's, debuggers, Beanshell...(insert
hundreds of other applications here) take a guess how they work.
>From your "funny" response, I am sure you have no idea about Java or
how to properly use it. Which might explain why you end up with so
many casts and see it as a huge problem.
- Next message: Mario S. Mommer: "Re: C++ sucks for games"
- Previous message: Pekka Niiranen: "Re: clisp on the rise?"
- In reply to: Matthew Danish: "Re: Static vs Dynamic"
- Next in thread: Pascal Costanza: "Re: Static vs Dynamic"
- Reply: Pascal Costanza: "Re: Static vs Dynamic"
- Reply: Matthew Danish: "Re: Static vs Dynamic"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|