Live data from Hacker News

Pros and Cons of Nim

onlinetechinfo.com

1–10 of 86 posts

Re: Pros and Cons of Nim

#2
Oh!

I have another use-case; first-class (easier-than-others?) cross-compilation support.

I had to build a one-off tool that was a a glorified "curl wrapper" with validations, for Windows; on a Mac. Wrote a simple nim script, cross-compiled for Windows, and it's been fine and dandy for a year now :)

I'm sure other languages support this (golang?), but Google's SEO suggested nim-lang.org

Re: Pros and Cons of Nim

#4

Why use Nim over Go?

Some people prefer Nim because of small things like syntax. However Go is much more popular. I will do more research on this subject and see if I can list the differences in detail. However any such list could be soon made redundant when Go 2 comes out.

Re: Pros and Cons of Nim

#5

Oh! I have another use-case; first-class (easier-than-others?) cross-compilation support. I had to build a one-off tool that was a a glorified "curl wrapper" with validations, for Windows; on a Mac. Wrote a simple nim script, cross-compiled for Windows, and it's been fine and dandy for a year now :) I'm sure other languages support this (golang?), but Google's SEO suggested nim-lang.org

Thanks, I'll add that.

Re: Pros and Cons of Nim

#8

Why use Nim over Go?

Nim has actually decent type-system with support for algebraic data types and generics. Moreover, Nim is a much higher level language and doesn't sacrifice performance to do it.

In short, while Go has deliberately shunned all modern developments in PL design, Nim has embraced them. Also Nim has real macros, while Go does not.

It's clear to me that though immature, Nim is a much better and more expressive language than Go.

Re: Pros and Cons of Nim

#9

Oh! I have another use-case; first-class (easier-than-others?) cross-compilation support. I had to build a one-off tool that was a a glorified "curl wrapper" with validations, for Windows; on a Mac. Wrote a simple nim script, cross-compiled for Windows, and it's been fine and dandy for a year now :) I'm sure other languages support this (golang?), but Google's SEO suggested nim-lang.org

I agree with most of the OP's shortcomings. Cross compilation hasn't been a huge problem for me, pretty easy to pull off. But they've been looking into using zig as a cross compiler. Kind of confused as to the current status of the effort though . https://github.com/nim-lang/Nim/pull/13757

Carp also has open pull request for using zig as a cross compiler FWIW

Re: Pros and Cons of Nim

#10
post #4

Why use Nim over Go?

Some people prefer Nim because of small things like syntax. However Go is much more popular. I will do more research on this subject and see if I can list the differences in detail. However any such list could be soon made redundant when Go 2 comes out.

Most of your list would probably remain intact. The main issue is that Go has a traditional garbage collector, and Nim has ARC, ORC, nogc, gogc, deferred reference counting, and more options for memory management.
Post reply on HN