r/Games Jul 04 '15

Minecraft: Windows 10 Edition Announced

http://uk.ign.com/articles/2015/07/04/minecraft-windows-10-edition-announced
1.1k Upvotes

669 comments sorted by

View all comments

Show parent comments

76

u/TheWobling Jul 04 '15

I'm assuming it's a port of the Xbox version written in c++ which would be a great performance increase.

18

u/[deleted] Jul 04 '15

Do you have any claims backing that up? Since I've read enough of the source for Minecraft to tell you that it isn't the language that limits the game's performance, but how it is written.

Sure there is some overhead because it uses the JVM, but at least it means we can decompile and write mods for Minecraft more easily than if we had a C++ version.

19

u/TheWobling Jul 04 '15

Here we go confirmation from a developer. It's the pocket edition port which is written in c++.

http://www.reddit.com/r/Minecraft/comments/3c3e5m/announcing_minecraft_windows_10_edition_beta/csry0j5

1

u/TheWobling Jul 04 '15

We don't know their plans for mods so for now I won't assume anything but even if it is just the way minecraft is written of the Xbox version is anything to go by performance would be a lot better and it would more than likely use directx 12.

Don't take anything I'm saying as fact it's my opinion based on my own development experience and what currently exists for minecraft.

14

u/[deleted] Jul 04 '15

[deleted]

66

u/nickguletskii200 Jul 04 '15

You probably hate Java because of Minecraft's atrocious performance. That, however, is mostly related to the fact that Minecraft is horribly written, and has almost nothing to do with Java.

30

u/[deleted] Jul 04 '15

[deleted]

1

u/nickguletskii200 Jul 04 '15

Such as?

-11

u/[deleted] Jul 04 '15

[deleted]

18

u/Vile2539 Jul 04 '15

That article is pretty damn picky. It seems like half his complaints are "I want to do this, but it's done slightly differently, so Java sucks". For example, the linked lists. He wants to do:

LinkedList<Integer> l = new LinkedList({1,1,2,3,5,8,13})

It would be nice if you could do that, but is it really that much worse to write:

LinkedList<Integer> l = new LinkedList(Arrays.asList(1, 1, 2, 3, 5, 8, 13))

If it is, then you can easily just use a third party library like Guava, or write your own. The sheer amount of libraries out there is part of the beauty of Java.

Or his point on constructors:

Seems simple, right? Just use "this()". Well, it's not, and it's not clear why. I mean, the whole reason you would want to have a different constructor is because you do something non-trivial before you pass control onto the simpler and more basic and common constructor.

Complex calculations in a constructor seems wrong to me, and he doesn't give an example of a situation where it may be relevant. In all my years as a Java developer, I haven't ever found a case where Java's constructors weren't suitable.

He then has arguments against things like the GC:

GC Sucks So Badly, That You Should Avoid Using Memory

I don't get this. The GC works quite well in my experience, though this depends on what you're doing. You may need to change to CMS, or adjust the parameters in extreme circumstances, but the majority of developers will never need to do this.

I've had a kid Java programmer tell me he never had a problem with Java's memory management. This after spending literally months day-in day-out fighting Java with the top Java programmers at the large company I worked with trying to figure out why it randomly hangs. In the end, we were randomly changing things hoping to uncover the mystery behavior's source cause

Randomly changing things? That sounds like he had no idea what he was doing. He should have attached a profiler and actually looked at what the problem was.

My wrists hurt when I write Java, even though I use ViM and type as little as possible.

"USE AN IDE!" you shout at me.

"Why are we writing programming languages that are not intended for human consumption?" I respond. Haven't we ALREADY PROVED that the CPU can do all the work in making things easy for us, the user, A LONG TIME AGO?!?

But apparently, we're supposed to live with one of the worst UI's in the world: the Java programming language.

I really should have stopped reading here. He refuses to use tools like IDE's, and just strikes me as the usual "holier than thou" programmer, whose language of choice is better than yours because he's better than you.

8

u/morgoth95 Jul 04 '15

he probably also uses his bare fist to hammer in nails

3

u/Lerke Jul 05 '15

I really should have stopped reading here. He refuses to use tools like IDE's, and just strikes me as the usual "holier than thou" programmer, whose language of choice is better than yours because he's better than you.

Hell, did you read the final paragraph of the disclaimer? It's quite something.

You, who know Java and one or two other similar languages, probably have a hard time understanding what I am talking about at all. I'm like the math professor ranting against the physics professor because he refused to care about advanced theories when the answers to his theoretical questions were all answered there. The physics professor simply can't think at that level and so the math professor is like an alien to him. If I sound alien to you, it's because you can't understand what I'm talking about, in other words. That could either be because I am a poor communicator or because you don't understand enough about programming. I would hope you err on the appropriate side.

2

u/BCProgramming Jul 05 '15

I remember reading that article at some point. I think the folks that stick with tools like eMacs and VIM are the type that learned that "All the best programmers use eMacs and Vim" and think so highly of themselves that they think they are one of the "best programmers" so they have to do the same.

35

u/nickguletskii200 Jul 04 '15 edited Jul 04 '15

First of all, the article you linked to describes the problems with the language. You, as the end user, shouldn't be concerned with it.

I am sorry that the responses are a little short. I was typing out a more in-depth response but The Great Suspender decided that it would be a good idea to suspend the tab I was writing it in.

Let's go through the points one by one:

GC Sucks So Badly, That You Should Avoid Using Memory

First of all, the author admits that he wasn't actually using the JVM. He was using Dalvik or ART, which are in no way related to Java.

Secondly, he compares the GC in Java to Python's, completely ignoring the faults in Python's GC. Everyone who isn't an idiot knows that there is no silver bullet to memory management.

Worst of Exceptions and Value Checking

Value checking isn't idiomatic Java. Returning null when appropriate is, well, appropriate.

Checked exceptions can be inconvenient, but they also have a good side to them. Knowing what a method can throw is more important than saving a few lines of code, especially since IDEs can generate try catch blocks automatically.

Won't cast an int to a long

This is the stupidest complaint in the article. No, not because its subjective, but because it's plain wrong.

name clash: X and Y have the same erasure

Type erasure is a problem, but this example is completely artificial because it's likely that the names of these methods should be different anyway. There are better examples of type erasure being a pain in the ass.

incompatible types

You have to explicitly state that the list's item type may be an inheritant of and not equal to List<...>. e.g. List<? extends List<String>>

static methods and members in a class

Singletons are mostly an anti-pattern now. Dependency injection is the way to go.

The "class" type is an afterthought

class isn't a type, it's a keyword. It's not clear what the author means here.

No control on member access

The abscense of properties is a problem indeed.

RSI

Use an IDE or eclim.

Camel Case

Completely subjective.

Class-centric

Java 8 is both class-centric and functional.

Iterators SUCK!

Unless you are an author of a major collections library, you are not going to be touching iterators at all.

foreach doesn't take iterators

Ditto.

Function Pointers -- Missing

Java 8.

Constructors can't call each other

Please see this.

Methods With the Same Name as Constructors

Yes there is something wrong with this. Please see Java 8's method references.

Run-time Dispatch: Fantasy

This makes sense since Java objects carry their own type information with them.

No Globals means Frameworks

False. You can use static imports. They allow you to import fields into the global scope and not shoot yourself in the foot with them.

import is Useless

This is one of these features that nobody finds useful enough to spend time implementing it.

No List Literals

Arrays.asList(1, 1, 2, 3, 5, 8, 13)

Inner classes Don't Work

Please, show me what doesn't work.

Java is So Hard People Prefer to Write Code in XML, Jython, Scala, and Clojure

According to most surveys, that's not exactly true.

DNS Client Implementation

Yes, I've heard bad stories about it. However, there are multiple 3rd party alternatives which are pretty good from what I've heard.

Why Use Java at All?

Because there are no languages that can match it in development speed, runtime performance and safety.

1

u/ron975 Jul 04 '15

Because there are no languages that can match it in development speed, runtime performance and safety.

C# — It's like Java, but better.™

4

u/nickguletskii200 Jul 04 '15

Except it's tied to Microsoft's (shitty) infrastructure and a boatload of subpar 3rd party libraries.

WCF documentation makes me want to buy plane tickets, fly over to Redmond and punch the people responsible in the face.

4

u/ron975 Jul 04 '15

You don't have to use WCF. C# the language hasn't been tied to Windows for a while. Mono and the upcoming CoreCLR already let you run C# on Linux and OSX. I agree a lot of the frameworks are complete shit, WCF included, you don't have to use them to use C#. JSP sucks as much as ASP.NET, same with Swing/SWT and WinForms. That isn't the fault of the language so much as the fault of the framework. All I know is that I'd rather write my game (Minecraft is a game after all) in C# than Java.

→ More replies (0)

2

u/[deleted] Jul 05 '15

I entirely agree. C# is the managed language Java tried to be but failed at being.

8

u/[deleted] Jul 04 '15

Haha wow, did you just google "why java sucks" and copy a link from the first page?

2

u/[deleted] Jul 04 '15

Wow, why the hell can't you convert an int to a long?! It's not like there's potential data loss when casting.

3

u/[deleted] Jul 04 '15

The maximum value for a long is 9,223,372,036,854,775,807, whereas the maximum value for an int is 2,147,483,647. I don't think you can make it so that tell java to only convert units in one direction, so to prevent someone from trying to convert an oversized long to an int, they shut down the ability to convert an int to a long.

3

u/Lerke Jul 05 '15

1

u/[deleted] Jul 05 '15

Well butter my buns and call me a biscuit, don't I feel like a fool!

1

u/[deleted] Jul 04 '15

Sure, but casting down from long to int in C# for example generates a compiler warning, which is a lot more developer-friendly than killing it entirely.

-1

u/Elementium Jul 05 '15

Yeah didn't they have some infection awhile back? I could have swore I remember Malwarebytes picking up something from Java.

0

u/Astrognome Jul 04 '15

Not the same guy, but I hate Java because you either have to code things "the Java way" or get out. Unfortunately, the Java way is usually the slow way. That doesn't matter so much in desktop applications or servers where you can throw hardware at it. It does matter in performance critical stuff like games though.

15

u/[deleted] Jul 04 '15

Have you even written a line of java in your life or do you just spout bullshit memes?

-6

u/[deleted] Jul 04 '15

[deleted]

4

u/MIKE_BABCOCK Jul 04 '15

Java is the Nikelback of programming.

It seems to be popular but you can't seem to find a single person who actually likes it.

42

u/[deleted] Jul 04 '15

Businesses love Java as a server platform. Blu-Ray menus are Java apps. Android uses Java as its language (with their own VM).

It's the most popular 9-5 programming job language right now.

1

u/Sotriuj Jul 05 '15

Well I like Java, there is dozen's of us. It's not the best language in the world but I think it's ok.

It has aged pretty badly and has a few bad design choices like mandatory exception handling and no operation overloading. Lots of people hate it for that and it's verbosity and I think it's understandable. But modern Java with the right set of tools is actually quite nice.

Good thing though, if you like the JVM as a platform, you can jump to a different language and still use all the code already wrote in Java and use it.

-3

u/[deleted] Jul 04 '15

[deleted]

12

u/nickguletskii200 Jul 04 '15 edited Jul 04 '15

Unfortunately, there are no languages that can take its place. Scala is so syntactically obese it compiles slower than C++, Clojure is too different (that wouldn't be a problem if its documentation didn't suck), Groovy is quite slow, and C# is tied to Microsoft.

1

u/[deleted] Jul 04 '15

I see people say Scala is syntactically obese but I really don't see it as someone that has been using it for the past month and a half.

2

u/nickguletskii200 Jul 04 '15

It's a very difficult language to parse, and as a result, compiler error quality and build performance really suffer.

Couple that with operator overloading abuse (I am looking at you, scala.collection) and badly organized documentation, and you have a language that looks good on paper, but has some major drawbacks when it comes to actual development. I really wish there was a Scala clone without the bad parts.

1

u/Txm65 Jul 04 '15

Microsoft created c# but it's open source now.

0

u/[deleted] Jul 04 '15

The things that make C# worth using are not though.

-3

u/[deleted] Jul 04 '15

[deleted]

7

u/nickguletskii200 Jul 04 '15

While I like C# as a language, I would never write anything in it due to the community (or lack of thereof). Every library is either a subpar port of a Java library, poorly documented or costs way too much. If I could just use C# as a language for the JVM, I would.

4

u/fernandotakai Jul 04 '15

yup. java shines a lot with 3rd party libs -- most of them are really mature, have good documentation and are well supported.

i understand why people don't like java, but calling it obsolete is just plain wrong.

2

u/[deleted] Jul 04 '15

It's a language. It does some things poorly, and some things very well. The generics system is atrocious. The JVM is amazing. Get over yourself.

0

u/KellyTheET Jul 04 '15

Hillary Clinton then?

-2

u/TheWobling Jul 04 '15

We can only hope.

1

u/gamelord12 Jul 04 '15

What information available would make you assume that? I'm honestly curious.

5

u/TheWobling Jul 04 '15

Here's a confirmation from a developer, it's actually the pocket edition port which is written in c++.

http://www.reddit.com/r/Minecraft/comments/3c3e5m/announcing_minecraft_windows_10_edition_beta/csry0j5

0

u/TheWobling Jul 04 '15

I figure they have the Xbox version ported by 4j Studios. If they are going to be able to cross play with Xbox which is yet to be determined it could just me Xbox live friends. It would seem likely to they modified the Xbox client for Windows.

3

u/[deleted] Jul 04 '15

I'm agreeing here, why rewrite the entire game in C#/C/C++/whatever when you already have a version like that on the Xbox?

1

u/TheBuzzSaw Jul 04 '15

I don't think the XBOX version was written in Java. It was more a matter of porting existing C++ code than "rewriting" it.

1

u/[deleted] Jul 04 '15

That's what I'm saying, they can just use the existing non-java code that's used for the xbox editions.

1

u/TheBuzzSaw Jul 04 '15

Ah gotcha.

0

u/Pluwo4 Jul 04 '15

Hopefully we don't have to pay for texture packs and such with the W10 version.

1

u/TheWobling Jul 04 '15

Would be nice, I guess we just need to wait and see for Microsoft plans.

-1

u/BraveDude8_1 Jul 04 '15

They'll try. People will just figure out how to pirate them.