Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Programming Java Open Source Software

Kotlin 1.0 Released 121

Qbertino writes: Kotlin, one of the challengers to Java's VM, has been released in version 1. Kotlin is object-oriented, statically typed and comes with professional IDE support by Jetbrains — which is no big surprise, since it's the Jetbrains employees who developed the programming language that saw the light of day four years ago. Kotlin is already in real-world use and development will be moving into fleshing out the Kotlin feature set without breaking backwards compatibility. These features include planned support for JavaScript — which sounds interesting considering JS has gained quite some traction recently. Kotlin is FOSS and is released under the Apache license.
This discussion has been archived. No new comments can be posted.

Kotlin 1.0 Released

Comments Filter:
  • According to its webpage, this is a JVM-based language.

  • by Anonymous Coward on Monday February 15, 2016 @05:49PM (#51514519)

    Provide an actual working installer, instead of that Sun invented piece of misnamed, misplaced piece of camel dung instlaler. First you have the magicalliy renumbering component versions, then the "you have to formally sign a user agreement" to instlal it, then for RHEL and CentOS and Fedora and SuSE users you get misnamed "rpm.bin" piece of sticky doggy mess that violates the File System Hierarchy and whose RPM package name does not match the name of the RPM file.

    There are reasons some of us gave up on using anything from Sun, and it's sad to see Oracle continued the same stupid practices. If these Java variant exert the slightest care in packaging, they can pick up a few clients right there.

    • Huh?

      In OpenSuse using the binary from Oracle gives no issues. It installs in usr/bin/java and unlike Windows, I never need to change JAVA_HOME because there are softlinks in usr/java/latest to the most recent java version, so I never have to futz with update_alternatives unless I need an older version, which I never do.

      I am not sure what weird thing you are doing to get the behavior you describe but that is not the case with any version of opensuse I have ever used and I have used every version from 9.x to

    • I've been using Sun/Oracle Java on (open)SUSE since SuSE 9.something times. Never ran into any of the issues you describe. 'which java' always gives me '/usr/bin/java', and the provided symlinks to /$latest/ take care of the versioning issues.

    • by Anonymous Coward

      Java is about the easiest versioned software you can deploy with configuration management tools like Puppet.. unzip -d /anywhere/jdk_anyversion jdk_anyversion.zip
      Optionally make a symlink to a default version.
      Zip it up once, extract anywhere you want, as many versions as you need, totally location independent. Rinse and repeat for any OS.

      Try deploying multiple versions of the Perl runtime, on multiple OS. See how far RPM and FHS takes you.

  • does it run Java?
    The Java VM can run a couple dozen languages, including Javascript, Ruby, Python ... Why not either invent a language or a VM?

    Inventing a language is stupid if you don't take advantage of existing libraries -- in particular for Java.

    • Re:So (Score:5, Informative)

      by buchner.johannes ( 1139593 ) on Monday February 15, 2016 @05:56PM (#51514565) Homepage Journal

      So of course I had not read the link. It is not a VM as TFS claims, but just a language within the Java VM, therefore an alternative to Groovy, JRuby, Scala. In particular it is different because it is statically typed but more compressed/expressive.

    • by HiThere ( 15173 )

      You want to know what's stupid? If you go to the main web page the only description of the code you get is a sample "Hello, World" application, and the link that claimed to lead me to more examples instead lead to an advertisement for a book on the language.

      If you won't let me look at it... Why do you expect me to buy a pig in a poke.

  • by Anonymous Coward on Monday February 15, 2016 @05:51PM (#51514529)

    Which is it? The summary makes it sound like Kotlin has its own VM (JVM compatible I'd assume) to compete with Oracle's JVM. The web page makes it sound like Kotlin is just a language that compiles to the JVM's bytecode. Which is it? Or is it a both?

    • It's neither. It is 100% Java compatible says their page, so ... just another language for the JVM I guess.

    • by pddo ( 969282 )
      It is NOT it's own JVM. It runs on the JVM and uses all the goodies that Hotspot provides (if going with the Oracle JVM). One of the big things going for it is it's small footprint when used as an alternative to JAVA for Android apps.
  • Not a VM (Score:5, Informative)

    by pchasco ( 651819 ) on Monday February 15, 2016 @05:52PM (#51514537)
    Kotlin is yet another language to be run in the JVM. It is not a competitor to the JVM as the description suggests.
    • Thanks for RTFAing for me. I was confused based on the summary.

    • by wwalker ( 159341 )

      Kotlin is yet another language to be run in the JVM.

      Only on Slashdot you have to read the user comments to actually understand what the fuck the summary was about. And it only took one simple sentence.

  • by NotInHere ( 3654617 ) on Monday February 15, 2016 @06:11PM (#51514709)

    All the new JVM based languages that are popping up are just syntactic sugar on top of Java. The real concepts can't be shaken, as the JVM is pretty much limited in what it can do and what it can't.

    Telling from the examples [kotlinlang.org], Kotlin seems to be a good example: Yet another poor copy of Java with some "obsolete" things like the semicolon removed (why is there so much hate for it?), and you write "fun" instead of "function". So what. I don't think this makes me more productive than Java. Its just for all the people who keep preaching "java is shit" because they've heard it somewhere and now they want to use a "much better" language.

    If Kotlin suits, Java is fine for the job as well, and most likely its even better.

    • But Java is shit, and anything that compiles to JVM bytecode is going to have in indelible odor to it.

      What I don't understand is: in today's landscape, why we can't use C++ and C++ style derivatives for compiled code (cross compiled to many platforms), and then for interpreted needs use javascript, python, or whatever floats your boat on top? You can call the C objective, sharp, or what you like, but compiled object oriented code will be just that, and garbage collected, interpreted, "script" will be what

      • by NotInHere ( 3654617 ) on Monday February 15, 2016 @06:36PM (#51514875)

        C# is Microsoft's copy of Java. Its garbage collected and runs in a VM. Just like java. They even had a language called J# for a while (guess what its a copy of), but abandoned the project.

        Java and C# and the like fill a nice niche. Nobody really wants to touch javascript, its more a mess than a language (C++ is a mess too, with std having been very limited in the past, before C++11, and thus every major codebase using their own NIH containers and stuff, but javascript is much much worse). And python has this issue with obligatory indentation.

        • by jma05 ( 897351 )

          > And python has this issue with obligatory indentation.

          For Python fans, indentation is a feature, not an issue. Either you like it or you don't. I like it myself.

        • by PCM2 ( 4486 )

          Nobody really wants to touch javascript, its more a mess than a language

          Not wanting to use it and having millions of people who use it anyway are two different things. And the countless JavaScript libraries that are available (jQuery, etc), plus the rise of things like Node.js, would appear to disprove your point.

      • The JVM is king in the server room and will likely be that way for a very long time.

        I hate Java the language, it is a verbose pile of feces and it provides very little type-safety for all that verbosity compared to Scala. Ocaml or Haskell. The fact that Scala and JRuby exists makes working in the JVM environment very nice, although I prefer Erlang in a server environment for most things since its concurrency is better than anything the JVM can offer.

        I am not sure Kotlin offers any advantages over Scala but

        • by sribe ( 304414 )

          I am not sure Kotlin offers any advantages over Scala...

          Bwahahaha oh lord. If you want to waste some time look into Kotlin. It is nothing even remotely close to Scala. It is some small unimportant changes to Java with no real advantaged, whereas Scala is a truly impressive effort and semantically much richer language. Comparing Kotlin to Scala would be like comparing a Yugo to a Model X.

      • why we can't use C++ and C++ style derivatives for compiled code (cross compiled to many platforms), and then for interpreted needs use javascript, python, or whatever floats your boat on top?

        There's some interesting languages out there with other features. Haskell comes to mind, as a pure functional language. It's not just pretty syntax, but a different way of thought that provides some features and power that C++/Java style imperative languages can't match. They're so different that you need different compilers really. You can't always write a Haskell program and "translate" it to C++, certainly not without re-architecting. Of course, there may be things an object oriented style is better suit

        • I wrote a compiler for Haskell-like lazy FP a long time ago (in 1989!) and I can assure you the compiler technologyfor lazy functional programming languages and the tech for imperative or OO languages are about the same as cats are from dogs. Or tather, as far as cats are from bacteria.

          Functional languages work on an entirely different theoretical basis, never mind implementation

          • Functional languages work on an entirely different theoretical basis, never mind implementation

            Depends on the implementation. Bottom line they use the same machine, calls, stacks heap etc. And keep in mind, plenty of languages are hybrid in our days, as Scala or if you want C++ show.

    • by Anonymous Coward

      The semicolon thing really bothers me.

      We can learn to finish sentences with a full-stop in primary school, but apparently fully-grown adults can't cope with using a statement terminator when programming.

      I don't mind languages that use a statement _separator_ rather than terminator - but that's not what these languages do. By making the statement terminator optional - but still a terminator, not a separator, they've made carriage-return a statement terminator too. Which means that suddenly white-space matt

      • I don't know Kotlin but not using ; in a language like Ruby is no worse in regards to multiline expressions(there are no statements in ruby) over java.


        or if you like:

        some_method a,b,

        No whitespace issues or ambiguity.

        Compared that to Java:

        someMethod(int a, int b,
        int c);

        Is the semi-colon really that meaningful?

        Using a semi-colon or anything to denote the end of a statement or expression is largely redundant. It is weird that programmers get hung up on non-issues like this.

        • by stdarg ( 456557 )

          Are you making the code as ugly as you can? It's a mistake to think that leaving out useful visual cues like parentheses and semicolons is "no worse" or that these markers are redundant. They may be to a compiler but not to a human. (Not most humans anyway.)

          • They are as simple as it can be, you must really love java if you are looking for complexity in a method call and calling it ugly if it isn't complex. The semi-colon in the Java example offers no more clarity than omitting it. Even the one Ruby example with no parenthesis is very clear and concise.

            The fact that a comma at the end of the first line is all the visual clue one needs to know that it continues on the next line, whether it is a person or a compiler.

            The only time they are really needed is when put

    • Look out or they may decide to use indentations to delimit code, same as python. Then they can waste their time on what is a "true tab" as well as the "tab vs spaces" holy wars.
    • by jdeisenberg ( 37914 ) on Tuesday February 16, 2016 @01:32AM (#51517157) Homepage
      Possible candidate for a counterexample: Clojure (https://clojure.org/). It runs on the JVM, but, as it is a dialect of Lisp, I would not consider it "just syntactic sugar on top of Java"
    • as the JVM is pretty much limited in what it can do and what it can't.
      That is incorrect. The only limit the VM exposes is true multiple inheritance. But even that can be tricked ...
      Regarding Kotlin, I did not really like it either. In case you want more power full languages then there are Scala and Extent on the "static type" front and Groovy on the "dynamic type" front, or Closure if you can stand Lisp.

      Pure old school Java I find rather cumbersome ... to much visual noise, but most projects till use it.

      • And tail recursion. JVM does not like that.

        • The older java compilers did not use it.
          However the VM supports it as Scala e.g. shows: also, important imho, it is not called tail recursion, every machine with a branch or sub routine call supports it. It is called tail recursionoptimization as in optimizing away a sub routine call by a simple jump/branch.

    • Not true. Clojure is dynamically typed, Frege has the same type system as Haskell and is pure functional. Ioke is prototype based. Jython is source compatible with other python implementations Python. These are not just syntactic sugar.

      The JVM is becoming less limited with each release

  • I took a quick look at it and - while I kinda get the appeal - it just seems to me to be too much variation from standard coding practices and, as someone who spent way too much time deciphering kabuki-like single line C statements that should have been a proper function, I'm not a big fan of shortness for the sake of shortness. I personally have found that standard JPA and Java, with much help from OpenXava, is the best combination of ease-of-development and flexibility for my app needs. But, that's just
  • How can you be so wrong?! It tells you exactly what it is on the page you linked: an alternative to Java that runs on the JVM. Why "assume" things when you can just spend two minutes reading about it/

"If it's not loud, it doesn't work!" -- Blank Reg, from "Max Headroom"