Skip to content

Instantly share code, notes, and snippets.

@adamveld12
Last active August 29, 2015 14:21
Show Gist options
  • Save adamveld12/b05982004f6d1296073c to your computer and use it in GitHub Desktop.
Save adamveld12/b05982004f6d1296073c to your computer and use it in GitHub Desktop.
A language that I desperately want to use

#A Language (AL)

A Language is the holy grail language that I wish existed. The lists that follow contain a lot of features that I found to reduce conceptual load, typing, and had better ergonomics than other constructs in other languages.

Tooling out of the box

  • format - format your code in an idiomatic fashion
  • lint - lint your code in accordance to idiomatic rules
  • test - test runner/framework that works out of the box
  • coverage - code coverage reports for your tests
  • cross compilation should be so easy that you feel compelled to do it
  • repl

Runtime

  • NO garbage collection - use borrowing and what not to deal with heap objects
  • Green threads via actor model (or go routine like, with channels for safe communication, actors can be built on top of this)
  • Preemptive execution - should be able to pause a green thread anywhere in it's execution path to context switch
  • Context switching between green threads (and the green threads themselves) should be very cheap

##Features

  • First class concurrency (with green threads + channels)
  • C like syntax
  • Generators
  • Single assignment by default
  • Mutable assignment is opt in
  • Rust style memory management with borrowing
  • Distribute with a single .exe/ELF executable
  • Build in optimized mode, warnings are errors - always
  • Function guards ala erlang
  • Easy native function calling (NIFs)
  • Generics - without type erasure
  • Tuples & structs
  • Interfaces + ducktyping
  • List comprehensions
  • Linq style collection API in the standard library
  • Follow the Let it Crash™ philosophy - nix exception handling
  • Supervision trees and utilities - OTP style libraries built in
  • Type inference
  • Pattern matching
  • Destructuring assignment
  • Null coallescing operator
  • no ternary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment