Remember all those people who kept saying that once you learn one programming/scripting language then it's not too difficult to learn another one? ...
For further actions, you may consider blocking this person and/or reporting abuse
Very true. But be forewarned, the similarities are often only syntax-deep. Identical-looking things in Python, Kotlin, and TypeScript, (such as arrays/lists, imports, logging, classes, objects, dictionaries) do not necessarily behave the same under the hood, in ways that can have a profound effect on the code's stability, maintainability, performance, and security. In fact, I can guarantee that Python and Typescript are scarcely comparable in terms of identical-looking behavior!
With any language, assume nothing. "False cognates" are everywhere.
Or, to put that another way, abstractions are there to save us typing, not to save us thinking. Know your abstractions.
Well that may be true however I did say that I am still learning them so this post was not meant to be a deep dive into all the differences between the 3. Only my current impressions and what I have noticed so far. I am learning them for career progression and to further employment opportunities. If I was doing research then of course I would have chosen different languages to compare π
Also not everyone knows that they came from C-like families only someone who has knowledge in this area would have that information. A beginner who reads this would not know that.
Thanks for sharing your experience. Itβs good to know these languages are easy to pick up.
One thing I found that was more difficult in some other languages was the tooling, documentation, setting up builds, how to structure projects, discovering libraries, managing dependencies etc. I found all these things much easier in the NodeJS / javascript ecosystem (though frontend js tooling is quite complex these days). This would be the biggest thing that would put me off from switching / learning a new language.
Good start to explore different languages, I think that is something every developer should do! Even if you are not using different languages on a daily basis, expanding your knowledge in different languages will expand your toolkit and also make you think differently about how you solve problems. Different tools for different tasks. As you yourself note, knowing more programming languages will help solidify core concepts.
As others have commented, these specific languages (Javascript/Typescript, Kotlin, Python) are relatively closely related to each other. Difficulty in transition between them probably will more be around tools and frameworks and behaviour in specific areas, more than syntax.
I can recommend looking at the presentation Four languages from forty years ago for some examples of languages that have taken different approaches and also help with thinking about problems differently. It also shows that some features that are "new" in some of the more common languages today are in fact quite old things - for example, type inference that you can see in Kotlin and Typescript is something that already appeared in the 70s, in ML and that family of languages.
Andrew,
Interesting read. I'm not sure what you meant by the title. I feel like I'm either missing something or you didn't fully write a conclusion that solidifies the title. Did you realize they share similar structure? Could you elaborate.
Thanks!
Thanks for the feedback my initial intention was to just show the differences between the Syntax so you could see how they look quite similar. Like Python using
print()
and Kotlin usingprintln()
for logging data to the console. Anyway I decided to update the post I added a section for Import Statements and a very detailed conclusion so enjoy πThanks for sharing. Nice to see them side by side.
Python 3 supports type hints as well which you can validate with mypy, in case you are interested in making your python code type-safe.
Oh cool I did not know that I will check it out.
I wrote a guide here for you to use michaelcurrin.github.io/dev-cheats...
Your variable naming in the "Loops" example is a bit weird -
item
would be preferable toitems
- which is confusingThanks I fixed it.
Yes. Correct.
So there are these words in our friends. If you can assign value to a string, you can do program