I've been researching programming languages to find a good, high level language that compiles to a single binary that is preferably pretty small. After tons of research, I landed on Nim and used it to make a quick txt parser for a project I'm doing.

Nim seems absolutely fantastic. Despite being sold as a systems programming language, it feels like Python without any of its drawbacks (it's fast, statically typed, etc.) - and the text parser I made is only a 50kb binary!

Has anyone here tried Nim? What's your experience with it? Are there any hidden downsides aside from being kinda unpopular?


Bonus: I want to give a shoutout to how easy it is to open a text file and parse it line-by-line in this language. Look at how simple and elegant this syntax is:

import os

if paramCount() == 0:
  quit("No file given as argument", 1)

let filepath = paramStr(1)

if not fileExists(filepath):
  quit("File not found: " & filepath, 1)

for line in lines(filepath):
  echo line
you are viewing a single comment's thread
view the rest of the comments
[+] -8 points 1 year ago (5 children)

I'm not speaking for everyone. Just everyone with taste.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 1 year ago (3 children)

    More like everyone whose text editor is apparently Notepad...

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 1 year ago* (2 children)

    The best argument I've heard for whitespace blocking is "it's not that bad when you get your text editor configured". That's an excuse, not a reason.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 year ago*

    Idk know what editor you're using, but it worked perfectly fine out of the box with IntelliJ. Nothing compared to the hassle of setting up a proper Eslint setup for typescript, honestly.

    And I'm not trying to defend python here, I don't touch that language except under duress, and I do prefer C-style code blocks as well. But this is kind of a pointless argument.

  • source
  • parent