Re: 7.0 wishlist?
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Sun, 02 Nov 2008 16:19:45 -0500
Harold Yarmouth wrote:
Just as they make unchecked casts of generic collections at their own risk right now, and prefer to avoid doing so whenever possible.
The primary purpose of unchecked conversions is to facilitate migration to generics at disparate times.
For operations that are ... what is the term? Commutative? It can look for the "plus" method in the RHS if the LHS lacks it. Alternatively the programmer has to do matrix * 2 instead -- big whup.
See <http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/444250a94b1020c6/d1a9b67ddd23f8f9?#d1a9b67ddd23f8f9> for the start of a thread in which I discussed this particular issue at length, and why I feel that your response is inadequate. Other postings on that thread reveal my opinions on operator overloading more clearly.
In particular:
* 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.
* "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.
I'm sorry. I assumed you had been a denizen of this newsgroup for a while and therefore had seen my copious commentary of operator overloading in the past year or two (which has come up in at least three separate threads).
A quick Google Groups search should have disabused you of that notion.
The main thread on which I discussed this was titled Java 7 Features. You now have a link to said thread, so I need not repeat the several dozen posts anymore.
They are relevant.
They are irrelevant. We are discussing Java. If languages were not allowed (by who? nobody has this authority anyway) to be too different from one another, we'd probably all be sitting here discussing Java 7's implementation of cons, car, and cdr for Chrissake.
The authority is by the people in charge of the languages--in Java's case, the JSR expert groups. 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.
LISP is not close to Java (they have completely disparate influence trees), but something like, say, PHP (which shares a moderate influence with C, C++, and Java) is closer.
~= perhaps, for equals()?
o_O ... that makes no sense in terms of syntax.
But it is awkward and verbose.
To make it less verbose than my example requires several orthogonal steps:
1. A constructor that takes an array of pair objects.
2. A "neat" way to create pair objects.
3. Reduced verbosity in array creation expressions.
If either of the last two does not happen, the creation will end up being more verbose.
Usually that would be apparent from context. Quite often, the very preceding line will have resembled "x = foo.get("string");".
In my experience with languages such as C and C++, this does not happen as often as you think.
I have many problems with closures, and so do many others in this newsgroup. My (and others') complaints are well-documented on this newsgroup. I cannot feel any sympathy for you if you did not look to gauge our reactions to basic
Your sentence dead-ends in mid-air.
So it does. I think the original statement was supposed to be something like this:
"... our reactions to basic proposals before repeating the proposal without adding anything new to say."
And once more with emphasis, if you do not like discussions of closures you're free not to read them. Launching a rant sprinkled with personal attacks against someone for mentioning them in your presence is not appropriate, adult behavior.
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. Operator overloading and closures in particular
I didn't look to "gauge your reactions" because I shouldn't have to. I should be able to expect civility so long as I have been civil myself, and so long as what I write here is on topic here, even if you disagree with my opinion.
I would expect that someone should avoid repeating points belabored to death before posting something. It doesn't take much effort to determine if what you are about to add is something that has been recently discussed in grand detail.
since SomeEnum$A, SomeEnum$B, and SomeEnum$C inherit SomeEnum.
That has been discussed elsewhere in this thread.
Indeed, let us move it thither.
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.
- Follow-Ups:
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- References:
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- Prev by Date: Re: 7.0 wishlist?
- Next by Date: Re: 7.0 wishlist?
- Previous by thread: Re: 7.0 wishlist?
- Next by thread: Re: 7.0 wishlist?
- Index(es):
Relevant Pages
|