@dwhall256

> Most people use the editor/IDE of their choice. I'm not going to switch 
> editor/IDE just for a new-to-me language. Any killer feature one editor/IDE 
> has is usually replicated to other editor/IDEs in a matter of months.

I'll argue that a lack of a decent IDE _support_ is one of the reasons why Nim 
isn't taking off, yet. What I find most attractive about Nim for compiled 
applications is that it's easy to read like Python. _However_ Nim's development 
tooling isn't as mature and robust as other languages like Python, C/C++ or 
JavaScript. To be fair to Nim, Python, C/C++ and JavaScript have several 
decades of development and notoriety on Nim so this isn't a criticism. It's 
certainly an opportunity Nim needs to focus on and exploit to become 
_mainstream_.

The [Which tools do you use to code in Nim](https://forum.nim-lang.org/t/10507) 
thread shows there is still some manual setup and tinkering in the tooling to 
use Nim. Visual Studio Code and JetBrains IDEs appear to be an exception, 
though where these two make up for ease of getting started they seem to lack 
maintenance and an active community of developers to help drive them forward:

  * Visual Studio Code's (official?) [Nim extension by 
nimsaem](https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode) 
seems to have stalled (last commit 4 months ago at time of writing; two other 
Nim extensions haven't recieved commits for 3 years at time of writing)
  * JetBrain's [Nim extension for JetBrains 
IDEs](https://plugins.jetbrains.com/plugin/15128-nim) hasn't been updated to 
support the latest versions of their respective IDEs, making it hard to adopt 
Nim. Piotr is the sole developer, who also works for JetBrains, who 
unfortunately can't seem to dedicate a lot of time to the extension (and it is 
not yet open-source).



The reason why I'm focusing on these IDEs particularly is because of their 
significant 
['marketshare'](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-integrated-development-environment),
 of 86,544 people surveyed. Converting percentages into rough numbers, noting 
that developers are likely to use more than one IDE:

  * **JetBrains IDEs** : 75,544 approx. users (IntelliJ IDEA, Android Studio, 
PyCharm, WebStorm, PhpStorm, Rider, DataGrip, CLion)
  * **Visual Studio Code** : 63,792 approx. users
  * **Vim** -like: 29,572 approx. users (Vim, Neovim)
  * **Emacs** : 4,059 approx users



@haxscramper

> You need to know who you are selling the language to and what their needs 
> are. Why should I care about the language for example.
> 
> What problem does it solve for me, specifically? Most people are not out in 
> the wild for some quest for enlightenment and better languages, they are 
> looking to solve their problems.

I stumbled across Nim, I think from a random post on Hacker News. For what it's 
worth, I'm a spatial analyst that, among other things, works on algorithms that 
drive wildfire risk and impact modelling for a government emergency management 
organisation. Most of this work is coded in Python (which is used extensively 
in the GIS world), though I'd like to be able to compile some of our slower 
more intensive algorithms for efficiency gains, [like others are doing in 
Rust](https://web.archive.org/web/20220506040523/https://www.nature.com/articles/d41586-020-03382-2).
 Our algorithms exist on desktops, server-side applications, and in web 
applications, so Nim's cross-compilation ability into C, C++, and JavaScript is 
a pretty big perk.

The only thing holding me back is tooling, because of the corporate/government 
environment I work in. I depend on robust tooling. As @giaco points out, the 
tooling side of things is perhaps too brittle for corporate/scientific use.

So, to answer this to help drive the discussion:

> The order of questions must be: What's in it for me? Why should I bother so 
> much (where how 'much' newcomer is bothered defined by availability of 
> documentation, tooling, libraries)?

I don't have the time or the brain wiring to learn, let alone _understand_ , 
C-like languages. I have a really difficult time making sense of languages that 
use special characters extensively in their syntax so C/C++, JavaScript, and 
Rust aren't reachable for me, at least not without significant effort. I am 
magnitudes faster working with _pythonic_ languages over C-like languages, so I 
preference them. It helps that most of my tooling exists in Python (GIS, data 
science, etc.).

Nim allows me to write fast algorithms and standalone executables without 
struggling with C-like languages. Nim is much more ergonomic, which reduces my 
development time writing **clean** code and debugging, which is why I like 
Python. This is despite Nim's immaturity compared to Python. I can read a block 
of Nim, or Python, and understand it without too much cognitive effort. I can't 
say the same for C/C++, JavaScript, and Rust. They disorient me.

After all, whether one loves or hates the philosophies posited by Robert 
Martin, [code is read far more often than it is written; and code that is 
easier to read, is easier to 
change](https://dev.to/thawkin3/in-defense-of-clean-code-100-pieces-of-timeless-advice-from-uncle-bob-5flk).

I think this is Nim's selling point to a lot of developers: high-performance 
general-purpose _compiled_ programming language that is easy to read and 
maintain, is able to target multiple systems including web browsers, and can 
easily bind C-like libraries for extensibility.

@treeform

> Python and Ruby got there through a combination of luck, merit, and 
> community, which is very rare.

I think there are a few other factors here too:

  * [Strong 
ecosystem](https://softwareengineering.stackexchange.com/questions/436700/how-did-python-come-to-be-so-popular-amongst-data-scientists)
 in tooling and packaging (particularly the data science stuff)
  * Python is used to [teach computer 
programming](http://radar.oreilly.com/2015/04/five-reasons-why-python-is-a-popular-teaching-language.html)
 in schools and 
[university](https://stackoverflow.blog/2017/09/14/python-growing-quickly/) 
(usually for Introduction to Programming classes, replacing Visual Basic) which 
then extends into academia (see Seasonal Traffic from Colleges and Universities 
graph), likely because of Python's strong data science and data engineering 
ecosystem



[Konrad](https://softwareengineering.stackexchange.com/a/436711) makes an 
interesting point:

> Possibly your question could be rephrased: why Python became popular in the 
> first place? The rough answer could be do to appealing combination between 
> simplicity and flexibility.

I'd assert that if Nim made a concerted effort to bullet-proof its tooling for 
v2.1/v2.2 it could easily build [the same momentum that Rust 
has](https://stackoverflow.blog/2020/01/20/what-is-rust-and-why-is-it-so-popular/).
 Despite Nim's 2.0 status, it still doesn't seem to have the same feelings of 
robustness that is often paraded about with Rust (see: "The Rust ecosystem"), 
which is younger in age (2015) and in version (Rust 1.73, released Oct 5 2023).

Perhaps there is still plenty of opportunity sell Nim to programmers, even 
students, that struggle with or avoid Rust and other C-like languages (like me) 
because of [how difficult they can be to 
learn](https://www.infoworld.com/article/3324488/rust-language-is-too-hard-to-learn-and-use-says-user-survey.html):

> The most common reasons cited for not using Rust were that it was “too 
> intimidating, too hard to learn, or too complicated” (25%), that “My company 
> doesn’t use Rust” (47.83%), and that “I haven’t yet learned Rust but I want 
> to” (74.02%).

I'd argue that _" build the tooling, and developers will come to develop 
packages"_ would certainly help Nim's cause. 

Reply via email to