Facilis - A Low Level Functional Language
CSharpIsGud (901)

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 {

	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
fuzzyastrocat (1504)

@Jakman That works nicely in theory, but it's absolutely terrible for low-level efficiency. Consider: every time you need to lose_tire, you're allocating a new Car object. And garbage-collecting becomes a must, since calling lose_tire multiple times quickly leaks memory.
So, I'm not saying it's impossible or a bad idea — you could write an efficient compiler to overwrite the old car with the new car, but now you're basically just modifying the original car while wasting time overwriting the non-changed fields.

TL;DR: In theory, that works nicely. In practice, to make it efficient it becomes the same as just modifying the original object.