Last active
September 15, 2017 16:29
-
-
Save cabhishek/67e588e2190fb41a822fed0ba8206591 to your computer and use it in GitHub Desktop.
Nim: An Introduction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is Nim? | |
----------- | |
Nim is an incredibly fast systems and applications programming language that is expressive, extensible and fun to use. | |
Why Nim? | |
--------- | |
Expressive | |
- Clean syntax | |
- Universal function call syntax (UFCS) | |
- First class function + closures | |
- Intutive type system | |
- Operator overloading | |
- Rich standard library [batteries included] | |
Metaprogramming | |
- Generics | |
- Templates | |
- Macros | |
Efficient | |
- Compile time function evaluation (CTFE) | |
- Fast project compilation | |
- Speeds comparable to C/C++ | |
- Fine tune control over GC | |
- Compact binaries | |
- No runtime needed | |
Cross Platform | |
- Supports various backends C/C++/Object-C and Javascript | |
- FFI | |
Laundry list of features: | |
- Support for multi tasking | |
- Concurrency: async/await | |
- Parallelism: | |
- threads: GC safe, own isolated heap | |
- threadpool: faster and simpler | |
- Basic OOP | |
- Iterators | |
Links: | |
- https://nim-lang.org | |
- Nim in Action https://www.manning.com/books/nim-in-action | |
- Getting started: | |
- https://github.com/def-/nim-unsorted | |
- https://nim-by-example.github.io/ | |
- Sinatra like web framework https://github.com/dom96/jester | |
- Awesome blog posts https://hookrace.net/blog/ | |
Why not Nim? | |
------------ | |
- Latent compiler bugs | |
- Occasional breaking changes to the standard library | |
- Not v1.0 (yet) | |
Random thoughts | |
--------------- | |
- Python will overtake java as most the used language [its too big to fail now] | |
- Due to microservice architecture its easy to plug a new language in your ecosystem. No need for big rewrites | |
- If you need performance and distribution and dont want to leave the familarity of Python's expressive syntax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment