Nim (programming language): Difference between revisions

Content deleted Content added
m top: tidy
automatic garbage collection
Line 32:
== Description ==
 
Nim is a statically typed programming language with a simple syntax.<ref name="Nim Syntax">{{cite web|url=https://akehrer.github.io/nim/2015/01/05/getting-started-with-nim.html|title=Nim Syntax|work=akehrer|accessdate=2015-03-27}}</ref> Nim supports compile-time metaprogramming features such as syntactic macros and term rewriting macros.<ref name="Nim macros">{{cite web|url=https://en.wikipedia.org/wiki/Macro_(computer_science)#Syntactic_macros|title=Syntactic Macros|work=Wikipedia|accessdate=2015-03-27}}</ref><ref name="manual">{{cite web|url=http://nim-lang.org/manual.html|title=Nim Manual|work=Official website|accessdate=2014-07-20}}</ref> Term rewriting macros enable library implementations of common data structures such as bignums and matrixes to be implemented with an efficiency as if they would have been builtin language facilities. Iterators are supported and can be used as first class entities<ref name="manual"/> in the language as can functions, these features allow for [[functional programming]] to be used. Object oriented programming is supported by inheritance and [[multiple dispatch]]. Functions can be generic and can also be overloaded, generics are further enhanced by the support for type classes. Operator overloading is also supported.<ref name="manual"/> Nim includes [[Garbage collection (computer science)|automatic garbage collection]] based on [[reference counting]].
 
== Examples ==