Nim

Resultado de imagen para nim programming language



Nim (formerly named Nimrod) is an imperative, general-purpose, multi-paradigm, statically typed, systems, compiled programming language[7] designed and developed by Andreas Rumpf. It is designed to be "efficient, expressive, and elegant",[8] supporting metaprogramming, functional, message passing,[5] procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C and C++, and compiling to C, C++, Objective-C, and JavaScript

Description[edit]
Nim is statically typed.[9] It supports compile-time metaprogramming features such as syntactic macros and term rewriting macros.[10] Term rewriting macros enable library implementations of common data structures such as bignums and matrices to be implemented efficiently, as if they were builtin language facilities.[11] Iterators are supported and can be used as first class entities,[10] as can functions, allowing for the use of functional programming methods. Object-oriented programming is supported by inheritance and multiple dispatch. Functions can be generic and can also be overloaded, and generics are further enhanced by the support for type classes. Operator overloading is also supported.[10] Nim includes tunable automatic garbage collection based on deferred reference counting with cycle detection, which can be turned off altogether.[12] In 2014, Andrew Binstock (editor-in-chief of Dr. Dobb's Journal) said:

"Nimrod [former name] ... presents a most original design that straddles Pascal and Python and compiles to C code or JavaScript."[13]


Today, Nim compiles to C, C++, JavaScript, and Objective-C. The goal for Nim is to be as fast as C, as expressive as Python, and as extensive as Lisp.

History
Nim's initial development was started in 2006 by Andreas Rumpf and the project was made public in 2008. The first version of the Nim compiler was written in Pascal using the Free Pascal compiler.[15] In 2008, a version of the compiler written in Nim was released.[16] The compiler is free and open-source software and is being developed by a community of volunteers working with Andreas Rumpf.[17] The language was officially renamed from Nimrod to Nim with the release of version 0.10.2 in December 2014.[18]

Comentarios