
Why is it difficult for developers to learn another programming language? [pdf] - todsacerdoti
http://nischalshrestha.me/docs/cross_language_interference.pdf
======
burlesona
I find the opposite is true. Learning the first programming language was hard,
the second was easier, the third and fourth easier still. At some point you
develop intuition about what computers can and cannot do in a universal sense
and then you realize every language is just different nuances and emphases on
those capabilities, and it becomes pretty easy to pick up a new one very
quickly.

Edit: after reading the paper I understand the emphasis is on conceptual
mistakes people make when coming from one language into another - you assume
things work like A and make mistakes when B works differently under the hood
and you don’t realize it until banging your head against it for a while.

That experience does ring true, but I stand by my original comment, this is
mostly only an issue for language #2, and with each language it gets easier as
you begin to think more in universal terms and have fewer assumptions and gaps
where you’ve been accustomed to something that “just works” in the environment
you’re most familiar with.

~~~
JamesBarney
My biggest problem learning a second language is that it's so much less useful
than the first.

Ten years ago I learned C# and since then I've dabbled in other languages like
Haskell or Lisp which were a little fun, but I keep getting drawn back to
learning more about my stack. There's still decades of knowledge I lack about
Azure/Entity Framework/Asp.Net/Xamarin/Sql Server/WPF/C# CMS/C# CRMS/C#
e-commerce/Roslyn the opensource compiler/Blazor/Typescript/React/CSS. (Not to
mention all of the useful soft skills, like sales/
marketing/negotiation/management)

And I'd rather be able to build out a desktop app, a web app, or a mobile app
than be able to build out a web app in js-node/C#-mvc/ruby-rails/python-
django.

Basically when I learn I want to be able build I couldn't before (like a
mobile app) or get better at building(learn how to better optimize t-sql
queries). And when I've spent time learning new languages I felt like it
wasn't as useful at delivering on these two goals.

~~~
vizzier
Maybe look at F# for something .net compatible. Personally its use in some
contexts, particularly those using the F# type providers has served me well.

I also prefer to use FSX scripts over CSX in contexts where that is useful. I
find my deeper knowledge of the .net infrastructure easier to leverage than
having to learn powershell but FSX syntax also cleaner for scripting.

~~~
JamesBarney
I've used f#. Type providers were really cool. And I like how terse it is but
I feel like the gap is narrowing, and I couldn't ever use it on a real
project. I'd feel guilty building a project for a client that is supportable
by a tenth the number of developers without very good reason.

------
ashtonkem
Is it? My personal experience makes me think that it isn’t. I’ve programmed
professionally in eight languages if you count significant line changes, ten
if you count any change. At this point changing editors is harder than
changing programming languages.

~~~
Twisol
Your first language is hard because you're learning a ton of things all at
once, only one of which is the language itself.

Your second language is hard because it's not the first, even though it's
probably pretty similar. But the differences will catch you out. A second
language challenges the mental models you built up with the first language --
you have to tear some of your understanding down and come up with a more
generalized perspective.

Languages similar to the first two become easier to pick up after this point,
because you're mostly looking for a handful of differences, not a total
paradigm shift. But languages that are sufficiently different, like C and
Haskell, require a lot more of the ground-up type of work you thought you'd
left behind by now.

It gets easier and easier as you cover more of the conceptual landscape. But
I'd be willing to bet that many developers haven't had to journey far from
home.

~~~
ashtonkem
I’d agree that similar languages are easier to learn, but once you’ve learned
how to learn a programming language, new ones are easier, even if they’re
dissimilar from your prior languages.

For the record, my professional work includes languages as dissimilar as PHP,
Java, and Common Lisp, while my hobby hour work includes Rust and Haskell.
That’s a pretty wide range of the language space that exists today, IMO.

~~~
Twisol
My language gamut is similar to yours -- I don't disagree. I usually find it
straightforward to pick up something new too. But there are still languages I
know are going to take a lot more time for me to grok, like Coq. (I tried Coq
a few years ago, and even though I already knew a fair bit of Haskell, the
differences were enough to completely throw me off.)

------
nnq
It's easy to learn new languages, hard/slow to learn _the ecosystem..._

We should get better at creating mixed-ecosystems and cross-language
libraries... the JVM was a step in the right direction but most new
development _completely forgot about that!_

~~~
csunbird
Agreed. There is also another problem: For example, I know that I can code
with C# but I do not know what is the traditional workflow for designing a
micro-service in .NET

You just do not know how to "Do things in the right way"

------
blackrock
The pure language features itself, is not hard to learn. This is just the tip
of the iceberg.

It’s all the frameworks, and their undocumented features, that sometimes
doesn’t make sense, but it’s the way it is done, which is what makes learning
new languages hard to master.

~~~
cleansy
On top of that there is also understanding the philosophy of a language.
Learning python as my 3rd productive language was 3 full-time weeks, "Doing
things the pythonic way" took years.

