5 ms·
1 year ago, yes. C# is awesome as a language but I don't see a reason to switch to .net when the JVM has Kotlin, which is nicer than C#, but still super lightwe
by tomjen3 11y ago
1 year ago, yes. C# is awesome as a language but I don't see a reason to switch to .net when the JVM has Kotlin, which is nicer than C#, but still super lightweight and thoroughly pragmatic.
- tychuz 11y agoMy reason would be: I can choose from a ton of C# positions, meanwhile Kotlin would have what? In my and neigbour countries I can find exactly zero Kotlin job offers.
- tomjen3 11y agoThat is true. I assumed I would eventually go into business for myself and see no reason to use C# - besides Kotlin is very young, there is still plenty of time to get in on the ground floor so to speak.
- CmonDev 11y agoCool! How would you build an app for iOS and WinPhone using Kotlin?
- wtetzner 11y agoDon't know about Windows Phone, but for iOS you could use RoboVM. http://robovm.com/ http://robovm.com/
- tomjen3 11y agoThe same way I do in any other language: I don't.
- cptnbob 11y agoHTML! And you get to do it once for both...
- yareally 11y agoFor Windows at least, there's IKVM: http://www.ikvm.net/ http://www.ikvm.net/
- edgyswingset 11y agoI'd argue that just because a language runs on a platform with a potentially large number of third-party support (JVM) doesn't mean it's going to be nice to use. For example, I ended up having to write Java code when dealing with large XML data sets in a Clojure system, because the current offerings simply didn't let me do what I needed in fluent Clojure code. I suspect Kotlin has those same kinds of issues, just amplified because it's a lot less widespread than Clojure.
- tomjen3 11y agoKotlin is basically a nicer Java and will seemlessly integrate. You can even mix Java and Kotlin in the same project.
- edgyswingset 11y agoThe fact that it integrates with Java isn't what I'm getting at. Developing in Clojure eventually forced me to write some Java, which I didn't want to do. I just don't see Kotlin as somehow solving that problem.
- V-2 11y agoNicer in what sense? I do like both, I'd take either of them over Java on any day, but whereas Kotlin is maybe better suited for functional style programming (immutability out of the box, data classes etc. - however .NET people always have F# for this stuff), it's hardly on the same level as C#. For instance Kotlin doesn't have reified generics (if I recall correctly they actually attempted it, but it's too hard to get it done on JVM), Kotlin doesn't have yield-return semantics, Kotlin's equivalent of LINQ doesn't use deferred evaluation. Kotlin doesn't have async/await like C#, which is a real gamechanger when it comes to asynchronous programming. It's very nice and promising, but it's not in the same league. As far as JVM universe goes, Scala could give C# a better run for its money. Of course it's not fair comparing Kotlin to C# - for numerous reasons - but if we do it anyway, it's got to be honest
- rjbwork 11y ago>Kotlin's equivalent of LINQ doesn't use deferred evaluation. Wow, I'm pretty surprised at that. Any kind of list comprehension/functional sub-language over collections seems like it ought to be deferred/lazy from the ground up. I'm doubly surprised at that from JetBrains.
- weavie 11y agoI don't know much (anything..) about Kotlin, but surely that is a library issue and not a language issue - which could be quite easily rectified?
- V-2 11y agoYes and no... This is part of their standard library, so from a practical point of view, it is a language issue. Easily? Proper implementation isn't so trivial, look what it takes for Guava: https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/FluentIterable.java https://code.google.com/p/guava-libraries/source/browse/guav... https://code.google.com/p/google-collections/source/browse/trunk/src/com/google/common/collect/Iterables.java https://code.google.com/p/google-collections/source/browse/t... https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Iterators.java https://code.google.com/p/guava-libraries/source/browse/guav... Plus: * new (lazy) extension functions would be getting in the way of standard ones, you would need a paralel naming convention (perhaps one borrowed from LINQ, where map = select, filter = where, fold = aggregate and so on) and developers would still confuse one with another. * unless we agree on one canonical implementation, yours would be different than mine, easy to see how it could become a mess. If there is a better approach which removes these obstacles, someone let me know