7 ms·
Yay. They finally caught up to C# 6 years later. [Edit: to the haters -- where am I wrong other than that I'm making fun of your favorite language?]
by overgard 13y ago
Yay. They finally caught up to C# 6 years later.
[Edit: to the haters -- where am I wrong other than that I'm making fun of your favorite language?]
- lowboy 13y agoTo answer your question, your comment is just snark that doesn't contribute to the conversation. That's probably where you went wrong.
- overgard 13y agoYou can accuse me of trolling, but I think the fact that java took this long to adopt these pretty basic features isn't besides the point, it IS the point.
- javafu2 13y agoIn my opinion, lambdas were not introduced in Java before now because Java as already anonymous classes that are at a high level conceptually the same things even if a lambda is more lightweight syntactically and at runtime than an anonymous class
- jryle70 13y agoJava certainly moves very slowly. I recall reading debates on how to support Lambda long before Java 7. The reasons, IMO, are twofolds: 1) The huge install base in enterprise: changing language feature is a big deal, and like it or not, enterprises are conservative in this aspect. One only needs to look at all the garbages included with Windows in the name of backward compatibility. 2) Design by committee: Many vendors have stake in Java eco systems, all with their own agendas. To get them to agree on something take time. In some ways, Java is victim of its own success. On the other hand, JVM is a very solid platform. Those impatient can go with Scala or Clojure. I could be snarky like you were and said Scala was light year ahead of C# in terms of feature evolving, but of course I know C# is a fantastic language which serves its users very well.
- lowboy 13y agoSure, but you can make that point in such a way that it encourages dialogue. A good point won't need an overly edgy delivery.
- overgard 13y agoI could, but I don't care to.
- lowboy 13y agoThen you don't really need the crocodile tears of "Why the hate, guis?". Just set phasers to Such Edgy and blast away!
- overgard 13y agoContext doesn't always come across on the internet, but there were no crocodile tears. I actually thought it was amusing that what I thought was a relatively tame comment got such a reaction. (If anything I'm more happy getting negative votes. I get really uncomfortable when I say shit that gets upvoted to hell because it feels like I'm just shouting into the echo chamber)
- billsix 13y agosince when are lambdas a basic feature? since scheme in the 70s? since smalltalk-80 in 1980? since ruby in 93? since Haskell 98? since c# in 2006? if I got in my delorean, hit 88 miles per hour, went to Sun Microsystems in the early 90's and convinced Guy Steele that yes, we should include Guy's currently 15 year old research of lexically scoped, first class functions into this new language which is designed to drag C++ programmers halfway to lisp, then java would have not been widely adopted, and this run on sentence would never have been written.
- rbanffy 13y agoIf we assume C++ and Lisp are local maxima, dragging C++ developers halfway to Lisp may not be the best thing to do.
- overgard 13y agoI mean, given your first paragraph I would say: yes. To like all of those. It IS basic. So yeah. It's been a basic feature since the 70s. I guess you can give a demerit to C++ for it being the one feature they didn't steal from elsewhere, but then again you can give C++ a black eye for a lot of things. (And still: C++ managed to get lambdas before java did. How messed up is that? Extending Java is about 10x easier than trying to add something to the crufty minefield that is the C++ spec, and they still beat them to the punch.)
- discardorama 13y ago(I did not downvote you) Such jingoism adds nothing to the discourse. Someone can as easily find something in Java 1.5 that C# still doesn't have. So what does that prove? Nothing.
- overgard 13y ago> Someone can as easily find something in Java 1.5 that C# still doesn't have. Like what?
- syjer 13y agostatic imports ?
- overgard 13y agoYou could add an extension method to object, if you want the same effect. (Although: A workaround for java's bizarre stance that no function can exist without an object doesn't really strike me as a "feature". [Granted: this criticism is equally true of C#])
- inglor 13y agoIt's in C# 6 :)
- javafu2 13y agochecked exceptions :), sorry just kidding. mainly wildcards, you can design an interface which is covariant and contravariant, and real interference when calling a generic method.
- eropple 13y agoThe lack of wildcard types in C# consistently bothers me when I use it.
- bruceboughton 13y agoIt looks to me like C# supports everything from http://docs.oracle.com/javase/tutorial/extra/generics/wildcards.html http://docs.oracle.com/javase/tutorial/extra/generics/wildca... using generic type constraints: http://msdn.microsoft.com/en-us/library/bb384067.aspx http://msdn.microsoft.com/en-us/library/bb384067.aspx What am I missing?
- alkonaut 13y agoStream<T>, IntStream, LongStream, DoubleStream? You can't make this stuff up. EDIT: what I'm trying to say is: why his remark is inflammatory and unnecessary, it's also wrong. This API is perhaps the single worse example of why java makes API's look worse than C#, and there is nothing to be done about it until the JVM stops erasing types.
- pron 13y agoJava's type erasure, while once considered a disadvantage, is now being recognized as one of the reasons other statically typed languages can be ported to the JVM. If Java reified types, it would make interoperability with other type systems extremely hard.
- overgard 13y agoYet somehow they made F# and scala run on the CLR. So: I'm calling bullshit.
- javafu2 13y agoF# team ask for modifications of the CLR (covariant delegates), porting a language on the CLR if you are not Microsoft is hard. Scala never really run on the CLR, it's a vaporware, sorry a work in progress.
- adriaanm 13y agoYep, scala's .net back-end is discontinued, and one of the main challenges (I worked on it a bit) was indeed generating the proper generic signatures. (I hear people are using ikvm these days.)
- gracenotes 13y agoFor more context on why F# does in fact run into problems, see https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2228766-add-higher-order-generics-to-f-type-classes- https://visualstudio.uservoice.com/forums/121579-visual-stud.... To my understanding, F# only allows type variables to vary, not type constructors (all generic variables must be escorted by a concrete type), and to go a step further, it doesn't allow type constructors to be used as higher-kinded type variables, which is useful sometimes. I see no reason why these couldn't be implemented on top of the JVM, though.
- smoyer 13y agoAccording to TIOBE, it looks like C# stands no chance of ever catching Java. (End of troll feeding) What I find really interesting about your comment is that I always thought C# was the closest equivalent to Java there was, and that I'd be happy using it if I was developing in the Microsoft eco-system (I gave up on QuickBasic/VisualBasic). It would make more sense if you were sniping at a language you felt was inferior if that language was also signicantly different than Java. P.S. I didn't downvote you either
- overgard 13y agoPreface: I am not a microsoft fan, or even really a C# fan, but: having used both languages C# is nothing like java except in the most superficial of ways. I'm just amused that the caretakers of java took half a decade to adopt a lot of proven useful features. I wish they'd steal more.
- matthewmacleod 13y agoC# is more similar to Java than any other language.
- overgard 13y ago(Because you said so) (Don't worry about, you know, backing up your point or anything silly like that. That might require that you know what you're talking about.)
- matthewmacleod 13y agoGosh, aren't you a pleasant fellow to deal with? Try to assume good faith. I'll bite. C# is syntacticly and idiomatically more similar to Java than any other language. I'm sure how I can prove this, beyond saying "look at them!" – is there a counter example I'm missing?
- syjer 13y agoThey still need to steal the properties so we can remove the getter/setter and the local type inference from c#. I must admit that except for this two missing features, I'm quite happy with the java 8 release in term of features.
- rbanffy 13y agoDoes C#/.NET have a fully supported runtime for any operating system that can delete (or rename) an open file? ;-) Quick advice: if you have a valid point, you should state it in a form more conducive to debate. I agree with you Java has some quirks "more modern" languages don't, including C#, which started its life, more or less, as a replacement to Microsoft J++ after Sun successfully made a painful point Microsoft could not "embrace, extend and suffocate" Java just because they wanted to.
- overgard 13y ago> Does C#/.NET have a fully supported runtime for any operating system that can delete (or rename) an open file? ;-) Yes. Thank you for the quick advice, I'll be sure to ignore it. Because I don't care.