How I fell in love with a programming language
m.signalvnoise.com
m.signalvnoise.com
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.
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 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.
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.
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.
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.
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.
There are some people writing sbt plugins for Android development, but that is not the same as the full Android Studio development experience.
In fact SBT + ProGuard is faster than Gradle + no ProGuard.
Has this somehow improved?
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.
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 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.
Have to try it out again.
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.
No, you are being pretty reasonable.
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.
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.
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.
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.
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).
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.
The question is which corner do you code for: the corner that develops the code or the corner that maintains it.
In my case is JS or Java. They are clearly languages to learn -it could simplify my life- but I don't feel like even to start.