Re: ver 4 and ver 3.11 function name conflicts
- Posted by jeremy (admin) Sep 03, 2008
- 1017 views
bernie said...
You are using a the global function called get() in map.e and another function get() is used in get.e include file.
I thought you said that there would be no conflicts between 3.11 and 4.0 include files.
There are of course naming conflicts. 1/3 of the 4.0 library is the 3.1 library. So, abs, round, etc... all exist in the 3.1 includes as well as the 4.0 includes. Now, standard practice for many of the 4.0 libs is to use default namespaces, which are declared in the actual file being included. You can of course override them via the "as mynamespace" syntax. Here is an example on how to use map, regex and get.e together:
include std/map.e include std/regex.e include get.e as old_get map m = map:new() regex r = regex:new() ? old_get:get() ? map:get(m, "name")
Jeremy