jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

Recursion doesn't work easily #30

Closed jmeaster30 closed 11 months ago

jmeaster30 commented 1 year ago

When we go to typecheck the body of a function, we don't actually have the function name.....

jmeaster30 commented 1 year ago

We add the function variable to the scope but we don't have the actual type of the function variable until after the function body is typechecked....

Maybe this would be solved by doing all of the type checking for one scope before going into the children scope.

jmeaster30 commented 1 year ago

maybe we have a keyword like "self" or "this" for recursion.

This would make recursion more simple without having to mess with the scope processing order.

jmeaster30 commented 11 months ago

closing obsolete ocean issues