tl icon indicating copy to clipboard operation
tl copied to clipboard

Support functions being named the same as types

Open farism opened this issue 5 months ago • 1 comments

Should this be possible in Teal? It is in TypeScript.

type foo = number

function foo()
end

farism avatar Sep 26 '25 05:09 farism

@farism Currently types and values live in the same namespace. One reason for that is because records are often used both as a type and as a value. One could, of course, change the language so that tha record declaration declares both a type and a value (if they had separate namespaces). But having a single namespace felt more "minimal" at first.

hishamhm avatar Sep 29 '25 13:09 hishamhm