patty
nimtraits
Our great sponsors
patty | nimtraits | |
---|---|---|
3 | 2 | |
263 | 14 | |
- | - | |
2.1 | 5.9 | |
about 1 year ago | over 2 years ago | |
Nim | Nim | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
patty
-
Removing Garbage Collection from the Rust Language (2013)
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.
- What would be your “perfect” programming language?
-
Patten Matching in Nim
...except that macros don't change the syntax of the language! They just offer convenience on top of it, most common example is the `=>` lambda operator from the `sugar` module. I do agree, that the pattern matching macro presented in the article is a bit hard to get used to, but you don't have to, if you don't like pattern matching. And of course there are plenty of alternatives available as well, the simplest one imo is https://github.com/andreaferretti/patty
nimtraits
- What would be your “perfect” programming language?
-
Nim Community Survey 2021 Results
Thanks for your reply.
It's interesting to know what the perceived weaknesses are. Nim does have pattern matching but it's rarely used, whereas it seems to be used a lot in Rust (probably because of the prominence of enums). Nim has static lifetime management, but it's mainly used for eliding and thread safety (for now). Traits are an interesting feature, and make a good example of why I'm so bullish on Nim: someone has already replicated them with a macro: https://github.com/haxscramper/nimtraits
The popularity critical mass thing is mainly getting eyes on the language, but I think Nim has a slight advantage in that it's incredibly cooperative with its compile targets and FFI. Like Python, it's great for good glue code and 'scripting' without the performance penalty, and I hope that helps it meld into people's toolboxes over time.
What are some alternatives?
nimble - Package manager for the Nim programming language.
awesome-nim - A curated list of awesome Nim frameworks, libraries, software and resources.
Kind2 - A next-gen functional language [Moved to: https://github.com/Kindelia/Kind]
samsara - a reference-counting cycle collection library in rust
union - Anonymous unions in Nim
nitter - Alternative Twitter front-end
nimlings - Learn the Nim programming language by fixing tiny broken programs.
sumtypes - Easy to use Nim sum type library
hebigo - 蛇語(HEH-bee-go): An indentation-based skin for Hissp.
macro-lisp - Lisp-like DSL for Rust language