Re: . or : for namespace?

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

I don't think we ever came to a decision on to use : or . as a namespace
delimiter.

It seems that the major of those not in favor of it are not in favor because of
it's use in an OO world. However, in an OO world, it is used also as a namespace
delimiter. i.e. java.lang.String and myString.trim().

Another argument against it is that we already use : and thus would break code.
From the code I've seen, I've rarely seen : being used. If it is used, it's easy
to search/replace that character. On top of that, we can not all of a sudden
cease to support : but we can support them both for a time, marking : as
deprecated.

The next argument against it is that if we use . for a namespace delimiter, then
we cannot use it for a future structured sequence? that we cannot seem to agree
what it should look like. However, again, . is used in other languages as the
namespace delimiter, object delimiter and structure delimiter as well w/o
problem, I see no reason why we cannot do the same:

include greeter.e as greet

-- greeting is a named/structure sequence in the greet namespace
greet.greeting.name = "World" 
greet.greeting.message = "Hello"

-- call a function in the greet namespace
greet.greet()


I do not think this is confusing, and I believe most would also say it is not.
In fact, I think it's much easier to read than the alternative:

include greeter.e as greet

-- greeting is a named/structure sequence in the greet namespace
greet:greeting.name = "World" 
greet:greeting.message = "Hello"

-- call a function in the greet namespace
greet:greet()


I already have the code to make this work. It was a very simple change (added 12
characters, that's all). What do we have to do to make a decision on : or . ? One
way or the other?

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu