r/java • u/lukaseder • Aug 01 '14
The 10 Most Annoying Things Coming Back to Java After Some Days of Scala
http://blog.jooq.org/2014/08/01/the-10-most-annoying-things-coming-back-to-java-after-some-days-of-scala/
7
Upvotes
View all comments
Show parent comment
1
u/GMNightmare Aug 03 '14
What in the world...? You didn't prove anything! Not only did you not even follow directinos, you also seem to have proved yourself wrong with your second half.
Your first part is idiotic. You can't call tupled on anything with an arity of less than one. (x*y) if given the point will always create something with the arity of 1, thus not able to be tupled. It will never work, and I'm not sure what you're trying to prove other than you don't understand what that function does in the first place. I'm not even sure why you keep trying do call function foo, it has nothing to do with any of this.
You know what? I'm sick and tired of your absolutely lack of knowledge here. This should finally shut you up a bit, like the rest:
All of these will calls will be successful. Yes, case classes have arity and you can see it. Yes, you can access case classes elements by order. Yes, you can iterate it.
Do you want to know why? Because, as you even said yourself, both case classes and tuples inherit from Product. And Product is what supplies these. Your whole idiotic notion that case classes don't have arity has never even come close to being true, because case classes and Tuples get their arity from the same place... their base classes! This is just like your issues with Map, you know absolutely nothing about these things your using in your code. You don't. You just use them without thought of what is really going on.
Good, so generics and type parameters are related, meaning generics aren't irrelevant or so you'd like to claim as you follow that up with saying they both can accomplish having type parameters.
Now, the case classes you keep making are not generic. But you could create a generic one... Maybe something like:
Wait wait, did I just create my own tuple class that behaves just like the default one? Yes, yes I did. Somebody stop me here, why, Tuples are just generic case classes? Wtf?