Phetolelo e ncha ea puo ea lenaneo la Nim e lokollotsoe, eo Loetse ena e ketekileng selemo sa eona sa selemo se le seng. mofuta oa pele o tsitsitseng. Puo e tšoana le syntax ho Python, 'me e batla e tšoana le C ++ ts'ebetsong. Ho latela LBH Puo e alima haholo ho tloha (ka tatellano ea monehelo): Modula 3, Delphi, Ada, C++, Python, Lisp, Oberon.
E sebetsa hohle ka lebaka la bokhoni ba ho bokella C/C++/Objective-C/JS. E tšehetsa makhro, OOP, generics, tse fapaneng, hot code swap le tse ling tse ngata. License: MIT.
Liphetoho tse kholo ka ho fetisisa:
-
Ho na le pokello ea lithōle ea ORC e sebelisang algorithm e tsoang ho ARC, empa ka nako e ts'oanang e sebetsana le litšupiso tse chitja ka tsela e khethehileng. E nolofalitsoe ke khetho ea -gc:orc. Mabapi le liphapang tsa ARC/ORC ho na le sehlooho se seholo.
-
Ho kentsoe mokhoa oa litlhaloso tse thata tsa ts'ebetso, e leng se nolofalletsang tlhahlobo e eketsehileng bakeng sa ho fetoha ha ntho. E kentsoe tšebetsong ka pragma {.experimental: "strictFuncs".} kapa ka konopo ea --experimental:strictFuncs.
-
The from keyword hona joale e ka sebelisoa e le opareitara.
-
E kenyellelitsoe .noalias pragma. E etsa limmapa ho C restrict keyword ho eketsa ts'ebetso eo lentsoe la sehlooho le ka fanang ka lona.
-
Litemoso tse tobileng joale li ka fetoloa liphoso ka --warningAsError[X]:on|off.
-
Taelo e ncha: nim r main.nim [args...], e bokellang le ho tsamaisa main.nim, 'me e kenyelletsa --usenimcache e le hore sephetho se bolokoe ho $nimcache/main$exeExt, ho sebelisoa mohopolo o tšoanang le oa nim c - r ho tlosa ho tsoa ho recompilation ha mehloli e sa fetoha. Mohlala:
nim r compiler/nim.nim --help # e hlophisitsoe lekhetlo la pele
echo 'import os; echo getCurrentCompilerExe()' | nim r - # sena se sebetsa le sona
nim r compiler/nim.nim --fullhelp # ntle le ho bokella hape
nim r —nimcache:/tmp main # binary e bolokiloeng ho /tmp/main
-
E kentse tlhahiso e ncha -hint:msgOrigin, e tla bonts'a moo moqapi a hlahisitseng melaetsa ea phoso/temoso. Sena se thusa ha ho sa bonahale hore na molaetsa o tsoa kae.
-
E kentse folakha -backend:js|c|cpp|objc (kapa -b:js, joalo-joalo) ho fetola mokokotlo.
-
E kenyellelitsoe --usenimcache folakha ho hlahisa li-binary ho nimcache.
-
Linotlolo li tlositsoe: --oldNewlines, --laxStrings, --oldast, --oldgensym
-
Ts'ebeliso ea nimsuggest hona joale ha e bontše feela phatlalatso ea pele, empa hape le sebaka sa ts'ebetsong bakeng sa kopo ea def.
Ho feta moo, liphetoho tse ngata li kentsoe laebraring e tloaelehileng le litokiso tse ngata tsa liphoso.
Source: linux.org.ru