Facilis - A Low Level Functional Language
h
CSharpIsGud (639)

Facilis is a strongly typed functional language that aims to be low level. Facilis uses a hand-written recursive descent parser made with love.

Factorial Example

impure foreign putchar(c of u8) -> void
impure foreign tostr(num of void*) -> string

impure write(str of string, start of i32) -> void {
	putchar(str[start])

	if start != str.length() {
		write(str, start + 1)
	}
}

pure fact(i of i32) -> i32 {
	if i == 1 {
		return i
	}

	return i * fact(i - 1)
}

impure main() -> i32 {
    write(tostr(fact(6)), 0)
}

Demo: https://repl.it/@Facilislang/FacilisDemo#README.md
^ Has a user/password login program loaded by default. Read the README!

Source: https://repl.it/@Facilislang/Facilis
^ 2072 lines of C++!

@CSharpIsGud @Subarashi @xxpertHacker

You are viewing a single comment. View All
xxpertHacker (485)

@Jakman OOP isn't entirely independent of FP, they're not incompatible for any particular reason, it's just how OOP is normally used that affects it. Also, usually OOP is incredibly inefficient.

I was thinking about allowing 100% immutable structs to start with later, possibly developing into some twisted OOP, but who knows.

As of right now, I was preparing to focus on static arrays, destructuring, compile-time JavaScript-like syntax array spreading, and other array-related stuff, etc.