top | item 11696141

How I fell in love with a programming language

58 points| braythwayt | 10 years ago |m.signalvnoise.com | reply

45 comments

order
[+] ktRolster|10 years ago|reply
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.

[+] kerkeslager|10 years ago|reply
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.

[+] bluejekyll|10 years ago|reply
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.

[+] crabasa|10 years ago|reply
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.
[+] bsaul|10 years ago|reply
I think it's on purpose. He doesn't want to talk about kotlin in particular, but rather about the feeling of loving a language.
[+] partisan|10 years ago|reply
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.

[+] sago|10 years ago|reply
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.

[+] pjmlp|10 years ago|reply
> Am I being unreasonable here?

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.

[+] hhariri|10 years ago|reply
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.
[+] V-2|10 years ago|reply
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.
[+] bjourne|10 years ago|reply
"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.
[+] jrcii|10 years ago|reply
Is that love for Clojure past tense?
[+] LyndsySimon|10 years ago|reply
I can relate to this.

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.

[+] matt_wulfeck|10 years ago|reply
> 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.

[+] Someone|10 years ago|reply
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.

[+] tluyben2|10 years ago|reply
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).

[+] SkyMarshal|10 years ago|reply
>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.

[+] pbreit|10 years ago|reply
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.
[+] cdnsteve|10 years ago|reply
Whoa all the jetbrains projects are using this and they are the main backer of the language. Very interesting.
[+] astrobe_|10 years ago|reply
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.
[+] keypusher|10 years ago|reply
That's not love, that's an abusive relationship.
[+] _uhtu|10 years ago|reply
What language?
[+] galfarragem|10 years ago|reply
Then there is that situation when you hate a language.

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.

[+] ak39|10 years ago|reply
Just wait a month or so when it'll sound like a rebound relationship that went horribly wrong.