talira

A language for humans and computers

open sourceApache-2.0free

Crystal is a general-purpose, object-oriented programming language with syntax inspired by Ruby that compiles to native code with static type checking. An inference algorithm resolves most types, so code reads like a dynamic language while the compiler catches type errors and nil references early, and flow typing narrows types through conditions. It has a batteries-included standard library (HTTP, JSON and more), fiber-based concurrency with channels, a macro system for metaprogramming, bindings that call C libraries without runtime overhead, and Shards for dependencies fetched straight from their repositories. It's Apache-2.0 licensed and funded by sponsors led by 84codes and Manas.Tech.

Libraries for Crystal

Talira doesn't list any yet.

Problems it solves

  • a compiled language with Ruby-like syntax that's much faster than Ruby
  • rewrite a slow Ruby service in something faster without learning a very different syntax
  • a statically typed language that catches nil errors at compile time without lots of type annotations
  • build a fast native web server or CLI with a single binary
  • call existing C libraries from a high-level language without writing wrappers in C
  • write concurrent code with lightweight fibers and channels

Features

  • Ruby-inspired syntax, compiled to native code
  • static type checking with type inference
  • flow typing and compile-time nil checks
  • batteries-included standard library
  • fibers and channels for concurrency
  • macros for metaprogramming
  • C bindings with no runtime overhead
  • Shards: decentralised dependency manager
  • packages for Linux, macOS, Windows, FreeBSD, OpenBSD and Docker

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Crystal does.

  1. Nim Efficient, expressive, elegant
  2. Go Build simple, secure, scalable systems with Go
  3. Ruby A Programmer's Best Friend
  4. Zig A general-purpose programming language and toolchain for maintaining robust, optimal and reusable software
  5. Swift A general-purpose programming language that's approachable for newcomers and powerful for experts
  6. Kotlin Concise. Multiplatform. Fun.

Compare Crystal with the top 3