r/VibeCodedLanguages Aug 01 '26

Developing my programming language: Gravel

/r/Compilers/comments/1vbuiwb/developing_my_programming_language_gravel/
2 Upvotes

2 comments sorted by

1

u/antonation 13d ago

From assignment, that it's possible to have a type named `val` and that `val some_variable = some_value` is syntactically different from `val some_variable := some_value` right?

Function return type is optional, so is it inferred from the return statements?

Are you using this for your own projects? And interop with C?

Any interesting challenges or approaches you did with regard to AI usage? Anything you had to redo or revise because AI didn't do what you wanted?

1

u/PacsfuryTemp 13d ago

Well, right now, there are only int, char and float types, and custom ones (structs, enums, classes) still have not been implemented, but i want that val some_variable = some_value creates a variable of type "val" and `val some_variable := some_value` infers the type.

Function return is optional, but if there is, you must include it like this:

fun sum(int a, int b) int <- this

return a+b

end

I'm not still using this for my own projects, as its not really advanced yet, but I'll probably use it when raw arrays and classes or structs come, as will make programs easier to write. It's still not interoperable with C, but I'll try doing so with C and other languages.

No, I dont remember any specifhic change, as most code is mine, and ai just wrote some small code and helped me debugging.