r/ProgrammingLanguages • • 19h ago

EasyC, C made easy

I'm working on EasyC, a mostly statically typed, garbage-collected, interpreted programming language with familiar C-style syntax. The idea is to retain the things people like about C while removing some of its biggest pain points: no manual memory management, no pointer arithmetic, garbage collection, bounds-checked slices, static typing by default, checked conversions instead of undefined behavior. Another major goal is making it embeddable in applications through a C-friendly API, somewhat like Lua.

struct Point {
    float x;
    float y;
}

fn float Point::length(const self) {
    return std::sqrt(self.x * self.x + self.y * self.y);
}

fn int main() {
    let Point p = Point{ .x = 3.0, .y = 4.0 };
    std::print(convert!(string, p.length()));
    return 0;
}

It's still in early development, and the interpreter isn't functional yet. I'm currently interested in getting feedback on the language syntax. I'd love to hear what you think, especially from people experienced with language design and compiler development.

0 Upvotes

Duplicates