Content deleted Content added
Nim version 2.0.8 released |
Jerryobject (talk | contribs) Cut obsolete parameter. WP:LINKs: update-standardizes, add. Small WP:COPYEDITs WP:EoS: WP:TERSE, clarify. |
||
Line 12:
| paradigms = [[Multi-paradigm programming language|Multi-paradigm]]: [[Compiled language|compiled]], [[Concurrent programming|concurrent]], [[Procedural programming|procedural]], [[Imperative programming|imperative]], [[Functional programming|functional]], [[Object-oriented programming|object-oriented]], [[Metaprogramming|meta]]
| designer = Andreas Rumpf<!-- Do not WP:LINK to late German classical archaeologist. -->
| developer = Nim Lang Team<ref>{{cite web |url
| released = {{Start date and age|2008}}
| latest release version = {{wikidata|property|reference|edit|P348}}
Line 18:
| typing = [[Static typing|Static]],<ref name="nimbyex">{{cite web |url=https://nim-by-example.github.io/ |title=Nim by example |website=[[GitHub]] |access-date=2014-07-20}}</ref> [[Strong and weak typing|strong]],<ref name="nimrodbg">{{cite conference |url=https://ibob.github.io/slides/nimrodbg/#/ |language=bg |title=Метапрограмиране с Nimrod |last1=Караджов |first1=Захари |last2=Станимиров |first2=Борислав |year=2014 |conference=VarnaConf |conference-url=http://varnaconf.com/ |access-date=2014-07-27}}</ref> [[Type inference|inferred]], [[Structural type system|structural]]
| scope = [[Scope (computer science)|Lexical]]
| programming language = [[Pascal (programming language)|Pascal]] (2005–2008)<br/>Nim (2008–present, self-hosted)
| dialects =
| influenced by = [[Ada (programming language)|Ada]], [[Modula-3]], [[Lisp (programming language)|Lisp]], [[C++]], [[Object Pascal]], [[Python (programming language)|Python]], [[Oberon (programming language)|Oberon]], [[Rust (programming language)|Rust]], [[ParaSail (programming language)|ParaSail]]<ref name = "parasail">{{cite web |url=
| platform = [[IA-32]], [[x86-64]], [[ARM architecture|ARM]], [[Aarch64]], [[RISC-V]], [[PowerPC]] ...<ref>{{Cite web |url
| operating system = [[Cross-platform software|Cross-platform]]<ref>{{Cite web |url=https://nim-lang.org/install.html |title=Install Nim |access-date=2018-10-12}}</ref>
| license = {{wikidata|property|reference|edit|P275}}
| website = {{URL|nim-lang.org}}
| file ext = .nim, .nims, .nimble
}}
'''Nim''' is a [[General-purpose programming language|general-purpose]], [[multi-paradigm programming language|multi-paradigm]], [[statically typed]], [[
== Description ==
Line 422 ⟶ 421:
=== Functional programming ===
[[Functional programming]] is supported in Nim through [[first-class function]]s and code without [[Side effect (computer science)|side effects]] via the <code>noSideEffect</code> pragma or the <code>func</code> keyword.<ref>{{Cite web|title=Nim Manual|url=https://nim-lang.org/docs/manual.html#procedures-func|access-date=2021-07-10|website=nim-lang.org}}</ref> Nim will perform [[Side effect (computer science)|side effect]] analysis and raise
Contrary to purely [[functional programming]] languages, Nim is a [[Programming paradigm#Support for multiple paradigms|multi-paradigm]] programming language, so [[functional programming]] restrictions are opt-in on a function-by-function basis.
Line 656 ⟶ 655:
In this code the <code>printf</code> function is imported into Nim and then used.
Basic example using 'console.log' directly for the [[JavaScript]]
<syntaxhighlight lang="nim">
|