You know you love something when you can't help but coming back to it. I love a terrible language - it's ugly, it's stupid, it's mean. I dumped it again and again, but after a few months I end up missing it.
I really want to try Kotlin out. I want to give it a chance. The problem is that I can't help but feel it will become abandonware in the future. Somebody will buy JetBrains or they will start cutting costs and then Kotlin will be no more.
Am I being unreasonable here?
As an aside, I've felt that same "love" feeling with Scala, Clojure, and Nim. It's a great feeling because you start to imagine what can be.
I don't think you're being unreasonable. In my experimentation I concluded that Kotlin was largely chasing a subset mindshare of Scala, so I see it being at a long term disadvantage.
That said, one killer app can make a language, so who knows. But if you want a typed expressive hybrid-paradigm JVM language, it seems Scala is the obvious choice.
I agree with you, however currently JetBrains is making sure Kotlin works reasonable well on Android, while no one really cares about Scala on Android.
Yes many in the Scala community do care, but there isn't an ongoing effort with Android Studio tooling integration as in Kotlin.
So this could be a way for it to pick up steam, but it remains to be seen if the Android team still keeps the "We care only about Java" attitude at the upcoming Google IO.
Good point, and one I've got a blindspot for because we're not coding for Android (other than via Unity).
So yes, that could be enough of the 'killer app', if Android stays with Java. Do you have any intuition for why 'nobody cares about Scala on Android'? Not doubting you, just curious.
Android studio and everything that depends on the Gradle integration deep within it.
For example, I do actually like XML, but when I looked at it I came out with the idea that I could not use the visual tooling any longer, rather some Scala DSL.
Ah alright. yes, I think it makes more sense to define the GUI with code. Typed resources help with it.
sbt-android-gradle has full support for Gradle projects, but to be honest: Gradle is utter shit. Just use the SBT plugin. it works so much better.
The latest version even manages SDK and NDK for you.
I don't like having to use a different language (i.e. Apache Groovy) to write build scripts when using Gradle with Scala. With SBT, I write Scala to build Scala, see [1]. I can see why someone would use Groovy to build a Groovy project, but why should I use 20 lines of Groovy to build Scala?
I notice Kobalt [2] for Kotlin is still being actively developed, and Leiningen for Clojure, both using the syntax of the language they're compiling for their build DSL. If Gradle won't become language agnostic for specifying its build scripts instead of shoving something else down people's throats, people will elsewhere, or stick with Maven.
Not quite what I meant. I meant the set of people for whom Kotlin would be a good fit is largely (but not totally, I'd guess) a subset of those who would gain from using Scala. Therefore for any developer auditing languages, Kotlin and Scala are likely to be peers (as they were for me) and in that case, Scala being more established (i.e. more resources, more employees, more stack overflow questions) means Kotlin would struggle.
I just re-read the 'comparison to Scala' page, and that seems to reinforce that, e.g.: "if you're happy with Scala, you don't need Kotlin".
Which is not to argue my point: you know your goals far better than I. But if anything, take it as a gentle criticism of your messaging.
I am programming since the mid-80's, and as a language geek I have dabbled in lots of programming languages, focusing in systems programming lectures (compilers, graphics and OS architectures) at the university.
What I learned through my professional career was to only rely on OS SDK sanctioned programming languages for production code.
OS vendors also discontinue their official languages, but there is a higher probability that the programming languages will stay around vs tool vendor X.
The way Borland and ETHZ mismanaged their programming languages made me eventually adopt this attitude.
So I tend to be a late adopter in what concerns programming languages and as such find that you are quite reasonable.
"try <programming language> out" means experimenting with it for a few hours. Whether it becomes abandonware in the future shouldn't affect the decision whether to do that or not.
We have close to 10 products that are using Kotlin, quite a few of them entirely written in Kotlin. Most new projects we start are using Kotlin. Given we've invested 6 years into Kotlin already and are shipping products with it, I doubt it will become abandonware.
While it's a reasonable concern, I don't think there's so much overhead in learning Kotlin. It's fully interoperable with Java, so you don't need to invest in learning new APIs (which is the difficult part usually). Other than that, it's really light-weight and easy to pick up, you can learn it in a matter of days. Most of its features are bits and pieces, or "the good parts", from other programming languages, quite familiar for any developer who's been around the block.
I can't believe someone wrote an entire post about falling in love with a programming language and didn't include a single line of code from that language.
It may have been on purpose, but it just felt very hollow. The author didn't even bother linking to the resource [1] for trying Kotlin that apo helpfully shared in a comment below. I think if you embed the famous "mind blown" animated gif in your blog post, you owe it to your readers to say quite a bit more about what's so amazing.
This is exactly the feeling I've had with Rust. I love programming in it, it is so much more rewarding than any other programming language.
I nearly felt this way about Swift, and Kotlin looks like it would be great too. But Rust reminds me so much of how much I love C and how little you needed to get going, all the OS tools at your disposal, etc. I haven't had the same pleasure in learning Go or any other language.
But I totally agree, even if it's in your spare time, find the language you love and start contributing to the open source community for it.
Alan Perlis famously said, "A language that doesn't affect the way you think about programming, is not worth knowing."
A lot of times you can learn something in a new language, and then bring it back to other languages. For a simple example, programming in Python might give a programmer the insight that she doesn't need to write a factory for every class; or writing in Haskall might give him the idea that immutability is a good idea.
Then when the programmer returns to her original language, she can use those techniques, adapted to the original language.
This is definitely a good reason to learn new languages, but it does have its limits. Examples:
1. Erlang has done a lot of work to make their actors lightweight. In Erlang it's not only common to spawn a new actor for everything, but it's generally a good idea that organizes your code flexibly and results in transparent scaling onto multiple cores. On other systems that support actors, the actors aren't as lightweight, so while they're useful for organizing your code in some cases, using them pervasively will result in cripplingly slow performance and, depending on the language, completely exhausting thread/process resources.
2. Some schemes support CPS conversion and TCO, which allows you to use recursion at relatively little cost and without worrying about exhausting the stack. However, in languages that support TCO and not CPS conversion, it takes some work to be sure that your recursive calls are tail calls. And in languages that don't do either CPS conversion or TCO, deep recursion performs poorly and infinite recursion breaks outright.
This is why it's not only important to learn patterns in new languages, but to learn how those patterns are implemented under the covers.
> I could barely comprehend how little I wrote to get something to work.
There's a subset of developers that really fall in love with this idea. I try and understand where they're coming from but really have a hard time. The more involved with code reviews I've become through my career the more I recoil with fear when I hear this, recalling all the time I spent unbundling nested with nested within nested operations.
In the end I believe less LOC as an end goal is largely for the satisfaction of the single engineer writing the code. It feels good at he time.
Over time the super compact lines of code decay into hieroglyphics that cast a curse to the unlucky explorer that disturbs their tomb.
One man's hieroglyphics are another man's bread and butter.
It is all about shared culture. You don't write
empty x
repeat a times
repeat b times
add an item to x
count the items in x
but the hieroglyphical
x = a × b
Because "everybody knows what multiplication is". And even the explicit loop has lots of shared culture, for example in the idea what variables are, what a loop is, where it ends, that we do not use × but asterisks for multiplication, etc.
Modern languages may require more cultural background, but if that is useful for program comprehension that in itself isn't reason to say that disqualifies them. If it did, we would never have moved towards languages with malloc/free, garbage collection, or classes, the weirdness of IEEE floats, to mention a few things.
So, any discussion about new terminology/language constructs should mention costs and benefits. Also, which of them is greater will often depend on the target audience.
How can you not understand that all things equal, less code is better? Clear and concise code is good. We're not talking about fancy, unintelligible minimizations. Have you coded in Python? Give it a try.
I'd say that programming languages behave like normal languages and fall under the waterbed affect: if you push the complexity down on one corner then it simply pops up in another corner.
The question is which corner do you code for: the corner that develops the code or the corner that maintains it.
>In the end I believe less LOC as an end goal is largely for the satisfaction of the single engineer writing the code.
Fwiw, this is Ada's philosophy - code will be written once but read many times, thus the language should err on the side of clarity and verbosity to facilitate being read, even if at the expense of being written.
In theory I agree with this, but in practice it is a bit harder in my experience. To make readable code, it might help if the language itself is readable. But more importantly, the programmer has to write readable code. And that is a skill which takes a lot of time to learn (a lot of people never do) and when they don't, I'm not sure if a readable language matters much at all.
Anecdotal, I know, but I see/saw plenty of code written by juniors and/or sweatshops (seniors from sweatshops have a tendency to not progress much in their code writing skills over the years) written in Java, PHP, Python or Ruby which is completely unreadable. And, on the other hand, code written in C, assembly or Forth that is very easy to read even though the languages themselves don't really support traditional 'readable' code.
Reading in a natural language is only very little about syntax or strict semantic rules; plenty of novels which are syntactically correct and which follow the semantics of the language but which are 'readable' as per the definition of 'able to read and understand' however which not many people would ever read or finish if they did start.
Very terse code which is well written can be beautiful and easy to read; it takes very long to craft code like that in any language but once done, to me at least, it is easy to read and often preferred over reading 'the tech spec' (for which 'shorter is better' is a rule of mine anyway).
The first language I did any significant work in was PHP - and not modern PHP, which for all of its warts is at least usable, but 4.0.6. It was nasty, but I spent about three years writing it every day.
Then I picked up Python. It was hard to grok for a few days, especially when I learned things that didn't quite click like "strings are immutable" and "this is a comprehension". After a month of working with it in my free time, one day things just clicked - and suddenly, Python code was no longer something I had to read line-by-line pausing to understand each action, but something I could skim quickly and understand without expending conscious effort to do so. It was glorious.
That moment was about a decade ago, and I could probably write a book now on all the intricacies that I love about the language. I've toyed with other languages on the side, but I always come back to Python. I don't know if it fit the way my mind already approached problems or if it has changed my mental processes to conform to it - but it works for me.
reply