~~~
ozim
That is also why getting into frameworks is a bit hard for people who are used
to do things without frameworks. Like people who stick with JQuery and find
Angular hard, because you have to do stuff "Angular way". You can write a lot
of javascript and switch to typescript but "Angular way" is yet another thing
to learn.

I can write python and understand the code, know some quirks but for large
code base I would probably be lost because I don't know "python ways".

------
tiborsaas
I think the title should have been: When it's difficult to learn a new
language, why is that?

Some paths are easier than others so it really depends on the new language and
where someone is coming from. I started with PHP/JS on a self taught basis.
Then I started to develop interest in other languages. Python was a no-
brainer, C++ looked quirky but okay, in Java most thing looks familiar. But
functional languages get me. Rust is another beast, but totally looks tamable.

Haven't finished the article yet, but it has some great insights.

------
voz_
My anecdotal data appears to point to the opposite. My first language (JS)
involved learning:

\- What is even programming? What is a function? an argument? What is state?
What are types? \- JS itself \- How browsers work \- JQuery (do people still
use that?) \- NodeJs \- How backends work \- How databases work

Then, the subsequent language, Java, was only different in patterns,
paradigms, keywords, and frameworks (at least, at the amateur level I was
going at). Args were still args, strings were strings, sure we had classes
instead of functions here and there, but for a beginner it was close enough.
Java, the second language, was far easier to learn. And so forth, with each
language becoming progressively simpler.

~~~
yomly
JS is a really horrible language to learn from the perspective of a teacher.

So many concepts dumped on you all at once. Before you even know what a
function is, you have the entire DOM API dumped on you and is available in the
global scope.

If you try to learn OOP in it, you have the choice of trying to grapple with
the leaky ES6 class keyword or you get prototypal inheritance and `this` will
come up.

That said, from a learner's perspective it's great: you have the entire DOM
available to you instead of having to learn how to take the car of the cdr of
a list and wondering how that has anything to do with building the next
Airbnb/Uber of this world...

At least with Python/Ruby they commit hard to terseness / fluent interfaces so
you have less syntactic noise to deal with, and Haskell commits hard on
equational reasoning so you can pick up computation if you've come from a
mathsy background. Or Scheme which is as close as you can get to "no syntax"
as you can (IMO)

~~~
tiborsaas
I used to teach programming with JS. It was not really a blocker for me at any
level. When we hit some quirks I stopped to explain why this is and how it's
different in other languages.

Maybe because I like JS made me enjoy teaching it as well :)

~~~
yomly
I actually quite like JS, but I almost feel bad for people who discover it as
their first foray into programming.

I mean it's great because it makes programming more accessible to non devs.
But man is it unfortunate that JS was the language that ended up being the
language of the web.

The browser is the ultimate interactive development environment. You can
literally play with the page in situ. Akin to CAD and Excel (...or Emacs[0])

[0][https://www.gnu.org/gnu/rms-lisp.html](https://www.gnu.org/gnu/rms-
lisp.html)

~~~
tiborsaas
Don't feel bad, my first language I've ever written programs in was C-64 basic
:)

I don't know what would have been a better choice, but JS is not bad for a
browser language. It had a rough childhood, but turned out to be a decent
adult.

I still remember VB Script supported in old IE, but then there was JS and I
just focused on that. It really made no difference to me since I was able to
build cool stuff I wanted to. That brought me joy of creation and that's what
mattered, not "that's not OOP like god set in stone".

Whatever enables people to be more involved in programming, I consider it as a
good thing.

------
smitty1e
Can we just call "cross-language interference" an "accent"?

When I code VBA macros, I pile up all of the "End If" and other compiler noise
in column 80, with comments.

Because I'd really rather be coding Python.

------
raz32dust
Title is a little misleading as it seems to imply that programmers find it
difficult to learn another language. But there is no such implication in the
study. The study really seems to be about specific language features that can
contribute to making it harder/easier to pick up.

------
squidkid
What i struggle the most when coming to a new language is the tooling that
comes with it. And how do I structure my code in this new language. Sure some
things are universal, but some things are just hard to find out. The js
ecosystem is an especially tough example for this.

------
dnprock
My CS college program made me take a programming language fundamentals class.
I still remember it. The class was one of the most difficult classes. We had
to learn 4 programming language paradigms: imperative, declarative, object-
oriented, and functional. In each paradigm, we learned to write programs in a
chosen language.

I find the experience very useful for my software career. It helps me learn
new programming languages quickly. When I see functional operators, I remember
Haskell.

I'd recommend to master one language in different paradigms. It pays
dividends.

