HN user

nimmer

277 karma
Posts8
Comments216
View on HN

Nim is a very good choice because it generates tiny binaries while having a very expressive syntax.

It's the closest language to a static typed Python.

Also it uses GCC, which supports most microcontrollers.

You can use --styleCheck:usages or a linter to ensure that the style is uniform.

You cane enable styleCheck:usages by default in the compiler. Also, most editors do variable/proc autocompletion.

Also you can use nimgrep if have to search across projects written by different people.

No. Nim always throws an error if you try to define multiple variables/procs that are conflicting.

--styleCheck:error strictly enforces camel case.

If Nim can work with numpy it's a plus

Nim goes further there by removing the need for tools like Pandas and numpy. You don't have to write code in "Pandas-style" because native Nim is equally fast and sometimes faster.

This is the opposite of a footgun. Imagine if DNS was case sensitive and GMAIL.COM belonged to a domain squatter.

Nim prevents that. It's that simple.

This is exactly what Nim does. If you try to define both my_var and myVar it will error out.

The benefit is to avoid confusing variables or procs named my_var, myVar and myvar.

Style insensitivity is a safety feature, not a problem.

It prevents bugs where a developer mistakes one variable or proc for another having similar names.

For example in another language you might have variables isReady, isready, is_ready and use the wrong one, leading to a bug.

Nim does not allow defining 3 different variables like that.

Nim uses GCC and works very well. Nim is among the fastest languages both in runtime and compilation time also thanks to GCC.

GCC supports way more architectures than LLVM.

How would I convince my employer to let me use Nim instead of a better known language?

This is a rephrasing of "nobody ever got fired for buying IBM".

Some organization prioritize innovation and technical acumen.

So having a nice, performant and good language is just a small part of achieving your goals. You also need the people and the ecosystem.

Many applications don't need a large ecosystem. People can learn.

Go, Rust, Kotlin, Swift and even Julia have the luck of having some industry heavyweights behind them

Python was never corporate-driven, thankfully, and it is successful.

It's primarily a testament to how simply mind bogglingly slow Python is

No, Nim is truly among the top fastest languages when writing idiomatic code as shown in many benchmarks.

But Nim is only one of a whole suite of languages that easily cruise to a 10x performance win over Python

...while also being very friendly to Python programmers, intuitive and expressive. Unlike many other languages.

Nim 2.0 thoughts 5 years ago

I never had this issue: do not mix different stiles across the same project.

Instead, you can import and use libraries that use a different stile without breaking your convention.

Nim 2.0 thoughts 5 years ago

It is. It's just not very pleasant to read due to the autogenerated variable names.