3 ms·
Check out Nim[0] - it's strongly typed, with good type inference, clean elegant syntax, memory management is automatic (optional gc, default is ARC + small foot
by archargelod 2y ago
Check out Nim[0] - it's strongly typed, with good type inference, clean elegant syntax, memory management is automatic (optional gc, default is ARC + small footprint cycle collector), compiles to small single binaries (Hello World is less than 100 kb), has powerful metaprogramming and lsp support.
Nim compiles to C/C++ and then to native code, so performance is on the same level as Rust/C/C++. You can also compile Nim to js/wasm and run the same code in the web.
[0] - https://nim-lang.org https://nim-lang.org
- pmarreck 2y agonim unfortunately took python's significant-indentation idea though
- cb321 2y agoFor what it's worth, Nim allows much more lexical flexibility than Python. You can very often use parens ()s and optional extra parens are not usually a problem either - the bracket is just not spelled {}. As another example, both code & documentation comments have "open-close" forms with #[ and ##[. Also, my hello world's are more like 16K on x64-Linux than 100K. There are also user-defined operators, lisp-like syntax macros but with static typing, etc., etc. Nim is Choice, but not everyone likes that.
- pmarreck 2y agoRoc, Nim and Idris are currently compelling to me. Roc and Idris mainly because I like pure functional languages along with some typing. But I like Nim a lot too. I am on the lookout for a language that I can replace some overly complex Bash scripts with for commandline use.
- cb321 2y agohttps://github.com/c-blake/cligen https://github.com/c-blake/cligen makes whipping up CLI utilities very easy in Nim with a pretty fancy CL-user experience (colorized, user-tunable --help, Zsh/bash completions, brief long options, spellcheck/autosuggest on typos, etc.). As examples, there are like 60+ such utilities over at https://github.com/c-blake/bu https://github.com/c-blake/bu . Unsure all that adds up to "critical mass" for you, but it seemed worth noting.
- pmarreck 2y agoThat is definitely worth noting!! I don’t suppose I could compile a binary that runs on both linux and macos (a la Cosmopolitan)?
- cb321 2y agoI do not have any personal experience with it, but I have heard several success stories for Actually Portable Executables & Nim and there is this to try to ease the path for cosmopolitan libc fans: https://github.com/foxoman/cosmonim/blob/master/README.md https://github.com/foxoman/cosmonim/blob/master/README.md
- mixmastamyk 2y agoOne of the best parts. Only it's getting worse with colon-itis.