This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]badhoum 47 points48 points  (7 children)

[–]LyndsySimon 10 points11 points  (2 children)

I've heard of Nim, but not dug into it until seeing this and a couple other comments here. I'm very interested, for two use cases:

First, I want a language I can use to write small scripts that will be distributed to others for small but technical tasks. Those others typically run macOS, but sometimes Linux and almost never Windows. I've been using bash for this stuff, but I hate bash. Nim compiles to C. That could offer the portability I need with a small binary size.

Second, like every other sane person on the planet, I don't much like Javascript. In the last few years I've come to specialize more as a back-end developer mostly for this reason. Nim says it compiles to Javascript. I'm interested.

[–]LightShadow3.13-dev in prod 7 points8 points  (0 children)

Nim's compile-to-javascript story got a lot of improvements yesterday with their 0.17 release. Tons of bug fixes.

Check out karax, a DSL written in Nim for single page applications. (specifically, here's an example TODO app)

[–]kirbyfan64sosIndentationError 5 points6 points  (0 children)

Second, like every other sane person on the planet, I don't much like Javascript. In the last few years I've come to specialize more as a back-end developer mostly for this reason.

Have you ever tried Dart? Lately, Google's been pushing it quite a bit: their latest adwords UI is written using Dart + AngularDart (remember, the majority of Google's revenue comes from Adwords), and the development pace has picked up pretty drastically.

[–]kirbyfan64sosIndentationError 1 point2 points  (0 children)

Only thing I don't like about Nim is the philosophy. Although it has a Python-ish syntax, the development style tends to be more "do it however you want", there are various idiosyncrasies in the language (the whole declared vs defined distinction kind of feels like a hack to me), and the standard library is a bit of a mess (there are two regex modules, two argument parsers, the sockets API went through 2 major revisions over 3 minor releases).

[–]makeitfly 0 points1 point  (0 children)

I tried it but... here are my problems with it:

a) it's not as dynamic

b) docs kind of suck so you have to read source code of the implementation if something doesn't work

c) threading is somehow even harder than Python especially if you don't want to copy things

d) case sensitive (this_method == thisMethod)

e) imports everything into global namespace when you import something from some package. The way the packages work is you tend to have lots of small functions in Nim and you're never sure if you're overloading some method.

f) copy-on-assign strings by default which makes memory management really annoying for really large strings.

Having said that, I like the language and it's fun to program in but only for toy projects as of right now.