lupa

Lupa is my programming language. It tries to keep a syntax that’s comfortable to me, while having semantics that aren’t. It’s not trying to do anything revolutionary, it’s just yet another language that builds off of all the million others out there. And that’s where we shall begin.

Note: lupac, the reference implementaiton of Lupa, is not complete. Hell, I’m still working on parsing. This exists solely to give myself a better understanding of my own plans for the langugage. I plan on making lupac a compiler to native code using the LLVM project via the inkwell bindings for Rust.

inspiration

Lupa is inspired primarily by two other languages: Rust and OCaml. It’s syntax is derived from that of Rust and the semantics from a mix of the two. Lupa is mostly functional, but includes some aspects of imperative programming.

some features

I have not completely fleshed out the language yet, but I’ve started planning for some things, listed below. But first, here are some things to note:

  • Lupa is not pure: it does have side effects. The simplest depiction of this would be I/O.
  • Lupa is not completely immutable: struct fields can be marked as mutable for purposes of shared state.

Now, some of the aforementioned features:

  • Static typing and type safety: This means that a) type errors are caught at compile time, and b) safe language limits which kinds of operations can be performed on which kinds of data.
  • Type inference: You do not have to write type information down everywhere. This doesn’t sacrifice static typing for those values, it’s just that the compiler “writes” the type down for you.
  • Garbage collection: Automatic memory management allows you to pass the work of de/allocating memory to the compiler, which is often a source of bugs in languages with manual memory management, such as C.