EUforum Messages
- Powered by Euphoria -
Post Reply Previous Next All Messages
Date: Wed Apr 30 11:15
From: Jeremy Cowgar <jeremy at cowgar?com>
Subject: Re: Namespace clobbering internals

Would it make sense that if a function/variable is called with no namespace
qualifier that exists as a built-in and user defined inside a namespace that
the built-in be used? That would seem like the logical answer.

The user knew there would be a conflict, thus, he/she included the file w/the
conflict with a namespace to prevent that conflict.

Now. If you include a file w/no namespace and now you have a built-in and user
defined function of the same name, no namespace qualifier and called it with
no namespace qualifier, then I would think the application should err out as
it does now.

Matt, what do you think?


include pgsql.e as db

db:close() --- we know it's calling pgsql.e's close function

f = open(...)
close(f)  --- no namespace given, use the built-in


... another example


include pgsql.e

close() 
--- hm, Euphoria cannot tell if they want built-in 
--- or pgsql.e's close(), therefore crash Euphoria with
--- the namespace qualifier error it currently uses


--
Jeremy Cowgar
http://jeremy.cowgar.com

 
Post Reply Previous Next All Messages