
Nim Programming Language 0.14.0 released - dom96
http://nim-lang.org/news/2016_06_07_version_0_14_0_released.html?hn=1
======
girvo
Very excited for v1.0 -- the solidification of "Concepts" will be quite
exciting. The bug fixes and new features in v0.14 are super welcome,
definitely looking forward to leveraging the generic type classes fixes: My
Either[T] implementation should now work! Exciting stuff.

We've got two internal tools that are written entirely in Nim, and it's been
brilliant pretty much all the way through. The rough edges of previous
versions are steadily sanded away, and our code becomes more expressive with
each version. The biggest thing I'm looking forward to (once v1.0 rolls round)
is having the "not nil" specifier be the default for all types. That's going
to bring it in line with the other static typing checker we use regularly
(Flow) which will be a boon to those of us (mainly me) that live in both
worlds most days heh.

~~~
christophilus
Curious, if you don't mind... where do you work that you get to use Nim?

~~~
girvo
Studio None, in Brisbane Australia :)

------
sdegutis
There are several languages similar to Nim these days, and they're all very
exciting. For example, Nim, Rust, D, Go, and probably others I'm forgetting.
Does anyone know of some chart that compares them based on their features and
priorities? Maybe something in the spirit of
[https://mobile.twitter.com/nixcraft/status/73938379662612889...](https://mobile.twitter.com/nixcraft/status/739383796626128896)
but with more areas of comparison and less trying to be funny?

~~~
Symmetry
I'll try to give it a go for Rust, Nim, and Go.

Rust: Wants to replace C++ as an expressive systems programming language.
Syntax derived from C++. Emphasis on const correctness. Makes use of some
functional programming concepts. Extensive metaprogramming. No garbage
collection by default. Interface based polymorphism. The type system tracks
memory ownership helping to prevent some classes of error at the cost of more
cognitive overhead. The standard library is also written in a way that makes
it hard to break things. The only one of the three that can easily be used to
write libraries that can be called from other programming languages. Medium
complexity to learn.

Nim: Slightly higher level than Rust. Reference counting garbage collection
which can be turned off, but heaps are by default local to threads. Syntax
derived from python. Emphasis on const correctness. Extensive compile time
evaluation facilities. Object oriented polymorphism (for now). Sadly allows
null by default for now. Extensive metaprogramming. Medium complexity to
learn.

Go: Hightest level of the three. Traditional garbage collector. Interface
based polymorphism. Simple and easy to pick up.

All three have good stories about multithreading. All three do their best to
fix warts in C++ in things like declaration mirrors use syntax. All three
start with the chainsaw turned off so you won't cut off your foot unless
you're doing something genuinely dangerous like writing an OS or compiler.

For me, I'd use Rust for writing security critical or OS level things like
kernels, system libraries, important utilities, and web browsers. Nim for
small team applications where you can afford to be a bit clever and Go for
large team projects where cleverness has to be discouraged.

I'm not a huge expert in any of these so there's probably important things I'm
overlooking.

~~~
michaelcampbell
Nim feels higher level to me than Go; can you educate me on how you drew the
opposite conclusion? Maybe I'm looking at something wrong.

~~~
Symmetry
Just because the garbage collector is optional and the slightly higher
emphasis on performance. Also the way it compiles to C. I have using Nim to
program a microcontroller on my todo list but I'm not sure how I'd go about
doing that in Go. It's weird though because Nim is certainly more expressive
than Go is and usually that goes with being higher level.

~~~
michaelcampbell
> Nim is certainly more expressive than Go is and usually that goes with being
> higher level.

Yes, I think this is what's driving my gut feel. Go feels quite ... hammer-y.
Explicit iterators, very few "niceties", etc.

------
hetman
I'm using Rust at work because it proved a bit more well suited for our
purposes than Nim. However, it's still exciting to see steady progress on Nim;
it has some really great and innovative language ideas and I hope its
increasing polarity will see those features come to other languages too.

------
wiz21c
[https://github.com/nim-lang/Nim/issues/936](https://github.com/nim-
lang/Nim/issues/936)

still open :-(

~~~
dom96
It's marked High Priority so hopefully won't be much longer before it's fixed.

~~~
vanderZwan
Last post in that discussion is from Februari 2015 so it looks like progress
has stalled.

------
Keyframe
I still don't understand how can you (efficiently) debug something like this
that compiles to another language?

~~~
dom96
Pretty much the same way you can any other language. GDB/LLDB works fairly
well with Nim, but personally I just use a couple `echo` statements when I
need to debug anything.

~~~
michaelcampbell
`printf` debugging is still often the easiest way to go.

~~~
PeCaN
GDB looks intimidating, but once I decided to try it I'd never go back to
printf debugging.

~~~
michaelcampbell
Oh yes, I've used it for many years (though many years ago). For me it depends
on the size of the program and the compile time; if it's a short one and
compiles quickly, I'll throw a print/puts/print/echo in there just to see
what's going on.

------
jadbox
If someone had an AWS API wrapper, I'd start using it the language more. I'd
be willing to help if someone takes point creating one.

------
tmd83
I was just skimming the post and found the redefining of 'using' very
surprising. The old 'using' was for callsite reusability and the new one is
for declaration. Optimizing for declaration site (which would be so few
comparatively) doesn't make sense to me and also for declaration I want full
type name and such.

Am I missing something here?

~~~
peferron
I've never used Nim in my life, but I recall reading that `this` takes the
place of the old `using`. So the old `using` is not gone—just renamed.

