Re: . or : for namespace?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mike wrote:
> 
> 
> Hey Jeremy,
> 
> Jeremy Cowgar wrote:
> 
> -- snip
> 
> > Previous arguments were summarized in my post:
> > 
> > <a
> > href="http://www.openeuphoria.org/EUforum/m20221.html">http://www.openeuphoria.org/EUforum/m20221.html</a>
> > 
> > Now, following up with that there was another, new complaint, against the .
> > idea and that was by Mike and Matt agreed. I somewhat agree but would still
> > be in favor of the . but, this is just something we need to work through
> > until
> > a final decision has been made.
> > 
> > Their comment was that when the see a : in code that they wrote 6 months or
> > 2 years ago that they will know it's a namespace and therefore the function
> > is in another location. That they will be able to tell that right away.
> > However,
> > maybe in 2 years we will have dot'ed sequence access (whatever that will
> > look
> > like) and then you will not know without research if greeter.greeting =
> > "Hello"
> > is assigning a variable name greeting inside of the greeter namespace or if
> > greeter is possibly a sequence.
> > 
> > So, please read my prior post about the complaints against . and then the
> > above
> > and let's have another round of discussion please. If you are in favor or
> > against
> > it, please post your comments.
> > 
> > Let me also point out that we are focusing a lot on the negatives and people
> > who bring about points that are negative. There are many who want the . and
> > think it's much clearer. Now, in the end we are all working together to make
> > Euphoria better for us all. That's the goal, let's keep that in mind.
> 
> That's true.
> 
> I personally think that . is clearer, that is, until dot notation becomes
> available
> for sequence access (or even, *structure* access, yeah..) and then we
> introduce
> ambiguities. Forget 2 years, or even 6 months, problems with one's own code
> will surface
> in mere weeks.
> 
> Now, here is an example of how silly it can get:
> 
> include file.x as b
> sequence a
> ..
> 
> a.b.c
> 
> What does this mean? it really means <drum roll>  a . b:c
> 
>   !GASP!
> 
> If the dot is used for namespaces, sequence access, also using dots, will be
> fraught
> with such perils.
> 
> If there is to be *any* hope of using dot notation generally, I would really
> love to
> see someone try and explain away the above example.
> 
> I am sure there will be people who would prefer to use . as namespace but they
> would also
> like to use . for sequence access. Insisting on the former will jeopardize the
> latter.
> 
> or am I mistaken about this?
> 
> 
> regards,
> Mike

I'm not getting your point.

A namespace delineates a chunk of code (currently, that must be an entire file
(sigh)) in which some identifiers are.
In structured access for sequence, the structure type delineates a chunk of code
(the field list declaration) in which some identifiers are.

Why does the difference matter?

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu