Nim Programming Language
nim-lang.org
external-link
The Nim programming language is a concise, fast programming language that compiles to C, C++ and JavaScript.

Anyone have experience using Nim? The TLDR that I am seeing is compiled portable python/js replacement in a way.

I was thinking about trying to write a webserver with it and was wondering if anyone had any previous experience with it.

janAkali
link
fedilink
English
12
edit-2
1Y

Nim is cool. Easy to read python-like syntax, strongly typed, compiles (not transpiles) to C, so you can use common C tools like valgrind, gdb, musl, etc.
Small footprint, devel version supports deterministic gc (arc/orc).
One of the greatest interops with C, C++ or JS (C and JS are not mixable, obviously)

I’ve only used Nim in hobby/toy projects, but it was very pleasant experience.

thingsiplay
link
fedilink
21Y

@janAkali I wonder how it compares to compiling Python code with https://github.com/Nuitka/Nuitka , which is a real compiler using C and not just a bundler. To me, from programming language perspective Nim looks like an improvement for the developer. Here is a nice overview: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers , but this does not take Nuitka into account.

janAkali
link
fedilink
51Y

First time hearing about Nuitka and it sounds promising for Python devs. But from a quick glance it is merely an AOT compiled Python.
For me, Nim has big advantage over Python: types that are statically checked at compile time.
Types make you reason about your code more. Good LSP uses types to suggest you code without any AI and shows you errors before you have to run your script/programm.

Create a post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog