Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Built-in function names should be excluded from item names #73

Open
kosiakk opened this issue Dec 12, 2013 · 0 comments
Open

Built-in function names should be excluded from item names #73

kosiakk opened this issue Dec 12, 2013 · 0 comments

Comments

@kosiakk
Copy link
Contributor

kosiakk commented Dec 12, 2013

It is possible to define a functor, which shares the name with built-in function. But the built-in function always takes precedence:

:-backchain whatever/1 .
:-backchain abs/1 .
whatever(X) = "hello".
abs(X)      = "hello".  // I'd expect a compiler error here
test1 = whatever(-4).
test2 = abs(-4) .

Changes
=======
test1 = "hello".
test2 = 4.

Since the list of built-in function differs between backends, I'd make it a compiler error to define an item which clashes with built-in function. Regardless of arity, to be on the safe side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant