DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Anyone tried the Nim language yet?  (Read 10,700 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Anyone tried the Nim language yet?
« on: January 21, 2017, 06:01 PM »
There was an article on slashdot recently about the Nim language, and I have to admit I'm intrigued by the motivational guiding principles:

http://nim-lang.org/

"Nim is a statically typed, imperative programming language that tries to give the programmer ultimate power without compromises on runtime efficiency. This means it focuses on compile-time mechanisms in all their various forms.
Beneath a nice infix/indentation based syntax with a powerful (AST based, hygienic) macro system lies a semantic model that supports a soft realtime GC on thread local heaps. Asynchronous message passing is used between threads, so no "stop the world" mechanism is necessary. An unsafe shared memory heap is also provided for the increased efficiency that results from that model."

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: Anyone tried the Nim language yet?
« Reply #1 on: February 24, 2017, 08:29 PM »
I skimmed half of https://nim-lang.org/docs/tut1.html , and the basic syntax doesn't look bad... but indentation based syntax is enough to put me off, especially when I don't see something that strikes me as a killer feature.

A powerful macro system with the ability to modify the AST might be interesting, but... dunno. I'm just not "feeling it" :)
- carpe noctem

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: Anyone tried the Nim language yet?
« Reply #2 on: July 23, 2019, 01:14 PM »
Was testing someone's code recently and installed nim in the process.

In addition to the items advertised in the OP, it appears the resulting binaries appear to be on the small side, which seems nice.

On a side note, there appears to be ongoing work toward a functional REPL for it: https://github.com/nim-lang/Nim/issues/8927

https://slides.com/onqtam/nim_hot_code_reloading#/

Original address: https://www.donationcoder.com/forum/index.php?topic=43433.0