Skip to content

Lucretia/orenda

Repository files navigation

Orenda: An experimental programming language

Orenda: noun

  1. a supernatural force believed by the Iroquois Indians to be present, in varying degrees, in all objects or persons, and to be the spiritual force by which human accomplishment is attained or accounted for.

-- Dictionary.com

This is my attempt at creating a new programming language a bit at a time by experimenting with various ideas.

N.B: Nothing in this language is set in stone right now, it is likely to change.

This documentation will evolve over time until I get to a point whereby a new implementation, and therefore github project, will be started. Expect this documentation to be a bit rambly in places and maybe not even completely thought out.

Background

Having used Ada a fair bit over the last 15 years, I've come to the conclusion that it's time to move to another language, but I want something like Ada, but smaller. There just isn't anything out there like this because every language "designer" out there just wants to remake C, but as Ginger Bill stated, "C is broken."

I have talked with other Ada users before about an Ada like language that takes the type system from Ada and adds it to a more Oberon like language. It's a subject which keeps coming up time and time again, so I have decided to give it a try; every programmer has at least one language they want to write, right?

After finally watching Guy Steele's Growing a language, I realise that whilst the core language should be small, it should provide enough capability to extend the language itself.

Key aspirations for the language

  • Simple.
  • Small.
  • Composable.
  • Make programming life easier.

Documentation

These are my notes / ramblings:

  1. What I want
  2. Oberon
  3. Lexical elements
  4. Type system
  5. Functions
  6. Modules
  7. Parallelism and concurrency
  8. REPL
  9. Target Specifics
  10. Lexer Grammar
  11. Parser Grammar

TODO

  • Give this thing a name.
  • Create an AST.
  • Add basic semantic analysis.
  • Convert to LLVM IR.

Languages to learn

Learn some more programming languages to see what ideas are out there and to also see how they work in that particular language. The following list shows a good selection, but in no way should they all be learnt, only where something of importance can be learned.

  • Modula-2 (Imperative, structured, modular, data and procedure hiding, concurrent)
  • Modula-3 (Imperative, structured, procedural, modular, concurrent)
  • Oberon (Imperative, structured, modular, object-oriented)
  • Lisp (Multi-paradigm: functional, procedural, reflective, meta)
  • Scheme (Multi-paradigm: functional, imperative, meta)
  • S/ML (Multi-paradigm: functional, imperative, modular)
  • OCaml (Multi-paradigm: functional, imperative, modular, object-oriented)
  • Go (Multi-paradigm: concurrent, functional, imperative, object-oriented)
  • Rust (Multi-paradigm: concurrent, functional, generic, imperative, structured)
  • F# (Multi-paradigm: functional, imperative, object-oriented, metaprogramming, reflective, concurrent)
  • Odin (Imperative)
  • Dart (Multi-paradigm: functional, imperative, object-oriented, reflective)
  • Swift (Multi-paradigm: protocol-oriented, object-oriented, functional, imperative, block structured, declarative)
  • Kotlin (Multi-paradigm: object-oriented, functional, imperative, block structured, declarative, generic, reflective, concurrent)
  • Elm (Functional)
  • Scala (Multi-paradigm: concurrent, functional, imperative, object-oriented)
  • ParaSail (Compiled, concurrent, imperative, structured, object-oriented)
  • Idris (Functional)
  • D (Multi-paradigm: functional, imperative, object-oriented)
  • Nim (Multi-paradigm: compiled, concurrent, Procedural, Imperative, Functional, Object-oriented)
  • Julia (Multi-paradigm: multiple dispatch (primary paradigm), procedural, functional, meta, multistaged)
  • Haskell (Purely functional)
  • Prolog (Logic)
  • Mercury (Logic, functional, object-oriented)
  • FORTH (Procedural, stack-oriented, reflective, concatenative)
  • Smalltalk (Object-Oriented)
  • Elixir (Multi-paradigm: functional, concurrent, distributed, process-oriented)
  • Bondi (Functional, imperative, query-based and object-oriented)
  • APL (Array, functional, structured, modular)
  • BQN (Array, functional)
  • J (Array)
  • Joy (Multi-paradigm: functional, concatenative, stack-oriented)
  • Zig (Multi-paradigm: imperative, concurrent, procedural, functional)
  • Rebol (Language oriented programming, data exchange, functional, prototype-based, imperative)
    • Red (imperative, functional, symbolic)
  • Io (Object-oriented prototype-based)
  • One set of languages only exist on an emulator, UAE, these are:
    • AMOS (Imperative, Procedural)
    • AmigaE (Structured, modular, Imperative, Object-Oriented, List Processing)

Building

$ cmake -DANTLR_EXECUTABLE=<location of your ANTLR4 jar>

Requirements

  • A C++14 compiler.
  • ANTLR4 (4.9-complete.jar)

Tested with

  • Clang 10
  • GCC 9.3.0
  • GCC 10.2.0

v0.0.130

Contributions

I'm not accepting any PR's but I am happy to take advice, ideas or suggestions.

Copyright

Copyright (C) 2020-2021 by Luke A. Guest

Licence

MPL 2.0

About

An experiment in language design and compiler building.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published