Java is pretty cool

You’re right that you won’t be doing 3D modelling, photoshopping, etc. any time soon on the web. But that’s not what the ordinary consumer is doing anyway. He’s quite content with playing music, watching videos, facebook, twitter or other things. There’s a difference between what YOU are going to be doing and what HE (the consumer) is going to be doing.

The PC era is ending, and device era is beginning. Professionals will continue to use PC’s to create stuff, but consumers are moving away from the cumbersome interface and usage of PC’s. Consumers want simplicity, they want the stuff to work, they want it to be easy, accessible. A PC with Windows like we’ve known it doesn’t do that, and I’ve seen firsthand how complicated PC’s with Windows are for ordinary people who don’t use them a lot, the PC’s end up plagued with malware, dead slow with annoyware and the user simply gives up on it. My mom’s computer is just like that, and I’ve given up on it, I’m getting her an iPad.

If the ordinary consumer is not going to be buying a PC again, and the ordinary consumer makes up over 90% of those who buy PC’s, how is that going to affect computers makers and professionals like programmers and designers? For sure we need PC’s to make consumer “goods”, like games, web pages or other applications. I imagine mouse/keyboard operated computers to be strictly used by professionals in the future, while the consumer mass will be using devices.

You don’t realize it yet, but there’s already a big revolution underway. The computers of the first era were impractical, bulky and required engineers to operate them, then came the 1980’s with the PC era that allowed most people to use a computer in their home or office, although they weren’t accessible to all. Now the third era is beginning, where virtually all people can use computers in whatever manner they want with whatever devices they want, and it’s easy, for your mom, grandfather, and dog.

Big software giants are in a panic, attempting to repurpose themselves. You already see what Microsoft is doing, Oracle probably doesn’t know what it’s going to do because professionals are moving away from RDBMS databases as well. Dell, HP are in a big mess with sales plummeting. Big game makers aren’t releasing as many AAA games as before, and they’re scrambling to move into the devices market where the money seems to be.

If you think you’ll be writing Java code or C code in this new era you’re grossly mistaken. Most of the development for these consumer devices will be in scripting/interpreted languages. Web pages are what users use, it’s what is most accessible to all devices, if you don’t have the web accessible on your device then your device won’t sell. And all devices manufacturers try to make it easy for developers to make applications for their devices (that means javascript or intepreted languages), because they know LOTS of apps for their devices means LOTS of buyers for their devices.

Open your eyes before you become one of those old guys in the basement hellbent on maintaining some legacy system with a language that nobody else still uses.

You can do amazing things in HTML5, now. In a few years time perhaps we’ll see HTML6, and we can only imagine what sort of stuff will be in that. Java, C, simply doesn’t have a place in this envisioned future, but javascript does have a big role.

But as always, the future is only what we can dream it to be, extrapolated maybe on the past. What it will actually be like is unknown.

Java 8 builds are fairly usable and have both of those features right now. I assume the default functions in interfaces qualifies as a trait/mixin.

I could write a laundry list of legitimate gripes about Java. Basically see my list of reasons above why Scala is better.

You forgot Traits! (or maybe you didn’t and just don’t care for them). To me one, of the things I like best about Scala, and is most relevant to game programming, is being able to create objects that are little more (or even nothing more) than assemblages of traits. I think Java 8’s defender methods will allow similar things (though I’m not sure it is as flexible as Scala traits).

I think Scala traits are still more flexible. For instance, if you have a GameEntity class and you have Swimable a trait with swimming behaviors and Shootable, a trait that allows you to fire bullets you can do things like:



// A plain game entity
val e1 = new GameEntity()

// A game entity that can swim
val e2 = new GameEntity() with Swimmable

// A game entity that can swim and shoot
val e3 = new GameEntity() with Swimmable with Shootable

Note that GameEntity knows nothing about Swimmable or Shootable and doesnt implement or extend either. I don’t think defender methods allow you to do this. Also, I think (but don’t remember) that Java’s default implementations only cover methods, not fields like Scala does.

[QUOTE]Nobody is going to write code, design 3D models, doing photoshop or edit video in a browser…
[/quote]
Wrong. People do real programming in browser-base IDEs right now. I’m working on an HTML project and planning to use one of those.

I still use rich client tools the bulk of the time, but browser tools are legitimate, they are useful, and they will get better.

[QUOTE]Java, C, simply doesn’t have a place in this envisioned future, but javascript does have a big role.
[/quote]
I am skeptical that C and Java will vanish. I think JavaScript may explode and take over many use cases, but I can also see JavaScript turning into a VM, where people write code in other languages and compile to JavaScript.

I like Scala traits, but with Java 8 defender methods do almost the same thing. I’d like to hear some advantages of Scala traits if you know of any.

