194 points · by Mitt · 14y ago · 134 comments
"A plan is useless, but planning is essential" [1]
More true than ever, if you ask me. Sure, you make plans, why wouldn't you? But you also retain the flexibility to adapt the plan as the environment changes. You don't chisel the damn plan into a stack of stone tablets and render it immutable for all time.
I don't see any conflict whatsoever in planning out through 2021. I would say that in doing so, there's an implicit assumption that the plan - especially the farther reaches of it - are subject to change and are based on current best guesses.
[1]: paraphrase of a quote attributed to Dwight Eisenhower, which was probably in turn a paraphrase of another quote. http://en.wikiquote.org/wiki/Dwight_D._Eisenhower
What happened at back-end, like server-side functionality of business apps? They didn't really change and probably won't change for a longer period of time. Even stuff like Hadoop for big data or Groovy for DSLs were built upon the existing JVM.
It's hard to say what devices we'll have in 5 years, or what internet would look like, but i'm pretty sure servers would run good old Java.
I think the point is more that 5+ year planning in the tech industry is simply pointless, not that all technologies will be replaced. Sure, there are some constants. We can all safely predict that in five years we'll still be writing drivers and middleware in C, still be using zlib and libjpeg, etc...
Hadoop become popular for handling big data, but I'm not sure if many are using Groovy for DSL's. The 2 big uses for Groovy in industry seem to be (1) scripting on Grails, and (2) quick standalone scripts for testing or booting Java code. For these it rocks but the stuff added after Groovy 1.0, such as DSL's, isn't really being used much.
Blackberry remains much more relevant than windows phone. You also forgot to mention Bada which also has more share than wp and is growing. I'm not trying to beat up on wp but as it stands reality conflicts significantly with marketing.
Edit: why the down mod? if I'm in error, please point out where.
That would be way faster and they learned so much by now to make a great successor. Who wants a Java 1.x in 2040?
Sometimes full rewrites are necessary and good. The trick is doing it correctly. Rewrites are riskier, more difficult, and require more development resources than greenfield development. More so when you consider that you can't just abandon the old code until the new code is mature and has proven itself.
Most people do rewrites the wrong way, and they get into trouble, but that doesn't mean there isn't a right way. There are many examples of unsuccessful rewrites in history, but also many examples of highly successful ones.
On the contrary, there has been a number of times that I've completely rewritten some code to use a framework or library that was already battle-tested and more fully-featured than the previous effort. I ended up saving myself from writing code that already exists.
Also, IMO there's no chance of Perl 6 being successful in time (which makes me sad, because 10 years ago or so I was really hopeful about it).
I've used Ruby for almost as long, and on MRI at least, I can't think of anything as significant. (JRuby FTW)
Think of c#'s evolution. Ruby's. JavaScript's. SQL's. 9 years isn't exactly blazingly aggressive, but in the context of a programming language it's not eyebrow raising either.
I think generally that's a good thing.
I'm no Oracle fanboi, but I bet without the legal and corporate circus, they will iterate faster.
And business planning is always done like this.
If Java no longer remains useful to Oracle expect the same thing what happened to things like flash.
It will be donated to Apache software foundation.
One thing not touched on in the article but would definitely be worth know is if Oracle will start inserting "pay-to-use" features in the language or release a solid JIT compiler and run time companies must pay for in order to use. I know it's been bandied about in the past that Oracle might start restricting access to some language features and with such a long term roadmap, I'm wondering if they're thinking about making some of these selling point features into business revenue features.
(Fuck boxed primitive types. How about generics that weren't designed by drunk retarded monkeys?)
The problem with Java today is how big and bloated it has become while it doesn't solve fundamental problems programmers face. Its growingly becoming impossible to program in Java without an IDE. Only Java ninjas can probably program Java with a Text editor. Its XML mess all over the place.
Now it takes several tens of lines of code to do trivial file operations and other trivial tasks. This problem was long solved with languages like Perl and Python around 20 years back. Its almost two decades and Java still hasn't caught up. There are still no practical lambdas and good functional programming capabilities.
The issue is something like this. By asking everything to become an API of some sort and writing so many method calls both my unit tests and exception handling code bloats like crazy. My eyes cringe every time I open a Java class file and nearly 60% of the code in there is either try/catch statements or some form get/set methods.
The code to boilerplate ratio is too high. And it just doesn't feel like a language that belongs to the 2010's. Java and its community also promotes heavy use of XML's often used as bad replacements for RDBMS, this leads to building of small buggy and wrongly built DSL equivalents of small parts of SQL all the time.
The path from now is not the make the language bloat like crazy and then provide IDE's to handle that. It is to make the language syntax intelligent enough to take care of many problems you have to other wise worry about. If you see the whole concept of Lisp and other extensible languages like Perl are all about. To provide forms of extensibility that solve the code scalability problem.
And lastly and unfortunately the Java market is full of substandard programmers whose life begins and ends inside eclipse.
A manager or a pointy haired boss might prefer Java for hiring cheap programmers and the 'Oracle factor'. But Java is dead for Start up's and other sexy glorious projects.
It shocks me that a major company like Oracle would be so foolish as to make a statement like this. Stating that something is not is one of the most effective ways to imply that it is and the speaker knows it.
Edit: I remember reading this years ago and have been unable to track it down. Would love it if somebody did.
Another way to put it is that psychologically, a statement and its negation are not opposites but rather go together. The same idea comes up in hypnosis, where it is said that the unconscious mind drops the "not" and simply receives the images that are given. For the same reason, it's better to say "Remember" than "Don't forget", which is a kind of subliminal invitation to forget. And so on.
If Oracle's plan is to keep Java alive as a glue for their DB that strategy would work fine.
But it would be a long term disaster in terms of overall innovation, and long term viability for choosing everyday projects.
What about Android apps?
What about solid back-end?
What about Google AppEngine-Java?
People are still using Java for everyday projects and I don't see a disaster coming anytime soon.
There's lots of old, conservative, slowly changing companies out there that have craploads of money and need (for certain meanings of the term) Oracle. Having control over Java gives them a lot more leverage in those markets, too.
public class CompoundObject {
int i;
int j;
double k;
}
This class's data members are all a few bytes away from each other, so once the object is loaded into the CPU cache, all operations should be fast. With boxed types, you might get 3 cache misses when accessing i,j,k.On the other hand, referential transparency can help here. Given referential transparency, the compiler can transparently unbox Integers and translate method calls. So if Oracle does it right, rather than slowing down unboxed code, this might just speed up boxed code.
Even if these things turn out to be impossible to optimize at compile time, they're probably then betting on JIT functionality to detect primitive objects that are only used as primitives.
I either imagine hardware progressing so far in the next decade that this is absolutely moot or the language changing directions and some surprise coming out of left field to change this gameplan.
For example Dylan language doesn't have primitives as such. The d2c compiler passes objects around as a two-element struct containing a type tag and a value (in practice values get passed around in a pair of registers). Now, if you have a field with the declaration <object>, and you store a <double> in there, then the field will consist of two words: a type tag and the double itself. However, if the field is declared as a <double>, then the field will be stored as just the double, and the field accessor code will add the (constant) type tag as the field is read.
Such a thing could be done in Java if Oracle added structs. They're basically just "unboxed objects". I believe there's more to it than that, but that's the basic idea.
I know the article didn't mention it, I also wonder what the memory bloat will look like when they turn all primitives into Objects and introduce object overhead just to track int i in a for loop.
These slides were posted last November, so they're probably a bit stale, but might give some insights: http://www.slideshare.net/JAX_London/keynote-to-java-se-8-an...
It's mind-blowing that they plan on having GPU and FPGA support before they offer arrays of structs and multidimensional arrays. Frustrating, too. I guess I can't complain, since clearly somebody is paying for all this, and it isn't me.
Not meaning to start a flame, just saying the title's a bit inaccurate IMHO...
So if you have a class:
public class X {
public Int32 i;
public Int32 j;
public Int32 k;
}
Then it takes 12 bytes + single object overhead (which in MS .NET I believe is two pointers).But if you assign a primitive (e.g. Int32) to an variable of type 'object' then it will be boxed and then require the object overhead.
A neat thing about C#/.NET is that generics are baked deeply into the platform, so using primitive (actually, any value-type struct) types as generic arguments will not require object memory or casting overheads.
A parallel can be drawn with C++ in which the user of a class decides on declaration/initialization where to store the object (either on the stack, or on the heap). The difference with C++ is that in C# the author of the class decides where instances of it should be stored, so this decision happens when the class is declared, not when it's used.
Otherwise there are few differences between structs and classes and all differences stem from the differences in storage. For example struct instances must be passed by value and not reference, because by definition stack-allocated values are short-lived and playing with references to stack-allocated values is dangerous. Structs must also have an implicit constructor because stack-allocated values cannot be NULL (logically, you need a reference to represent NULL).
In my experience, all discussions about what is or isn't an object are counter-productive.
What really bugs me about Java is that you cannot build your own types that behave just like the built-in types. For instance you cannot override operators like "+" (which works for primitives or Strings), you cannot override [] (which works for arrays), you cannot declare other stack-allocated structures, arrays are reified and yet you cannot declare your own reified data-structures and so on. The presence of primitives doesn't bother me as much as lacking the means to build my own primitives.
http://msdn.microsoft.com/en-us/library/system.valuetype(v=V...
>Data types are separated into value types and reference types. Value types are either stack-allocated or allocated inline in a structure. Reference types are heap-allocated. Both reference and value types are derived from the ultimate base class Object.
When they are used for more than 1 method implementations, well ... they shouldn't be inner classes.
They just exist to fill the gap of having no closures. I say this as a long time and affectionate java user but project lambda in JDK8 is long overdue.
[edit: apparently my sarcasm was too subtle. HOF and typeclasses are both vitally important pieces of Haskell, which are orthogonal to each other. I'm pretty sure both were in Haskell from day 1. Some code for which both are essential:
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a
] interface MouseClickListener {
void mouseClicked(MouseEvent e);
}
one often uses an anonymous class to do so: void init() {
mouse.setClickListener(new MouseClickListener() {
void mouseClicked(MouseEvent e) {
println(e);
}
});
}
the exact effect could be achieved with a reference to a named function (if Java supported them, which presumably it will once "everything is an object"): void init() {
void mouseClick(MouseEvent e) { println(e); }
mouse.setClickListener(mouseClick);
}
given that interfaces are simply syntax for function routing, when you have the ability to reference functions by first-class types (i.e. you have the ability to determine function routing yourself), the set of things that you can only sensibly do with interfaces is a lot smaller.This is how C# delegates work, right? Any Java -> C# programmer want to comment on whether they rely less on interfaces now and what they use them for?
Interfaces still serve a purpose bundling together related operations with replaceable implementations. They're just a nuisance for single-purpose functions/functors (e.g. - "run").
As for the very vague improvements mentioned (GPU, no primitives), these can be seen in response to clear technology trends. Even the embedded GPUs in x86 are getting pretty powerful, though not every business has them - but by 2015 most will. Java has primitives primarily for performance and memory efficiency. Absolutely crucial at Java's inception, they though remain important today, many applications can get away without them (e.g. ruby apps). By 2017. even more apps will be in that category.
Most of the others are similarly responses to clear trends, such as hypervisor-aware and large data support. However, true generics seems problematic because it would break back-compatibility.
My prediction: if they plan to break back-compatibility they will change their mind.
I still find it hilarious how even Swing shows how crippled the language is without that feature, where adding event listeners is complicated like new EventListener(Event e) { @override onEvent... etc. When just overriding some declared event handler method would be so much clearer.
http://qconlondon.com/dl/qcon-london-2012/slides/SimonRitter...
I hate those articles not mentioning sources.