Live data from Hacker News

Nim 1.6.2

nim-lang.org

81–90 of 162 posts

Re: Nim 1.6.2

#81

Nim is everything Python and Go should be/want to be, as far as language features and semantics go (haha). It has their easy-to-learn properties, but has a better type system, the generics system and macros are arguably more useful, and more usable than what is offered in either language. It deserves far more attention than it currently gets.

I like Nim, and probably will learn it at some point.

But no, Nim is not everything "python should/want to be".

The name case insensitivity and the implicit imports on the global namespaces are perfect examples of stuff that are better in Python.

Re: Nim 1.6.2

#82
What’s the story like using Nim for WASM?

I’ve always meant to take a proper look at Nim, and maybe WASM could be the perfect place for it.

Re: Nim 1.6.2

#83
post #3

Genuinely curious - why should I care about Nim? There are already a plethora of general purpose languages (both compiled and interpreted). Also, is anyone using Nim today? What's the adoption?

Super high level elevator pitch:

It's as fast as Rust, nice to look at like Python, easy to write like Python, and compiles to static binaries for any platform you can think of.

There are a lot of other great things about the language but this should get anyone excited.

Re: Nim 1.6.2

#84

Nim is everything Python and Go should be/want to be, as far as language features and semantics go (haha). It has their easy-to-learn properties, but has a better type system, the generics system and macros are arguably more useful, and more usable than what is offered in either language. It deserves far more attention than it currently gets.

What added value does it have over Kotlin?

Re: Nim 1.6.2

#85

Nim is everything Python and Go should be/want to be, as far as language features and semantics go (haha). It has their easy-to-learn properties, but has a better type system, the generics system and macros are arguably more useful, and more usable than what is offered in either language. It deserves far more attention than it currently gets.

As someone learning programming, should I try nim for my first compiled language, instead of C++? I know it's likely harder to find answers in the Internet, but at the same time it looks easier, coming from Python and JS. If nim picks up pace in a few years and I already have a sense of it, it may be a good for prospects too.

Consider either Rust or Go of you want something easier than C++, but that still has a large community and lots of learning resources.

Re: Nim 1.6.2

#86
post #3

Genuinely curious - why should I care about Nim? There are already a plethora of general purpose languages (both compiled and interpreted). Also, is anyone using Nim today? What's the adoption?

It’s just subtly different than anything else out there. It for the most part feels like a Python-like language, but compiles to C so is very fast.

It also has one of the better macro systems out there. I was interested in developing a programming language with macros, and it has a ton of documentation about it. It’s really well thought out.

I’m not saying to run a business on it, but there are lots of interesting things out there. Language design is still a very active area of innovation.

Re: Nim 1.6.2

#87
post #7

So did anyone decode the "It combines successful concepts from mature languages like Python, Ada and Modula." blurb yet?

I understood it fine. Have you searched around for what those languages are?

Re: Nim 1.6.2

#88

Nim is everything Python and Go should be/want to be, as far as language features and semantics go (haha). It has their easy-to-learn properties, but has a better type system, the generics system and macros are arguably more useful, and more usable than what is offered in either language. It deserves far more attention than it currently gets.

I like Nim, and probably will learn it at some point. But no, Nim is not everything "python should/want to be". The name case insensitivity and the implicit imports on the global namespaces are perfect examples of stuff that are better in Python.

IMO people really should stop comparing it to Python, it's a very different language.

Re: Nim 1.6.2

#89
post #59

Earlier quoted context omitted.

I suppose the makers of Nim named that flag for a reason - giving up memory safety by disabling bounds/overflow checks should be never be the default for networked software in a production setting, so benchmarking in that mode would paint an unrealistic picture. What you want are comparable compiler flags across languages, say "optimized for performance, yet retaining safety" and "go as fast as possible and disable a…

I'm sure Rust also has a way to disable bounds/overflow checks for speed. Do benchmarks utilise it?

Rust doesn’t have a compiler flag for this, instead it has separate functions that don’t do the checking. E.g. Vec has a .get_unchecked function.

Such functions can only be used in an unsafe block, and should only be used if bounds checking is handled elsewhere such that it would be impossible to cause an out of bounds error at runtime.

It’s also often possible to get rust to elide bounds checks by using iterators, which often don’t need them as they know the length up front.

Re: Nim 1.6.2

#90

Nim is everything Python and Go should be/want to be, as far as language features and semantics go (haha). It has their easy-to-learn properties, but has a better type system, the generics system and macros are arguably more useful, and more usable than what is offered in either language. It deserves far more attention than it currently gets.

I like Nim, and probably will learn it at some point. But no, Nim is not everything "python should/want to be". The name case insensitivity and the implicit imports on the global namespaces are perfect examples of stuff that are better in Python.

Implicit imports on the global namespaces? What do you mean?

Case insensitivity is somewhat complex topic in Nim, as there are some places where the case actually matters, plus there are some more rules for equivalence of identifiers (related to `_` IIRC). In any case, it was never a problem for me in practice; nimsuggest works quite well.

Post reply on HN