Re: New map routines
- Posted by Aku <akusaya at g?x.ne?> Apr 20, 2008
- 567 views
Jeremy Cowgar wrote: > I was looking at it, cool! Was the unit testing OK to work with? Also, 2 > suggestions, > please remember to update the relnotes.htx w/what you've added and your name. > We tend to bold keywords that will get peoples attention such as files > changed/added > (map.e) and functions changed/added. > > Also, I wonder if we should make the type name lower case instead of mixed as > to fit in with the other types, i.e. integer, atom, object not Integer Atom > or Object? Thanks! Yes, the unit testing is OK and quite simple to use. I have updated the relnotes just now. Some 0.01 cents... How about the object(x) proposal again that may return 0 for no value? It is very useful for hashmap routines.. Now the hash_get function is used like:
object value value = hash_get(map, key, -1) if value = -1 then -- not found else -- found end if
With the new object function we can have Now the hash_get function is used like:
object value value = hash_get(map, key) if not object(value) then -- not found else -- found end if