Finally, we did discover the ability to auto-generate base classes via annotation processors. It's not immediately clear that this is possible from perusing the documentation, but this approach does open up a lot of doors...public interface MyTraitwould be huge -- and only requires that interfaces be allowed to provide implementation [and something like MyTrait.operateOnFoo() in cases where there is ambiguity between implementations]. One could also introduce a new contextual keyword of "trait" rather than "interface" here for clarity, but that seems unnecessary.
{
public Foo getFoo();
public void operateOnFoo()
{
// default implementation calling getFoo() as needed
}
}
Things are different if one pretend that 1.000 or 10.000 people make a
decision to change Java that will affect everybody. My personal
experience is that the vast majority of my customers (I'm talking of
several firms from small to large) don't give a bit for closures (just
to make an example), don't feel they need it, don't feel they like it
and are neutral or negative with them. My personal experience with
forums or mailing lists of various human activities (not necessarily
technological ones) is that they might have thousands of subscribers,
while the traffic is lead by tens of them. Thus, any discussion made by
those tens of persons can't be deemed of representative of the whole
community.
*** I don't think that neither blogs or mailing lists are true
representative of the reality out there (technological, political, or
what else). *** They only make more noise, but the standard rules for
democracy are still "one head, one vote", so they only count for
themselves. That's why, for instance, to elect a government blogs and
such can be thought as influential, but in the end you do count any
single vote.
As I said, this has to do with how do you define community: people who
attend blogs, mailing lists and conferences, or the whole set of users.
Of course I reckon that there is a problem with the latter, as we can't
measure it. Neither I'm pretending that Sun was right in not accepting
BGGA because they allegedly know the wishes or the whole set of users.
Neither I can, of course, pretend that I or my customers are
representative of the majority. But even if we accept the former
definition of community, I think that before declaring that the
community wants something, we need some sort of poll that, while
shouldn't necessarily be as formal and controlled like an election poll,
must be decently structured. For instance, Java.Net polls are not good,
figure out if I think that generically quoting bloggers' enthusiasm is good.
Given that, I'm not proposing to set up such a poll, because I don't
know how to set it up (and nobody says that a technical community is a
"democracy" in the strict sense - in fact, it isn't). A good half+ of my
customers don't even know or read Java.Net, DZone.com or JavaPosse or
attend a JUG, so I wouldn't be able to say how to reach and ask to
everybody. I'm only saying that in this situation, I'm all but
scandalized if Sun takes decisions such as not putting BGGA or other
stuff in the JDK. They can be technically wrong, but I don't think one
can prove they are deciding against the community will.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio...@tidalwave.it - mobile: +39 348.150.6941
> however, is what they struggle with daily and what would excite them.
> And I should add that my definition of a community does not cover the
> JCP members who are not really interested in Java per se, but much
> more interested in profiting on their latest SOA vendor lock-in.
>
I'm not interested in judging the JCP members, also because I don't know
any. Still, your point about asking what the "community" struggle with
and what would excite them can't avoid facing with the problem of
defining the community. In my partial view of the community, the part
that I can experience, I've already said that almost nobody is
interested in what are usually considered the "hot" topics. I don't
think any can "proof" his own perspective is the right one.
> So as an engineer interested in improving my day-to-day environment I
> have only a few options 1) become a cubicle robot and not care about
> this stuff at all, 2) be a loudmouth and try to push what I feel is
> good taste in programming, 3) find another job where I can choose a
> stack that makes me feel productive and passionate again or 4) help in
> undermining official Java and put my faith in the grassroots of the
> community i.e. Lombok. Given the relatively mute blogosphere
> surrounding JDK7, I am probably not the only one contemplating these
> options.
>
But I agree - I don't think we have to shut up. Shutting up is always a
bad solution. I myself I can show off a good record of "whines" and
complains ;-) especially on some topics (did anybody say "Apple"?).
Still, I don't pretend I'm representative of a majority or a minority.
Also because we tend to work with customers that share our same
sympathies - e.g. I could say that I don't see people around me working
with .NET, but certainly I don't infer that .NET is irrelevant or such.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
So, why doesn't somebody just pull J7 out? I mean, a language that
instead of being a totally new thing such as Groovy or Scala, is
basically "what-the-community-allegedly-wants-for-Java-7". In my point
it would be probably a bad idea, as I prefer Java to stay conservative
and new things to appear on brand new stuff, but people who are asking
to make JDK 7 in a different way clearly think different. The tech tools
are there and have been enumerated by jddarcy.
Pull it out and throw it to the wolves - and let the "community" decide
in the broader sense ("competition") of my previous post.
Good points, but I still see troubles:
1. You're assuming that the "vocal" people are the smartest guys (=
winners in a meritocratic context). I doubt that the two groups are the
same, even though it's clear that some of the vocal people are smart.
2. Even pretending the previous point is a non issue, you're assuming
that what the smartest people decide is good for the masses. This is not
always true.
The second point is very complex to explain, so I'm trying with an
example. One of the recurring criticism about why Java is too
conservative, or why more modern APIs haven't been developed, is the
constraint about binary retro-compatibility. Managing a breakage in
retro-compatibility is a matter of being good in software development
practices, basically refactoring and testing. It sounds quite obvious to
me that the smartest guys are pretty good in those practices, so it they
called for breaking retro-compatibility, it wouldn't be absurd *in their
perspective*. Unfortunately, 95% of the world doesn't work with best
practices, doesn't test (enough) and fears refactoring like hell. Break
retro-compatibility and you'll have tons of people lag with older Java
versions for years, and when they are forced to switch the up-to-date
Java will be so different from what they're working on that they will
have equal chances to move to something else (not counting those that
will move sooner, angry for the break). Voilà, in a few years this would
turn a mass-language into an elite language.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
Oh, if only it were that easy! I once spent an entire *week* on a 3
line *bug fix* for the Windows Look and Feel only to have to *remove
it* later due to backwards compatibility breakage. The work required
on language changes is far far greater, and the cost of compatibility
far more challenging.
It's just not easy doing software engineering on something that must
be used, compatibly, on nearly a billion computers.
Oh, I'm sure it's difficult. None of that changes the fact that we're
all perfectly capable of judging new language features with:
- a readable description that is NOT up to JLS standard.
OVERVIEW
Provide a two sentence or shorter description of these five aspects of the feature:
FEATURE SUMMARY: Should be suitable as a summary in a language tutorial.
MAJOR ADVANTAGE: What makes the proposal a favorable change?
MAJOR BENEFIT: Why is the platform better if the proposal is adopted?
MAJOR DISADVANTAGE: There is always a cost.
ALTERNATIVES: Can the benefits and advantages be had some way without a language change?
- a thorough pros and cons list
- plenty of 'real life' examples, preferably not constructed just to
highlight the feature, but created by taking existing code and
refactoring it to the hypothetical new feature
EXAMPLES
Show us the code!
SIMPLE EXAMPLE: Show the simplest possible program utilizing the new feature.
ADVANCED EXAMPLE: Show advanced usage(s) of the feature.
- (optional, at least at first) some analysis on how to feasibly
extend the grammar to accommodate the feature without changing javac's
parser architecture
compared to:
- a JLS patch
- a prototype
I'd argue the first list is actually quite a bit more useful.
And far
less effort to create.
I'm also not hearing you say that sun engineers
themselves write up JLS chapter and verse BEFORE doing any of the
other, dare I say, far more interesting work (even if it is hard
work).
Firstly, perhaps folks out to go back and listen to the first 20
minutes of episode 277. The emphasis of that discussion was in no way
bullying anyone from the pulpit, not negative in context, it was more
of a "hey, isn't this Lombok a clever way around the current obstacles
facing engineers that want to cut boilerplate in Java code".
Somehow this got personal, and I assure it was not us that made it so.
Other threads in this group tell a larger story. Lombok does not seem
to be popular with some folks and they are very negative about it.
Returning to the comments about BGGA, I think the issue here is not
the closures themselves, but more that Neal put in a tremendous amount
of work and did everything by the book, and the result of the refusal
of closures has harmed the perception that putting in that much work
will make a difference.
Neal has also stated here and on other blogs
about this issue that he not only had a working prototype of the
exception multi-catch language change but also volunteered time to
complete it in isolation of closures, and that point has not been
addressed by anyone, either to explain why he was not taken up on the
offer, or to correct the record. If someone with the skills and energy
of Neal doesn't get his chance, is it any wonder people are looking
for more reliable ways to make a difference?
Well no matter how you cut it, the amount of stuff that has beendropped is staggering
On Sep 15, 11:28 pm, Bob Lee <crazybob...@gmail.com> wrote:That's the crux of the situation, isn't it?
> I don't know where multicatch stands. You'll have to ask Neal and Joe. If
> it's out, I'm sure there's a good reason.
Where's that reason? We keep coming back again and again to the exact
same point:
We're trying to help by explaining why the community is not responding
the way Joe had hoped for, and is instead moving towards things like
lombok.
If you up the odds considerably by asking people to put in the
JLS efforts ONLY after giving them a tentative guarantee that if the
work is done and no surprises crop up, the proposal will far more
likely be in than be left out, *I* would definitely be a lot more
jazzed to put in that effort. I'm making a guesstimate that the rest
of the community would be similarly willing to do so.
Every other bit (and more) on the coin form eventually becomes
relevant, but please, pretty please, with sugar on top, start
including the decision process into the iterative process, instead of
asking everybody to iterate their way to loads of personal time before
eliminating all that hard work in one fell swoop by simply not listing
it on the shortlist. I can guarantee you more involvement from me, and
if I'm getting the pulse of this thread's participants right, I won't
be the only one.
There were a few proposals that didn't make it that
nevertheless received some positive feedback and went through a bunch
of iterations (case in point: Neal's exception handling proposal!),
that were nevertheless not shortlisted.
Peter
Joe specifically complained about a lack of prototypes in various
places. Here's a verbatim quote from a comment he left on his own blog
( http://blogs.sun.com/darcy/entry/project_coin_final_five ):
> Project Coin explicitly encouraged prototypes as a way to demonstrate the feasibility and utility of a change via an existence proof.
> Yet, despite all this, most of the proposals sent to Project Coin did not have a corresponding prototype, including improved exception handling.
> Rather than complaining after the fact, a more constructive way to influence future language decision is helping to hack prototypes ahead of time.
The reality of bringing a new language into an exisiting organization is that it just isn’t that easy. Managers and the like see it as another thing they have to maintain. Organizations limit the number of languages in house for both maintenance and support reasons. It's much easier to get an organization to support a new version of the jdk then it is to introduce and new language into the organization.
I know that the default answer is that if you want to use language feature “x” then use another vm language. There is nothing wrong with this , but it is also an invitation to investigage a language that is not on vm.
Alex
The discussion did bring up cases where compilation against different JDK library versions was required. This problem is rather annoying in cases. For instance, the JDBC Connection API in Java 6 adds a whole lot of methods, many of which use classes only found in Java 6. Thus if you have a FilteredConnection class that implements Connection, you have to compile a different source file if using JDK 5 than for JDK 6 -- there's no FilteredConnection source that will compile under both. Yes, in this case a dynamic proxy would work around the issue. Overall, however, there seems to be an overly cavalier attitude towards growing existing interfaces rather than adding other interfaces that are used as mixins. JDBC appears to be the worst case -- forcing one to compile lots of code with Java 5 in order to run under Java 5 irrespective of -source and -target flags. In the end, however, this whole mess is different than the -source issue -- and can only be addressed by considering such issues when making JDK API changes.
In regards to the coin form: You didn't answer my question, Joe, you
just went on the defense. Why not accept proposals based on less
officious bits and more useful bits, and make decisions earlier? You
yourself said string switch took you 8+ hours to write up including
feedback. You're the coin lead, you knew it had a good chance of
making it. You're a JLS and langtools expert. You know exactly what
you want from the proposal. T
he people you want input from would have
needed 24 full hours or more, and would instead have the knowledge
that the effort has at best slim chances of making it in. Why are you
surprised the community isn't putting in as many proposals as you
wanted?
(I know that's not how you've written up string, but exact
implementation is irrelevant at the decision stage of the process, as
long as its obvious it won't be particularly difficult to find a
workable one).
he people you want input from would have
needed 24 full hours or more, and would instead have the knowledge
that the effort has at best slim chances of making it in. Why are you
surprised the community isn't putting in as many proposals as you
wanted?
I would actually have preferred many fewer proposals of higher quality being submitted. Being able to focus on 10-20 proposals would have been more producive. The proposals could have been moderated before hitting the list to provide an initial vetting, but at least this first time around we did want to turn people away before "approaching the doorstep." Future projects may make different tradeoffs.
I will repeat: no one was obliged to send in proposals to Project Coin. Attempts were made to set expectations before the call for proposals started. Evolving the language in a responsible fashion is a lot fo work. Coin invited others to participate in that work and, yes, that work can be time consuming. My numerous blog entries on the subject should have made clear changing the Java language is not a trivial undertaking.
(warning, this is long).
It's easier to invent a new language than improve the old one for the
same reason it's far faster and cheaper to build a brand new road then
to do minor repairs on an existing road that's *in use*. This is just
the nature of software. Once something ships and is used by customers
it instantly becomes legacy. And the more people use it the harder it
becomes to change. Over the last 30 years of software development
we've come up with lots of tricks to address this, but it's still a
very hard problem with no easy answers.