Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nim-lang fits 1, 2 and 3! And in a couple of years the ecosystem is up to level ;)



Nim doesn't have sum types and pattern matching, which are an essential part of an expressive type system. It also appears to have `nil` be a valid value for most types by default?


This comment is misleading &| misinformed.

Sum types are built-in [1] for formal parameters. `nil` is only for `ref|ptr` types. In much code you can just use stack allocated value types and there is neither GC concern nor nil concern, but there is also a mode to help: https://nim-lang.github.io/Nim/manual_experimental_strictnot...

Nim has an easy-ish to use Lisp-like syntax macro system where you just receive & process an AST. So, to do the rest you can make libraries adding the feature without relying upon upstream compiler: such as https://github.com/beef331/sumtypes for variables with sum types or pattern matching libs like https://andreaferretti.github.io/patty/ | https://github.com/alehander92/gara.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: