Menu

#37 array indicies and member() and path()

design_question
open
nobody
wheat core (23)
5
2004-02-11
2004-01-25
No

Several functions, notably, NameSpace::path() and
ObjectPointer::member() don't handle path segments that
are array indicies.

If the path segment is a number, then these would be
array lookups.

Certainly NameSpace::path() should, and perhaps
ObjectPointer::member(const pt::string&) should.

Question: What should these do with badly formed
numbers, like "345q"? or negative numbers "-22" or
decimal points "4.2" or "4.0" or "4."?

Also, should we have ObjectPointer::path(const Path& p)?
This would be shorthand for:
NameSpace::path(*this, p)

Discussion

  • Mark Lentczner

    Mark Lentczner - 2004-02-11
    • milestone: 367886 --> 375469
     
  • Mark Lentczner

    Mark Lentczner - 2004-02-11
    • milestone: 375469 --> design_question
     
  • Mark Lentczner

    Mark Lentczner - 2004-02-11

    Logged In: YES
    user_id=219202

    there is now support in NameSpace::path() - which is all we need for
    now
    The other aspects of this issue are good questions to think about

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.