Re:Nim Programming Language 0.14.0 released
by michaelcampbell on Wednesday June 08, 2016 @11:31AM
(#11862888)
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.
[ Parent
| on HN ]
Re:Nim Programming Language 0.14.0 released
by Symmetry on Wednesday June 08, 2016 @11:56AM
(#11863102)
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.
Re:Nim Programming Language 0.14.0 released
by michaelcampbell on Wednesday June 08, 2016 @04:13PM
(#11865277)
> 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.
For example, You can drop into c types using e.g. cstring and cint. Turn off or direct the gc. Manage memory for individual vars using the {.untracked.} pragma, c_malloc and c_free; easy integration of c libraries for obvious reasons; get pointers to things if you need them with ptr.
Have a look at some of these in the manual. Gc stuff is in the standard library somewhere.
This is an example I used recently: http://forum.nim-lang.org/t/567
Don't think it counts as low level but templates and macros are also pretty powerful if you need them. http://hookrace.net/blog/introduction-to-metaprogramming-in-...
I was drawn to it because it is high level, expressive and safe, but you can turn all this off when you need to and keep those bits contained. I'm using it with opencl.
Can't really comment on rust and have limited exposure to go.