Your Scala example:


// A game entity that can swim
val e2 = new GameEntity() with Swimmable

is merely a convenience for this in Java:


class GameEntityWithSwimmable extends GameEntity implements Swimmable { }
...
final GameEntityWithSwimmable e2 = new GameEntityWithSwimmable();

Being able to specify the trait on a single instance is nice, but it’s a pretty small bonus that is easy to work around.

Regarding TIOBE (and possibly RedMonk)…

How about just deciding what’s the most efficient, elegant, and appropriate toolset, rather than looking for marketshare numbers?

Sure, you need to listen to what the market is saying so you can be employable and if you plan to make software for end users, you need to consider runtime marketshare. But, you still have lots of choice as a developer within those parameters. You can use any JVM language to target workstations. Many languages compile to JavaScript

https://github.com/languages

http://d24w6bsrhbeh9d.cloudfront.net/photo/5705373_700b.jpg

There will be at least another decade when game industry ditch c++ and start using something like java script for mobile and console gaming.

IMHO, the reason why they will never die is because the amount of man hours required to teach a whole workforce a new language is astonishing because for a business they’ll mainly see the
cost of it, if you have C++ projects with a staff of 1000 and let’s assume it would take 80 hours for them to learn a new language that’s 80,000 man hours on changing language.
that’s 80,000 hours for a group of 1000 people imagine a whole workforce, game companies wouldn’t want to pay people to learn a new language so they would keep them on C++
or any language they were originally using. If that all makes sense.

For the moment there’s zero reason to change from C++.

Problem is, Javascript is just plain shit for anything other than trinkets in browsers. Shit to code for, shit to use, shit to look at, shit to maintain. The tools are still shit despite having, hmm, 15 years to become good. Performance is - yes really - still shit. The JSVMs have come along in leaps and bounds and are now probably the most amazing turd polishing machines the world has yet seen.

ALL web applications are appalling to use versus any natively deployed application. Even using GMail is awful. Dare I say shit.

I could go on but I still think the ultimate tyranny is that there is simply no choice but to use it. How would you feel if someone pointed out that French is actually more widely spoken worldwide than English, so ultimately JGO was going to be a French-language only board?

Well, we’d all get a lot better at French, I expect, but I don’t reckon you’d be very happy about it.

Cas :slight_smile:

Well, javascript really isn’t just for browsers. I think javascript is really quite nice. A quite nice scripting language. I’d never want to use it for general purpose programming. It’s attempting to move in that direction, but it’s going to have the classic problem of inertia. 2020 is the last guess I’d heard for threading. It needs tons of changes to become a useful general purpose language.

I remember a similar 5 year prediction, ooh, about 4-5 years ago. Around the time Android was about to be released and development of Chrome OS was being talked about. Simply put, I agree with you that the device era is beginning. Does that mean everything is going to be HTML5 / JavaScript based? No!

As you said earlier, Google is heavily invested in JavaScript, and it makes sense on the desktop because it’s a disruptive technology - they aren’t the OS producer. Does Google or Apple give you access to all of a devices features through HTML5 / JavaScript on Android or iOS? No. Will they ever? Probably not. It removes the distinction between devices, reduces their control over the ecosystem, and bypasses their nice walled gardens.

For the foreseeable future, I see the devices market boosting Java (Android-style) and Objective-C coding more than HTML5 / JavaScript.

In other words… it needs to be a different language. Which do we think is easier and more painless - making a general purpose desktop language work better in a browser or making a browser language work better… everywhere?

FWIW I think that Mono has probably gained critical mass now and has achieved pretty much ubiquity everywhere - the exact thing Java should have achieved 5 years ago but never did.

Cas :slight_smile:

So far I love programming in Java. My reasons:

  • I get stuff done in Java. In C or C++ I can make too many mistakes.
  • The stuff I get done runs on several platforms with little effort. I like C# but it’s just not the same as Java in this respect.
  • Deployment (with some tricks, e.g. embedded JRE) is actually quite smooth.
  • It’s plenty fast for what I’m doing (especially with LWJGL).

I hear a lot about this “I get stuff done quicker in Javascript than in Java”. Someone show me where and how.

Cas :slight_smile:

Would love to see the justification for that comment - one which can convince me that Mono still isn’t a bloated, fragmented, poorly performing mess; and ubiquitous at a cost, monetary and otherwise. :slight_smile:

Seriously?

The fact that it’s very slightly suboptimal compared to Java versus the fact that C# is, in fact, available on iOS, Playstation, XBox, every desktop OS, in fact, just everywhere, is a hugely compelling argument. For the game devs amongst us, Unity and MonoTouch are incredible bits of tech. These are all places Java should have been 5 years ago but due to colossal mismanagement it never happened.

Cas :slight_smile: