Slashdot Mirror


Android Now Supports the Kotlin Programming Language (venturebeat.com)

In addition to Java and C++, Google announced at its I/O 2017 conference today that Android is gaining official support for the Kotlin programming language. VentureBeat reports: Kotlin is developed by JetBrains, the same people who created IntelliJ. Google describes Kotlin, which is an open sourced project under the Apache 2.0 license, as "a brilliantly designed, mature language that we believe will make Android development faster and more fun." The company notes that some have already adopted the programming language for their production apps, including Expedia, Flipboard, Pinterest, and Square. There are already many enthusiastic Kotlin developers for Android, and the company says it is simply listening to what the community wants. But Google's choice didn't just come down to the team believing Kotlin will make writing Android apps easier. Developers will be happy to know that Kotlin's compiler emits Java byte-code. Kotlin can call Java, and Java can call Kotlin. Indeed, "the effortless interoperation between the two languages" was a large part of Kotlin's appeal to the Android team. This means you can add as little or as much Kotlin into your existing codebase as you want, mixing the two languages freely within the same project. Calling out to Kotlin code from Java code should just work, while calling to Java code requires some automatically applied translation conventions.

91 comments

  1. Obligatory by Anonymous Coward · · Score: 2, Insightful

    New week, new language-of-the-week.

    Fucking millennials can't use languages that have worked for decades because "it's old".

    Idiots.

    1. Re:Obligatory by ShanghaiBill · · Score: 2, Insightful

      Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.

    2. Re:Obligatory by OzPeter · · Score: 4, Insightful

      Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.

      There's this company you may have heard of called Microsoft. It's got this program called Visual Studio that you can use to write programs in a language called C#. It has this crazy feature where you can write one version of code and deploy it on iOS, Android, and Windows. Maybe you should check it out someday?

      --
      I am Slashdot. Are you Slashdot as well?
    3. Re:Obligatory by wanchic · · Score: 1

      Yes, and YES! Not impressed.

    4. Re:Obligatory by Anonymous Coward · · Score: 1

      Xamarin / C# is also a very good choice depending on your needs. It will deploy to iOS, Android, Windows UWP and I believe Tizen. I'm sure the Kotlin devs will claim they are tons more productive using it than writing Java while happily having another entire team to do iOS development instead of looking at some of the other tooling options....

    5. Re:Obligatory by Snotnose · · Score: 2

      It's not millenials, this has been going on for a long time. Used to be a magazine called Computer Languages, which was all about new computer languages (duh).

      Keep in mind, at one point C, C++, Java, Javascript, D, whatever were hot new languages.

    6. Re: Obligatory by Anonymous Coward · · Score: 0

      The wheel was also new once, but most people have the sense to not get excited about the latest triangular redesign fad.

    7. Re:Obligatory by DontBeAMoran · · Score: 2

      He said "desktop", not "Windows".

      Give me something that can target Android, iOS, Windows, macOS and Linux.

      --
      #DeleteFacebook
    8. Re:Obligatory by Pseudonym · · Score: 1

      Oh, and it has to run in the browser. And in a kernel-free vmware deployment. Also, it has to make toast.

      What you want, what we all want, is a suite of languages, each with their own strengths, which work together seamlessly.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    9. Re:Obligatory by Pseudonym · · Score: 1

      What the Android community wants is, indeed, a better Java. The rest of the software world knows that this probably isn't a good idea, but the Android community wants that.

      Currently, the only language that can do that is Javascript, which sucks.

      Kotlin also targets JS, by the way, which also makes it a better GWT. Again, this is not what most of the software world wants, but it's exactly what people who use the Google Platform want.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    10. Re:Obligatory by Pseudonym · · Score: 1

      Uh... no. C++ was never hot when it was a new language.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    11. Re: Obligatory by Anonymous Coward · · Score: 1

      Xamarin deploys to the Mac and I believe Linux support is on the way. It really is a good cross platform option.

    12. Re:Obligatory by ArmoredDragon · · Score: 1

      Xamarin? I've actually tried it, and it's kind of bad. Sure, it works in principle, but it's a bit buggy and slow.

    13. Re:Obligatory by niff · · Score: 2

      Xamarin lets you cross-compile when needed, but you cannot link or directly call Xamarin libraries from Java or Objective-C applications.

      That's a show stopper for us, because it means that your C# lives entirely in its own universe, without being able to interact properly with other libraries and services.

      In my experience, locking yourself into Xamarin works out great for small applications. In the same way that Dreamweaver worked great to design simple web pages. It's fast and brilliant, and it doesn't require you to learn about platform details.

      It looks like a productivity booster at first, but when you become more serious you'll run into annoying problems that cost more than maintaining two code bases.

    14. Re:Obligatory by Anonymous Coward · · Score: 1

      I've used Xamarin, and I wouldn't wish it on anybody. When I get stuck it's with the transpiling (or whatever they call it) - the code mysteriously breaks with a cryptic error message and I'm stuck until I can get Xamarin support to help me. I use multiple programming languages on a daily basis, and having to work with C# converting to Objective C behind the covers is easily the most painful project I'm on.

    15. Re:Obligatory by ShanghaiBill · · Score: 1

      What you want, what we all want, is a suite of languages, each with their own strengths

      I am ok with one language for apps, another for quick scripting, and maybe another for 8 bit embedded microcontrollers.

      I am NOT ok with one language for Android apps, another for iOS apps, another for Windows, and yet another for the Linux desktop. That makes no sense. All of these require the same strengths.

      All Google is doing here is giving us yet another one-platform language. So now Apple has Swift and Google has Kotlin. I won't be using either, and neither should you.

    16. Re: Obligatory by Anonymous Coward · · Score: 0

      I'll just leave this here:

      https://github.com/mono/embeddinator-4000

    17. Re:Obligatory by ShanghaiBill · · Score: 1

      It has this crazy feature where you can write one version of code and deploy it on iOS, Android, and Windows.

      That sounds pretty cool, but how portable is it really? It is easy to make a "Hello World" program portable, but what about portable access to UI features like the camera or accelerometer? Can I detect orientation and tilt in a portable way?

    18. Re:Obligatory by Pseudonym · · Score: 1

      I am NOT ok with one language for Android apps, another for iOS apps, another for Windows, and yet another for the Linux desktop.

      I agree.

      Having said that the idioms between in those UI environments are so different that in you need different UI layers on all of them. Anything less is a discourtesy to the users. (Remember Kai Krause interfaces? Yeah, that.) If you could write a small layer of Swift/Obj-C just to handle that in OS X/iOS, C# just to handle that in Windows, etc etc, there wouldn't be so much of an issue.

      And in practice, most "apps" are so trivial that the UI is basically the whole problem.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    19. Re: Obligatory by TheOuterLinux · · Score: 1

      What milllenial developers really want is for all of us to use only web browsers and API's for everything, destroying the desktop so FOSS goes away and they can make their money and have all the control and make even more money by selling the statistics from usage. I don't want table scrap APIs from Google or M$ or anything people are calling "open source" when it only runs on a server. But, it's the summer time so get ready for all the "Drupal, Azure, OpenStack, and DigitalOcean" articles.

    20. Re:Obligatory by caseih · · Score: 1

      Yes, dotnet can indeed do all those things.

      MS bought the Xamarin stack to enable mobile development (Android and iOS) in C#. And of course dotNet core runs on Linux, OS X, and Windows.

    21. Re:Obligatory by Actually,+I+do+RTFA · · Score: 1

      C# can deploy to Windows and Windows Phone (kinda obviously) It also can target OS X, Linux, iOS, and Android, as well as less popular choices like Tizen and Fire OS. It can also compile down to HTML5/JS/WebGL. Gaming wise, as an MS product, it can support XBox 360 or XBox One, but it can also support Playstation 3, Playstation 4, Wii, Wii U and Nintendo Switch. And, there are a handful of of other platforms supported.

      --
      Your ad here. Ask me how!
    22. Re:Obligatory by hraponssi · · Score: 1

      Well, why spend time doing something productive when you can keep changing your programming language every month/week, and complain about how old and stupid everyone else is for not using the latest fads. For everything, even if it only really doesn't scale, is silly for quick prototyping, or whatever.

      Software as a career is great in your 20's when all you want to do is tell everyone how great your new programming language is, and how much they suck for not loving it. Dozen(s) of fads later, I mainly just wish I could focus on doing something useful, rather than spending all the time changing and re-learning the programming words and ways to glue them together to have the compewter do the exact same things. Guess I need to find a/the place where middle-aged programmers go to do whatever their stereotypical fad is. Pfff.. uu Kotlin

    23. Re:Obligatory by Anonymous Coward · · Score: 0

      Qt does all that, I think?

    24. Re: Obligatory by Anonymous Coward · · Score: 0

      No! Only luddites!! use web browsers and APIs real programmers app apps!

      Apps!

    25. Re:Obligatory by Anonymous Coward · · Score: 0

      Fucking millennials can't use languages that have worked for decades because "it's old".

      Grampa, I'm so sorry the world continues to change and i'm sorry you have to learn something new every once in awhile. I realize you write everything in C and that's cool, please continue and we will continue to try new stuff/ideas/languages/etc. Now how's about we tackle that wet diaper gramps, it's starting to smell...

    26. Re:Obligatory by MrDoh! · · Score: 1

      c#/Xamarin can target ios/android/windows/mac. Shame it's not also on Linux, but hey, Android runs on Linux,so...

      --
      Waiting for an amusing sig.
    27. Re: Obligatory by Anonymous Coward · · Score: 0

      Sums it up. He uses a new language every 10 minutes but still needs gramps to change his diaper for him, he's just a baby that's not learnt any useful skills yet.

    28. Re:Obligatory by jandersen · · Score: 1

      Well, there is Java, of course, which is undeniably mature and well supported by industry - and which runs on an astonishing number of platforms. And, you know, some of us are not into Windows and can't run Venereal Studio; but we can all run things like Eclipse, NetBeans and Android Studio.

    29. Re:Obligatory by jblues · · Score: 1

      The only? C# runs on the desktop and the backend. And also on iOS and Android using Xamarin, which is owned by Microsoft. The same went for Kotlin, until recently when iOS fell off the radar. That's because RoboVM was bought by Xamarin.

      --
      If it acquires resources on instantiation like a duck, then its a shared_ptr<Duck>
    30. Re: Obligatory by Anonymous Coward · · Score: 0

      Yes.
      https://developer.xamarin.com/api/namespace/Android.Hardware/

    31. Re: Obligatory by Anonymous Coward · · Score: 0

      Surely you mean Dick-SuckingLipse, NutBeans and Roid Poodio?

    32. Re: Obligatory by Anonymous Coward · · Score: 0

      But 99% of those apps embed web views or call web APIs so..... Apps Guy fail. Fail!

    33. Re: Obligatory by Anonymous Coward · · Score: 0

      lololloll

    34. Re:Obligatory by Anonymous Coward · · Score: 0

      Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.

      Have you checked out kivy? http://kivy.org it's a Python Framework, you just write your code once and it runs on Linux, windows, OSX, iOS, Android.

    35. Re: Obligatory by Anonymous Coward · · Score: 0

      You lost me at Microsoft.

    36. Re:Obligatory by Anonymous Coward · · Score: 0

      C# is supported on Linux and macOS too!

    37. Re:Obligatory by Anonymous Coward · · Score: 0

      Keep in mind, at one point C, C++, Java, Javascript, D, whatever were hot new languages.

      So is Candy, my own computer language. Have you heard of?

    38. Re:Obligatory by im_thatoneguy · · Score: 1

      Shame it's not also on Linux

      The stated dev reason was

      It also means that if we advertise "Linux" we would need to QA a dozen different combination due to different Linux distributions and different editions of each distribution.

      But .NET Core 2.0 " treats Linux as a single operating system, much like it does with Windows and macOS. We've tested the new .NET Core 2.0 Linux builds on many Linux distributions and it works."

      So maybe there is some hope.

    39. Re:Obligatory by Zwets · · Score: 1
      --
      One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say. - Will Duran
  2. Never heard of it. by Anonymous Coward · · Score: 1

    NEXT!

    1. Re:Never heard of it. by __aaclcg7560 · · Score: 4, Funny

      NEXT OS is dead. Sorry you didn't get the memo sooner.

    2. Re:Never heard of it. by Karlt1 · · Score: 1

      There is a reason that many iOS/Objective C classes start with NS.....

    3. Re:Never heard of it. by __aaclcg7560 · · Score: 1

      There is a reason that many iOS/Objective C classes start with NS.....

      They also call it Mac OS these days. That's a different animal than the version of NEXT OS it derived from.

    4. Re:Never heard of it. by Anonymous Coward · · Score: 0

      Just tried it. News flash! Programming is still super boring.

  3. Re:More Java? Jesus, just stop it, already. by Anonymous Coward · · Score: 0

    Literally *none* of what you spewed here is true.

  4. Isn't this Ruby?! by wanchic · · Score: 2

    This looks an awful lot like ruby. Can someone show me the differences?

    1. Re:Isn't this Ruby?! by Pseudonym · · Score: 1

      There are a few differences:

      1. It's statically typed.
      2. It compiles to JVM and JavaScript.
      3. It's nothing at all like Ruby, except to the extent that Ruby borrows from the same languages that Kotlin borrows from.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    2. Re:Isn't this Ruby?! by TechyImmigrant · · Score: 0

      There are a few differences:

      1. It's statically typed.
      2. It compiles to JVM and JavaScript.
      3. It's nothing at all like Ruby, except to the extent that Ruby borrows from the same languages that Kotlin borrows from.

      It's
      A) Curly braces
      B) OO boilerplate

      So I throw it in the same basket with C++, C#, Java etc.

      It also isn't a real language because it compiles to a JVM rather than machine code. So it's less useful than C.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    3. Re: Isn't this Ruby?! by Zero__Kelvin · · Score: 1

      One can create a C compiler that outputs bytecode, just like it can create executables that run on RISC and CISC architectures as will add Harvard and non-Harvard. The same goes for Java, Python, etc. Your comment represents a general lack of understanding of languages and their implementations, and a false belief that the two are tightly coupled.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    4. Re: Isn't this Ruby?! by TechyImmigrant · · Score: 1

      >One can create a C compiler that outputs bytecode

      You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.

      >Your comment represents a general lack of understanding of languages and their implementations, and a false belief that the two are tightly coupled.

      No. It represents disillusionment at there still being nothing much new after 30 years of hardware and software development.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    5. Re: Isn't this Ruby?! by Wootery · · Score: 1

      I assumed TechyImmigrant was joking with the 'real language' thing. Could be wrong.

    6. Re:Isn't this Ruby?! by Pseudonym · · Score: 1

      It's
      A) Curly braces

      For some reason, the programming world has convinced itself that "C-like" means "curly braces".

      B) OO boilerplate

      Again, for some reason, the programming world has convinced itself that "OO" means "Simula".

      Programmers really don't understand programming languages.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    7. Re: Isn't this Ruby?! by Pseudonym · · Score: 1

      You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.

      I still remember the day when Microsoft C Compiler had an option to compile to bytecode. In the days of 16-bit, it made a certain amount of sense because memory was tight and the code density was so much better.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    8. Re: Isn't this Ruby?! by TechyImmigrant · · Score: 1

      You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.

      I still remember the day when Microsoft C Compiler had an option to compile to bytecode. In the days of 16-bit, it made a certain amount of sense because memory was tight and the code density was so much better.

      The apple ][ came with a bytecode called Sweet16 that let you do 16 bit code on an 8 bit CPU and yielded better code density. But requiring a browser or JVM seems to require a large amount of code bloat.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    9. Re: Isn't this Ruby?! by Pseudonym · · Score: 1

      Not to mention the BASIC interpreter.

      Most modern applications manage to be bloated even without an interpreter. All that spyware doesn't write itself. The bigger problem is battery life.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    10. Re:Isn't this Ruby?! by TechyImmigrant · · Score: 1

      It's
      A) Curly braces

      For some reason, the programming world has convinced itself that "C-like" means "curly braces".

      B) OO boilerplate

      Again, for some reason, the programming world has convinced itself that "OO" means "Simula".

      Programmers really don't understand programming languages.

      Some programmers don't respond well to subtlety in humor, even when it's not very subtle at all.
      I'm not a programmer. I have programmed, but these days, I make computers do my bidding by force of will.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  5. Like Perl... by __aaclcg7560 · · Score: 1

    I'll never heard of this new flavor of the week. But I had heard of Jetbrains. I use PyCharm IDE every day.

    1. Re:Like Perl... by Anonymous Coward · · Score: 0

      That would explain why you're spending so much time here, you're waiting for your shitty PyCharm IDE to run a script that takes hours, amirite?

    2. Re:Like Perl... by __aaclcg7560 · · Score: 1

      That would explain why you're spending so much time here, you're waiting for your shitty PyCharm IDE to run a script that takes hours, amirite?

      Nope. It takes nearly 28 minutes to process 596 pages and 8,929 comments. I haven't done any speed optimizations yet, as I'm still writing unit tests, refactoring code and writing documentation. The biggest delay in program execution is probably the latency to request each page.

      Pages Processed: 596, Comments (Accepted/Total): 8912/8929
      Oldest Date: 2008-08-04, Newest Date: 2017-05-17
      Scores (8766) | -1: 73, 0: 360, 1: 6642, 2: 973, 3: 385, 4: 322, 5: 157
      Bonuses (1219) | Flamebait: 30, Funny: 294, Informative: 196, Insightful: 321, Interesting: 260, Offtopic: 44, Redundant: 11, Troll: 63
      Total Time: 00:27:50.00

    3. Re:Like Perl... by Anonymous Coward · · Score: 0

      Nope. It takes nearly 28 minutes to process 596 pages and 8,929 comments.

      LOL - 3 seconds per page! With speeds like that, you're bound to get an offer as a top architect at Google soon, creimer.

      I haven't done any speed optimizations yet

      Because performance isn't built in from the start?

      as I'm still writing unit tests

      You should be writing unit tests throughout your coding - it's not something you do "at the end." For someone who's flogged TDD here before, you sure don't seem to get TDD at all.

      refactoring code

      And that refactoring doesn't include performance improvements? Fundamentally broken development.

      and writing documentation.

      Because it's more important to write documentation that'll never be read than it is to get your software working. Good show, friend.

      The biggest delay in program execution is probably the latency to request each page.

      And you'll solve that, how?

    4. Re:Like Perl... by __aaclcg7560 · · Score: 1

      LOL - 3 seconds per page! With speeds like that, you're bound to get an offer as a top architect at Google soon, creimer.

      I picked up Python when I was working at Google ten years ago. If I ever worked at Google again, I'll probably have to pick up Go.

      Because performance isn't built in from the start?

      Performance isn't an issue at this stage.

      You should be writing unit tests throughout your coding - it's not something you do "at the end."

      I'm refactoring one large class with 30 methods into a handful of smaller classes. The new classes require new unit tests. Since the program works, I'm writing documentation for the program and the unit tests.

      And that refactoring doesn't include performance improvements?

      That's not the focus at this stage.

      Because it's more important to write documentation that'll never be read than it is to get your software working.

      Program does work (see output from my previous comment). Since type-checking isn't Pythonic, I'll need good documentation to explain why zero as a numeral is acceptable but zero as a literal is not for a function. When the program throws a ValueError exception, you can see what types are documented and correct your mistake.

      And you'll solve that, how?

      Performance testing on my Red Hat Linux box (quad-core) and gaming PC (eight-core).Threading each page request is something I might try and maybe add to the next version.

      https://docs.python.org/3/library/threading.html

    5. Re:Like Perl... by Anonymous Coward · · Score: 0

      Performance isn't an issue at this stage.

      Performance is an issue at all stages of development. It informs every aspect of your design decisions. Writing code without considering the performance characteristics of that code is an exercise in futility - if what you write cannot satisfy the performance requirements, then it cannot be said to be "working."

      "Bolting on multithreading at a later date" requires major changes to your underlying design - if your design requires multithreading, it should be a factor in every iteration of your design, or you will end up with an unworkable pile of race conditions, data corruption, and deadlocks.

      I'm refactoring one large class with 30 methods into a handful of smaller classes. The new classes require new unit tests. Since the program works, I'm writing documentation for the program and the unit tests.

      Right, because documenting something you intend to change to satisfy design criteria is important. It's easier to delay making hard changes by crossing t's and dotting i's than it is to actually roll up your sleeves and fix your shitty code.

      That's not the focus at this stage.

      That statement, in a nutshell, sums up everything that's wrong with your approach, and your entire mindset. Delay the hard things until later, that way you can always blame factors "beyond your control" when nothing works. After all, you were working hard on documentation!

      Since type-checking isn't Pythonic, I'll need good documentation to explain why zero as a numeral is acceptable but zero as a literal is not for a function.

      This doesn't even make sense. Are you really saying that you think you need to explain why a string containing '0' is different than an int 0? That's basic python that anybody writing code in python should understand. Why the FUCK would you need to document that? Furthermore, why is your function not checking its inputs, and failing with a useful exception if the user specifies a string when an int (or other Numeric) is expected? That doesn't need "good documentation," that needs a clear method signature, or a useful exception message.

      Performance testing on my Red Hat Linux box (quad-core) and gaming PC (eight-core).

      That's not "solving the problem" - that's simply shoveling more hardware at the performance bottleneck that you're too dumb to design around. Threading the page requests is certainly an option to speed up the processing, but given your answers above, I'm pretty sure it's well beyond your capabilities, and will cause your turdy code to turn into an even more turdy pile of deadlocks and race conditions.

    6. Re:Like Perl... by __aaclcg7560 · · Score: 1

      Furthermore, why is your function not checking its inputs, and failing with a useful exception if the user specifies a string when an int (or other Numeric) is expected?

      Input checking is the Java approach. Python uses duck typing (if it walks like a duck, quacks like a duck, looks like a duck, it must be a duck). If I check 0 as int and '0' as str, what about [0] as list or (0) as tuple? I would have to check for all four valid expressions. Or just let Python throw a ValueException error (quack, quack).

      That's not "solving the problem" - that's simply shoveling more hardware at the performance bottleneck that you're too dumb to design around.

      The program runs fine AS IS. I have yet to determine that there is a performance bottleneck. The requestor object is the most likely candidate as latency is an external variable. Testing the program on different hardware will determine if there's a performance bottle in writing to CSV or Sqlite on the laptop (dual-core), Redhat box (quad-core) or gaming box (eight-core). All three have the same SSD and memory specs.

      Threading the page requests is certainly an option to speed up the processing, but given your answers above, I'm pretty sure it's well beyond your capabilities [...]

      This is an area that I will need to additional research.

      [...] will cause your turdy code to turn into an even more turdy pile of deadlocks and race conditions.

      Does it really bother you that much that I have A.S. in computer programming and not a B.S. in computer science?

    7. Re:Like Perl... by Anonymous Coward · · Score: 0

      Input checking is the Java approach.

      Two types of input checking - if you're talking "user input", then input checking is the only reasonable approach, period. If you're talking method arguments, sure, you can follow EAFP principles and let the exception bubble up. But if that's what you mean, then there is no need to document it - because anybody writing python code that calls your shitty methods is going to be familiar with the concept that '0' and 0 are two separate things in Python, and understand what the exception they see means, even if they're dumb enough to be incapable of providing an int argument in the first place.

      $ python3
      >>> x=0
      >>> y='0'
      >>> print(x-y)
      Traceback (most recent call last):
      File "", line 1, in
      TypeError: unsupported operand type(s) for -: 'int' and 'str'

      That's a pretty clear error message - the subtract method (-) doesn't know how to operate on an int and a str. What, exactly, do you need to "document carefully" about this?

      The program runs fine AS IS. I have yet to determine that there is a performance bottleneck.

      28 minutes to run something as simple as a web page scraper that parses a couple hundred pages? I'd fire you for wasting my time. There's definitely a performance bottleneck, which you failed to take into account in your initial design, and now your code is unusable shit which you keep on polishing anyway, hoping it'll turn into gold.

      The requestor object is the most likely candidate as latency is an external variable.

      The most likely candidate is that you've serialized access to your slowest-performing component. Since you've serialized the access, it's likely you've made large numbers of other design decisions that make your code not thread safe, which means it's going to deadlock, generate crap data, or exhibit all kinds of race conditions if you try to fix that performance bottleneck. Triggering you to have to refactor your entire code base once again, or just give it all up and focus on "finishing the documentation and unit tests," rather than actually improving the code's capabilities.

      Testing the program on different hardware will determine if there's a performance bottle in writing to CSV or Sqlite on the laptop (dual-core), Redhat box (quad-core) or gaming box (eight-core). All three have the same SSD and memory specs.

      No doubt you've serialized access to your local data stores, as well, so I'm sure there's a performance bottleneck there, as well. Good show, champ, you've pushed out a real turd!

      This is an area that I will need to additional research.

      Just as soon as you finish the real hard work of writing documentation of what a trivial exception from Python means, for actual python developers who know this shit already?

      Does it really bother you that much that I have A.S. in computer programming and not a B.S. in computer science?

      No, that doesn't bother me at all. What bothers me is that you seem to be completely ignorant of the most foundational principles of good design, even with that A.S. in computer programming. What bothers me is that you hold up your ignorance here on Slashdot as if it's a virtue, and expect everybody to congratulate you for being one of the most marginally competent computer operators in history. What bothers me is that you refuse to just shut the fuck up and listen when somebody who knows more than you do about a subject - obviously, and by your own admission as someone 'learning python' - offers you some useful advice on how you should approach your problem. What bothers me is that you try to paint any criticism of your idiotic foibles as some sort of exclusive elitism that's only looking down on you "because you just have an A.S."

      News

    8. Re:Like Perl... by __aaclcg7560 · · Score: 1

      What bothers me is that you refuse to just shut the fuck up and listen when somebody who knows more than you do about a subject - obviously, and by your own admission as someone 'learning python' - offers you some useful advice on how you should approach your problem.

      All you did was belittle my ability to code without actually looking my code. That's not helpful. So stop patting yourself on the back.

      I can tell you where your bottleneck is: it's the part of your "brain" that refuses to close your ignorant fucking mouth for a second and absorb honest critical feedback without getting defensive and whining about how hard you've had it, and how successful you are in spite of all your problems;

      You didn't offer any "honest critical feedback" to my code, as you have obviously never seen my code. All you did was talk shit.

      The part that expects us to congratulate you for being a scarcely-competent helpdesk monkey with pretensions to programming competence.

      BINGO! Here's the real problem. This is the whole point of all your comments. Take your negativity and stick it up your ass.

    9. Re:Like Perl... by Anonymous Coward · · Score: 0

      All you did was belittle my ability to code without actually looking my code. That's not helpful. So stop patting yourself on the back.

      After you made it clear that you had no interest in accepting critical feedback about your technique and your approach, yes, I belittled your ability to code. A good coder will accept feedback. A bad coder rejects it and comes up with reasons why his stuff that isn't working is somehow working "just fine."

      as you have obviously never seen my code. All you did was talk shit.

      I offered you critical feedback on your programming style - I haven't seen your code, but I have seen your claims about HOW you are working, and what your approach is to solving these problems. In essence, you have said, "I've produced a turd, but I'm going to polish it until it fucking *shines*." That's critique-worthy, and so I critiqued it. Don't like it? Stop posting on Slashdot about it.

      BINGO! Here's the real problem. This is the whole point of all your comments. Take your negativity and stick it up your ass.

      BINGO! You've completely missed the point, once again, and made it about how it's just "exclusive elitism" that causes people who "secretly wish they were you" to criticize you. What part of my post that indicated I knew nothing about programming when I graduated with a bio degree did you fail to comprehend? The difference between me and you appears to be that I was capable of not running my mouth while people who were wiser than I was offered advice - sometimes in an unflattering and harsh manner.

      I don't care what sort of paper you have - I care what you can do. And what you've show us you can do is prattle on endlessly about how great all your shit is, except all the claims you make are absurd, impossible, or betray a shocking level of ignorance and misunderstanding about simple programming principles. The whole point of my comments is to maybe beat a little humility and wisdom into your thick skull - not sure why I try, maybe I have a soft spot for idiots and fools.

    10. Re:Like Perl... by __aaclcg7560 · · Score: 1

      Stop posting on Slashdot about it.

      I'm going to do better than that. I'm planning to publish my code on GitHub and submit the project as an article on Slashdot.

  6. Re:More Java? Jesus, just stop it, already. by Anonymous Coward · · Score: 0

    Or relevant, since the article is about a language that is not Java running on a platform (Android) that doesn't use the Java Virtual Machine (or any virtual machine, for that matter, since Android uses ahead of time compilation to generate native executables).

  7. Kotlin is like Swift by Anonymous Coward · · Score: 1, Interesting

    I've been using Kotlin for Android development for a while now. It's not a passing fad, and it may one day overtake Java in many things. It's just Java with additional desperately needed features.

    I've heard no one whine about Swift being the flavor of the week, and yet, if you compare the languages, they are almost the same language with some slight syntactic differences. Both have null-safe typing. Both have lambdas quickly accessible. Both have extension functions. Both have interfaces that can contain default implementations. Both have getters/setters.

    The only difference is that Swift was basically forced upon the iOS world, while Kotlin had to earn its place.

    1. Re:Kotlin is like Swift by SoftwareArtist · · Score: 4, Informative

      I assumed you just meant it was "like" Swift in having similar features. But I started looking at some examples, and it's way beyond that. It practically IS Swift! I found a page comparing the two. Aside from some minor syntax differences, you could practically swap one for the other.

      --
      "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
  8. Bad examples not encouraging by Anonymous Coward · · Score: 2, Interesting

    So I click the first link "concise" and it shows me how to make a singleton. I thought singletons have basically been declared to be an anti-pattern. They're basically a name for an obfusticated global and make testing difficult.

    Not very inspiring to see a bad example as the first introduction to the language. It doesn't give much confidence that the team making the language actually gets bets practices.

    1. Re:Bad examples not encouraging by Anonymous Coward · · Score: 1

      Scala developer here. That functionality (including the "object" keyword) is cribbed more or less directly from Scala.

      It is a complete replacement for the "static" keyword. Instead of having a class named Foo that has random functions in it that you can't actually call on an instance of Foo, you have a separate object Foo sitting next to it where all that stuff resides.

      That is a huge step in the direction of less obfuscation, not more.

      The bigger problem is that all of the features listed are either cribbed or less powerful features than what I already have in Scala, which also compiles to JVM bytecode, can be used for Android development, and can be cross-compiled to javascript via Scala.js

    2. Re: Bad examples not encouraging by Anonymous Coward · · Score: 0

      Reading Scala gives me a wanging headache.

    3. Re:Bad examples not encouraging by Anonymous Coward · · Score: 0

      And then:

      fun calculateTotal(obj: Any) {
              if (obj is Invoice)
                      obj.calculateTotal()
      }

      WTF? Time for a paper "instanceOf: considered harmful". This sort of thing should (almost) always be done via polymorphism, not introspection. (The not-almost set being stuff like coding development environments.)

    4. Re: Bad examples not encouraging by Zero__Kelvin · · Score: 2

      No. Singletons are not an anti-Pattern, and are not the same as Globals. They implement encapsulation and enforce an interface. This means when you change the singleton your code doesn't break because you didn't hunt down every instance where the global is manipulated and make sure it manipulates it the newly defined and implemented way. That's just one difference.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    5. Re: Bad examples not encouraging by Anonymous Coward · · Score: 0

      Singletons inside shared libraries can cause problems if you are inside a web app that runs in a multi-context server with other web apps..

      It is a better practice to always use objects that are contained by your enclosing application context.

    6. Re: Bad examples not encouraging by Zero__Kelvin · · Score: 1

      Singletons that are multithreaded aware are not a problem. All objects that are not ARE a problem. The issue you described has literally nothing to do with singletons.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    7. Re:Bad examples not encouraging by robmv · · Score: 1

      An one of the reasons (of many) I reverted some of my applications modules written in Scala back to Java is the easy of use of the object singletons. Nearly all Scala libraries use them, making using those libraries in a shared context, for example an EAR lib directory or as app server module/plugin a nightmare. Singletons reused between different applications and the only way to maintain isolation is to ship the same library multiple times on each WAR of a EAR wilth multiple WAR.

      So no, I don't like languages that make easy to create global state. At least the Java statics are so ugly that is not common to see libraries crippled by their usage (or are Java developers more aware than Scala that global state is bad, I don't think that is the problem)

    8. Re:Bad examples not encouraging by Anonymous Coward · · Score: 0

      That's just silly. If you had a problem with an external library, then switch the external library. You could have used whatever library you're using instead right now, even.

      Not to mention, after over 5 years of Scala development using dozens of libraries, I have literally never run into the problem you're talking about.

      I do notice a particular tendency for Java EE developers to always come up with reasons to not use anything but Java EE. I'm sure you guys will make bank maintaining old codebases someday when Java EE goes the way of Cobol, but in the meantime I'll continue enjoying laughing at you while I write code that's half and long and twice as safe as yours.

  9. No, what we want is real Java by Anonymous Coward · · Score: 0

    Come on corporate overlords, you are swimming in money. Pay the fee and give us real Java with the full library.

  10. Python by Anonymous Coward · · Score: 0

    Heard of that one google? It's quite popular. How about supporting that instead of this thing which will go nowhere and be dropped in a few years?

  11. No lexer/parser. by Anonymous Coward · · Score: 0

    I'm waiting a lexer/parser generator for Kotlin similar to JFlex/CUP.

  12. Great by Maury+Markowitz · · Score: 1

    "a brilliantly designed, mature language"

    I have no reason to be suspect of the first part of that statement, but "mature"? Come on.

    Is it just me, or do you all find the recent move to platform-specific languages very worrying indeed? So for anything MS-like we're supposed to be C#, on xOS the new hotness is Swift, and on Android, it's Kotlin (or Go? or Java?).

    What's worse is that the only really cross-platform language remains C (there's plenty of real platforms with marginal C++, iOS for instance) and even that's easy to use only within Obj-C, which we're not supposed to like anymore.

    Fantastic, thanks, large natural monopolies.

    1. Re:Great by Anonymous Coward · · Score: 0

      Is it just me, or do you all find the recent move to platform-specific languages very worrying indeed? So for anything MS-like we're supposed to be C#, on xOS the new hotness is Swift, and on Android, it's Kotlin (or Go? or Java?).

      The language is not at all platform specific. The platform itself is the platform specific part. Kotlin (or Java) runs on a JVM, which can run on top of desktop Linux, Android, Windows, iOS, BSD, etc.
      It's only when your app starts using platform/hardware specific libraries, that your app will no longer run universally on all platforms.

      This is even true for C. If you have code that compiles to run on multiple targets, then it is either very generic code, or the source is full of target specific #ifdefs.

  13. Bloat by robmv · · Score: 1

    I find it ironic that the people (Android team engineers) that don't want to use Java enums on Android APIs because they add "bloat" are embracing another language that adds more overhead over plain Java (increased application size for example) than enums could add.

  14. Stop making Lang's, like dart,go by Anonymous Coward · · Score: 0

    Get to a decision, why are you also making dart and go.

  15. Re: Like Perl.. by Anonymous Coward · · Score: 0

    You type too much.
    Python is the first mistake.

  16. Re:More Java? Jesus, just stop it, already. by Anonymous Coward · · Score: 0

    Actually, he's 100% correct on all points, Mr Java apologist.