Joshua said:
The primary purpose of unchecked conversions is to facilitate migration
to generics at disparate times.
No, unchecked conversions have other, commonplace uses.
Frameworks/reflection, for starters, and there are other cases where
they can't always be avoided because the compiler sometimes just isn't
smart enough to prove everything the programmer can about what types can
actually be occurring where.
I feel that your response is inadequate.
I frankly don't give a shit, and furthermore, I am getting rather fed up
with your unpleasant attitude toward me. Shape up or stop posting
replies to my posts.
My response was not inadequate. It's possible that your comprehension of
it was. In fact, given the way you are behaving, at this point I'd say
it's even likely.
My guess is that you're dead-set against operator overloading, probably
at least partly for emotional reasons, and that is why you refuse to
actually seriously read and consider proposals for them, and furthermore
why you respond with mild but noticeable rudeness whenever the subject
comes up here.
My suggestion, if your opinion is set in stone and not subject to
further debate, is that you simply ignore other peoples' discussions of
operator overloading and allow them to have such discussions in peace.
See
<
http://groups.google.com/group/comp...a94b1020c6/d1a9b67ddd23f8f9?#d1a9b67ddd23f8f9>
for the start of a thread in which I discussed this particular issue at
length
Sorry, but if you want to explain your reasoning, you'll have to
actually explain your reasoning, not fob me off with some URL that's so
long it won't work (with this news software at least) anyway.
Pointing someone to a canned response is not a discussion, and the
purpose of this newsgroup (like most newsgroups) is discussion, not
shooting down everything anyone says with prefabricated, non-negotiable
responses.
Other postings on that thread reveal my opinions on operator
overloading more clearly.
Oh, this thread has sufficed to make your opinion of operator
overloading more-than-adequately clear.
The problem here is that you apparently feel the need to try to shut
down discussion and impose your opinion on everyone else, by punishing
anyone who tries to discuss operator overloading in an open-minded way.
Said punishment accomplished by being nasty to whoever dared to do so
and by insulting that person in public. Anyone that stands up for
himself and calls you on doing so, of course, gets another dose for his
efforts.
Fortunately for free speech and democracy, you've just stumbled across
someone who will continue to stand up to your bullying and will not
knuckle under to such a childish and anemic form of intimidation. (And
you'd find I'd still not knuckle under to considerably worse forms of
intimidation, if you had as much ability to use force against me as I
suspect you wish you did.)
The appropriate behavior in response to finding speech you don't like on
the Internet is to ignore it, not flame whoever wrote it. Usually
applied to pornography and politics, but equally applicable to operator
overloading.
* You cannot assume that any operation is commutative. Even for stuff
like multiplication (matrix multiplication is, in fact,
non-commutative), the LHS could be causing a mutation and therefore need
to be evaluated before the RHS.
The contract for .plus should include commutativity. That leaves .times.
There, one could specify that if times is noncommutative there be a
..leftHandedTimes (or whatever name seems most suitable) that reverses
the roles of LHS and RHS.
* "Inverting" operations is often perilous. Dividing by a matrix is
conceptually equivalent to multiplying by its (pseudo)inverse, but
inversion is one of the worst things one can do where solving a matrix
equation is preferred.
So is using floats for currency.
It is not the job of the language designer to enforce against every
conceivable misuse of a language feature, least of all to do so by
simply refusing to add any features at all for fear that they might
otherwise be abused.
I can easily picture misuse of / for matrices, but I can easily picture
intelligent use, too. For example, instead of actually inverting the
matrix, .invert or .dividedBy or similarly can generate an object that
symbolically represents the operation applied to the curried arguments,
and only when some method is invoked to try to extract an ordinary
number of some sort out of a chain of computations does the object
representing that chain and its bound arguments begin to perform actual
numeric calculations, which it may then do using whatever strategy seems
appropriate -- perhaps even employing the Strategy Pattern under the
hood to do so. It might, for example, end up performing row reduction of
the matrix together with some other stuff using a numerically-stable
algorithm when used one way, and simply invert the matrix when all you
have is "System.out.println(m.invert());". (In this case, the
inverted-matrix object's toString method would calculate the inverse and
print the results. Probably by row-reducing the matrix adjoined to an
identity matrix, in the textbook-recommended fashion.)
The main thread on which I discussed this
is not relevant to the present discussion. As I have already indicated,
I am not here to argue with canned replies. I am here to have civil and
intelligent discussions with educated adult human beings.
It follows that if you are not interested in doing so then you are not
interested in me, and I therefore recommend that you ignore (or even
killfile) me rather than continue this.
The authority is by the people in charge of the languages--in Java's
case, the JSR expert groups.
The problem here is that you seem to be behaving as if you are
arrogating that authority for your own personal use. Even if you
actually sit on one of those expert groups, you are one voice among
many, and therefore pretending to be somehow "in charge of Java" is
deceptive as well as rude.
No language exists in a vacuum; note that Java's generics feature
is roughly based on C++'s templates, at least in terms of syntax.
But this was not mandatory. It could have been done differently; it just
didn't turn out to be.
(In this case, there don't seem to be all that many alternatives anyway,
other than to change the delimiters to other than < and >. Also,
arguably the use of a very C++-like syntax was a *bad* move because the
semantics are quite different owing to type erasure.)
LISP is not close to Java
My point was that it was one of the first successful high-level
languages, so if your "rule" that languages can't deviate too much from
what else is popular at the time had any actual force, we wouldn't even
be sitting here having this discussion about operator overloading --
you'd have just shot down my suggestion to allow infix notation for
common arithmetic operators instead.
... that makes no sense
To you, perhaps.
To make it less verbose than my example requires several orthogonal steps:
1. A constructor that takes an array of pair objects.
Easily done.
2. A "neat" way to create pair objects.
Pair literals could be added, surely.
3. Reduced verbosity in array creation expressions.
Also quite possible.
If either of the last two does not happen, the creation will end up
being more verbose.
So, some things should happen before other things. This is the substance
of your argument that none of them should happen at all?
In my experience with languages such as C and C++
Your experience with "languages such as C and C++" is not relevant. We
are discussing Java. Your experience with Java is thus the only thing
along those lines that would be relevant.
"... our reactions to basic proposals before repeating the proposal
without adding anything new to say."
So your objection is now that I was *unoriginal* in some way?
No idea exists in a vacuum. You'd be hard pressed to find any idea that
was 100% "original" in this or any other newsgroup, or anywhere else for
that matter.
If you have nothing new to say (as evidenced by your repeatedly pointing
me to some URL with some canned pre-written response you have for all
proposals of operator overloading in Java), and you don't think I have
anything original to say either, then why are you saying anything at
all? Why not just ignore this thread entirely? Why choose to join it and
then complain that it's "not original enough" for your liking? Why go so
far as to actually denigrate the thread's OP for being "unoriginal"? It
can't possibly serve any constructive, Java-discussing purpose for you
to do so, after all.
Why not just step out of the way and let other people discuss any
Java-related topic they please, by just staying out of those topics that
you find tiresome, repetitive, or otherwise uninteresting or annoying,
and especially those to which you don't have anything novel to add?
Why tear someone down for making an effort to be helpful?
Especially, why blast them IN PUBLIC for doing so?
Is making a good-faith effort to be helpful such a serious crime?
It's not that I don't like them, it's just that no one bothers to add
anything new, so it's the same bloody stuff being repeated once every
month or so.
If that's your opinion, then you should just ignore the subject whenever
it comes up. Attacking everyone who wants to participate in such
discussions, simply for doing so, is inappropriate behavior and even,
I'd argue, an affront to the concept of free speech.
I would expect that someone should avoid repeating points belabored to
death before posting something.
I would expect that someone should respect the right of the people to
peacably assemble and discuss Java programming here. If some people here
wish to have a civil, level-headed discussion of operator overloading, I
see nothing in the newsgroup charter to forbid it, or to justify your
hostility towards them for doing so.
Though I notice something else interesting -- you seem to be focusing
that hostility upon me, rather than distributing it evenly among all
those who have participated in this thread in a less "my mind is made
up, operator overloading sucks" fashion. Perhaps because I'm the OP of
the thread in which the subject came up?
No matter. It is inappropriate behavior for an adult to complain about
the topic of a non-off-topic post to an unmoderated Usenet newsgroup,
and inappropriate behavior for an adult to be personally rude and
denigrating towards another person without just cause. I had been
inoffensive and civil when you first publicly impugned my intelligence
and/or competence, and I consider your doing so therefore to have been
uncalled-for.
It doesn't take much effort to determine if what you are about to
add is something that has been recently discussed
Why should I? It's not off-topic for this newsgroup, so if I want to
discuss it, that's well within my rights. And if you *don't* want to
discuss it, ignoring me is well within yours. If, as you seem to be
trying to imply, *nobody* wants to discuss it, they can *all* ignore me.
That they haven't, and that some have been interested rather than
hostile, suggests to me that it is *not* true that *nobody* wants to
discuss it, and your apparent efforts to derail a discussion among
consenting adults is thus especially offensive to anyone who values
freedom of speech and democracy.
If you don't like people discussing operator overloading here, killfile
the phrase, or the threads where it comes up. If you think there should
be a Java programming forum that doesn't have operator overloading
discussions, go start one. PHPBB is free and open source and hosting is
cheap these days, or you could promote the creation of
comp.lang.java.programming.no.operator.overloading.discussions.please.moderated
(or simply go ahead and create
alt.lang.java.programming.no.operator.overloading.discussions.please.moderated).
Perhaps, though, you like to unthinkingly and uncritically bash operator
overloading and anyone who you suspect may not be dead-set against it,
and would much rather do that than simply ignore the entire topic.
In that case, I'd suggest instead
alt.java.operator.overloading.sucks.sucks.sucks as an appropriate group
to create to suit your fancy while leaving those of us who like to
discuss operator overloading in Java civilly to do so here in peace.