talira

Efficient, expressive, elegant

open sourceMITfree

Nim is a statically typed, compiled systems programming language that combines ideas from Python, Ada and Modula, with indentation-significant syntax. Its compiler turns Nim into C, C++ or JavaScript, so it builds small, dependency-free native executables for Windows, Linux, BSD and macOS and can also run in the browser. Memory management is deterministic, with destructors and move semantics: the default, ORC, is reference counting with a cycle collector and no tracing, which suits embedded and hard real-time systems. It has local type inference, tuples, generics and sum types, zero-overhead iterators, compile-time evaluation of functions, and a macro system that manipulates the AST; async/await in the standard library is built with those macros. It wraps C, C++ and Objective-C easily, and packages come from Nimble, its decentralised package manager. The compiler and standard library are written in Nim.

Libraries for Nim

Talira doesn't list any yet.

Problems it solves

  • a compiled language with Python-like syntax that produces small native binaries
  • a systems language with deterministic memory management for embedded or real-time work
  • share code between a native backend and a browser frontend
  • metaprogramming with macros to remove boilerplate
  • call existing C and C++ libraries without writing bindings by hand
  • ship a command-line tool as one dependency-free executable

Features

  • statically typed with local type inference, generics, tuples and sum types
  • compiles to C, C++ or JavaScript
  • small dependency-free native executables for Windows, Linux, BSD and macOS
  • deterministic memory management with destructors and move semantics (ORC by default)
  • AST macros, templates and compile-time function evaluation
  • zero-overhead iterators
  • async/await in the standard library
  • easy C, C++ and Objective-C wrapping
  • Nimble package manager

Alternatives

The same job

These do what Nim does.

  1. Rust A language empowering everyone to build reliable and efficient software.
  2. V Simple, fast, safe, compiled. For developing maintainable software
  3. Crystal A language for humans and computers
  4. Odin The Data-Oriented Language for People Who Ship Software
  5. Go Build simple, secure, scalable systems with Go
  6. Mojo The systems language for the AI era

Compare Nim with the top 3