An OOP programming language I am making by following Crafting Interpreters.

Overview

horba

An OOP programming language I am making by following Crafting Interpreters. https://craftinginterpreters.com/

I intend it to have a somewhat C-style syntax, as it is very terse and pretty flexible, without having types before declarations, instead having keywords. I also don't want semicolons, as they are visual noise.

I want the language to look something like this:

pub class Hello {
    let str
    let something
    new(something, ...) {
        // Autogenerate constructor function with ..., will do `self.thing = thing` automatically.
        self.something = Number.from(something)
        ...
        
    } // Default init, does self.string = string automatically, can override and put ... for autogeneration
    pub method print() {
        // Method keyword for methods, don't need to use `self.` and distinguished from functions.
        println(str)
    }
    
    trait fn nice() // Inheritors must define this, shared behaviour marker
}

class WhenThe inherits Hello {
    new(str, something, ...) {
        inherited Hello = new Hello(str, something) // I plan for this to be autogenerated too
        ...
    }
    
    fn nice() {
        println("Nice!")
    }
}

fn main() {
    let thing = new Hello("Hello, World", "3")
    thing.print()
    let array = new Array()
    let other_array = [1, 2, 3, 4]
    array.push(1)
}

I will eventually port it to bytecode (as the book goes), and try making a type system for it.

You might also like...
Lisp-style programming language

Bobbylisp A programming language, syntax are like mal and clojure. This project follow mal guides, Planning to add some more features after finishing

An interpreter for the esoteric programming language, Brainf*ck.

Brainf*ck Interpreter This is just a normal Brainf*ck interpreter written in Rust. If you don't know what Brainf*ck is, you can check out the wikipedi

Pua-lang - a dialect of The Monkey Programming Language

pua-lang PUA Programming Language written in Rust. What's pua-lang? pua-lang is a dialect of The Monkey Programming Language, intended to mirror the i

The Fluet programming language.

fluet Fluet is a scripting language. License Fluet is licensed under the Mozilla Public License, v. 2.0. Contributors may dual license their contribut

Ethereal - a general-purpose programming language that is designed to be fast and simple
Ethereal - a general-purpose programming language that is designed to be fast and simple

Ethereal is a general-purpose programming language that is designed to be fast and simple. Heavly inspired by Monkey and written in Rust

Dc improved: Feature-added rewrite of a 50+ year old RPN calculator/stack machine/programming language

dcim [WIP] dc improved: Feature-added rewrite of a 50+ year old RPN calculator/stack machine/programming language This readme is currently incomplete.

Squirt is a easy-to-use programming language.

Squirt is a easy-to-use programming language.

Osmon's compiler crate. Programming language made for starter & novice Uzbek audience.

Osmon Tili Osmon bu registrlarga asoslangan virtual mashinalik va yengil dasturlash tili Osmon boshqa o'zbek open source dasturchisi Sukhrob Khakimovn

A library for functional programming in Rust
A library for functional programming in Rust

It contains purely functional data structures to supplement the functional programming needs alongside with the Rust Standard Library.

Owner
Thomas
I'm a noob software developer focusing mainly on Rust, Python and C# as a hobby. I want to learn Elixir and Vlang in the future. I am a YT content creator.
Thomas
Tyrade: a pure functional language for type-level programming in Rust

A pure functional language for type-level programming in Rust

Will Crichton 286 Jan 1, 2023
Yet Another Programming Language

Yet Another Programming Language

null 4 Sep 15, 2021
luau bindings for the Rust programming language

?? luau-rs Luau bindings for the Rust programming language using bindgen ⚠️ Disclaimer This does not provide bindings for everything as luau does not

Vurv 18 Aug 3, 2022
Czech for the Rust programming language

rez Nejsi you tired from writing Rust programs in English? Do you like saying do prdele or pivo a lot? Would you like to try something different, in a

Radek Vít 13 Oct 9, 2022
The official home of the Nyson Programming Language, built off Rust.

Nyson Programming Language The official home of the Nyson Programming Language, built off Rust. (created by Nyelsonon and AMTitan, 2021) Advertisement

Nyson-Programing-Language 19 Aug 10, 2022
The programming language for scalable development

Pen programming language Pen is the programming language that makes software development scalable, focusing on software maintainability and portabilit

Pen programming language 390 Dec 30, 2022
A newborn programming language for extensible software

A newborn programming language for extensible software.

Alexey Shmalko 17 Nov 29, 2022
A simple programming language made for scripting inspired on rust and javascript.

FnXY Programming Language Quick move: CONTRIBUTING | LICENSE What? FnXY is a simple programming language made for scripting inspired on rust and javas

null 2 Nov 27, 2021
A multithreaded programming language!

hydracane A multithreaded programming language! Getting started Coming Soon! Features: Multithreaded Platform independent Folders: src/vm: The Virtual

Krishna Ramasimha 0 Dec 10, 2021
CARBON is an interface-centric programming language named after the concept of an allotropy.

CARBON programming language Status: just an idea CARBON is an interface-centric programming language named after the concept of an allotropy. It is an

Tim McNamara 4 Aug 18, 2022