[https://en.wikipedia.org/wiki/Comparison_of_programming_para...](https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms)

~~~
nayuki
I had a class that was even more intense, CSC324H at the University of
Toronto. We learned Scheme emphasizing on higher-order functions, ML
emphasizing on static typing, Haskell emphasizing on lazy evaluation, and
Prolog emphasizing on {Horn clauses, unification, backtracking}. All in the
span of a 12-week semester.

------
loopz
Circumstances and expectations might be different. When starting on your first
language, was different than the second, and different from your third, etc.

Your first language, you know you don't know much. So you try out and play
with it. If you're unlucky, you get stuck, don't get the books, software or
help that would make you proceed (ie. machine code for C64), so would need
something else or give up altogether. For some experiences, you just need to
know the right people, be in the right circumstances.

On your second language, you probably already seen program listings in several
languages already. You expect to get up and running after a few hours. This
might happen if the paradigms are the same. For a completely different
paradigm, you could need to grind it over time or start over as a beginner in
that paradigm again.

Also, for many, learning new languages, frameworks etc. are not the fun part
anymore, so get less emphasis on playfulness and spending time with it. When
preference is on being productive, one might miss many big opportunities.

------
njharman
I think this depends a lot on the developer.

Some Devs I work with want to dabble with many tools and solve problems by
picking (or creating) a new tool rather than learning how to solve problem
with existing tool. They learn, and are talking about (and trying to get team
to adopt) other languages all the time.

Personally, I want to totally master a small number of tools. (perhaps just my
inability to master many). So, it's not that I find it hard to learn new lang.
It's I'm unwilling to waste effort on it unless there is advantage. And to
overcome the mastery I have attained after 25 years of Python that advantage
has to be large. [btw Past langs include VisualBasic, Pascal, PHP, C, C++, and
PERL. But only PERL did I use long enough for mastery]

Neither is obviously better/correct. Like I said, it depends on how the
developer best works.

------
justinlloyd
My anecdotal evidence is exactly opposite to the paper. I would expect the
title of the paper to appear as a headline trotted out in some mass media
publication with the article written by a journo that dabbled in BASIC in high
school and decided that programming and software development wasn't for him.
Maybe I've forgotten what it is like to not be able to program, in the same
way I don't understand how to not swim, or how to not ride a bike, or how to
not read and write, but learning a new language, learning it well, to be
facile in the language and the standard APIs that come with the language
(ignoring the tens of thousands of obscure little npm packages in javascript
for instance) is not a huge amount of work.

------
kissgyorgy
What is really important when learning a new language is just forget any
idioms you learned the last time! Know how computers work, and have a general
knowledge about memory management, data structures, algorithms and clean code,
but try to understand the new language's idioms. You will have an easier time
and make less mistakes.

For example, there are typical mistakes when a C or Java programmer uses
Python for the first time, I can tell somebody's history just by looking at
what idioms they try to force on Python which shouldn't.

Example for C programmer writing Python:

    
    
        for i in range(len(mylist)):
             print(mylist[i])
    

Example for Java programmer writing Python: Starting hello world with "class
HelloWorld:". LOL You don't need to start with classes and objects in Python!

------
peter_retief
Not really true, it gets easier the more languages you learn. I do know of
developers who spent their whole working lives using only one language and
they are very good at that one language. (I am thinking of MUMPS and the
developers I met when working in the medical s/w field) Should we just learn
one language and do we gain by knowing many and why are there so many
languages that do the same thing? If there were to be one language what would
it look like?
[https://en.wikipedia.org/wiki/MUMPS](https://en.wikipedia.org/wiki/MUMPS)

------
keyle
I write JavaScript and python daily. I'm fairly fluent in many languages
including C++.

The only language/platform I'm having difficulty with is Swift and MacOS
(Cocoa)! It's a pile of ancient junk and 5 versions of a new language with
absolutely turd documentation from the platform and a gigantic pile of "meh
works for me". It feels like trying to run in moving sands with your eyes
closed and your hands tied.

I'm only saying this to make a point: sometimes it's not the developer having
a hard time as much as the ecosystem making it a living hell.

------
sacks2k
In terms of your career, it's better to become an expert at one language than
a jack of all trades. I can quickly move from language to language, but make
the most money as a consultant for languages in which I'm an expert.

I also think many developers use a single language for work and don't have
much time after work to learn another one.

------
mbrodersen
It isn't in my experience. A list of languages I have used professionally: C,
C++, Java, C#, Javascript, Typescript, Assembler (PowerPC), SQL, ... And for
fun: Basic, Pascal, Haskell, Lisp, Scheme, Idris, Assembler (Z80 and I86), ...
Only Haskell was hard to learn (but most definitely worth it).

------
cm2187
In my opinion it is all down to muscle memory. When you don't even need to
think about whether this class will behave one way or another, you just know
that if you type it this way it will work without a doubt.

------
MattGaiser
I mostly get stuck on the function, func, fun, void, def, etc.

Most other stuff is very similar.

