[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: "namespaces" ?
- From: Nick Trout <Nick.Trout@...>
- Date: Fri, 19 Apr 2002 13:47:14 +0100
> PS: I would suggest longer names for the namespaces. I.e.
> 'File' instead of 'io', 'String' instead of 'str' etc.
I think I agree with ET here. Above all else the core libraries should be
simple and unambiguous. io is a little vague (especially if it just wraps
file commands) and string instead of str sounds better, str could be a
stream, a string, a store etc. All the core library namespaces should
probably not be abbreviations.
> In Sol I decided that "namespace" names should use mixed
> case letters starting with an upper case one (Number, String,
> Table, Function, Userdata, Nil, File, Coroutine, ...).
> When implemented properly, you don't have to type them that
> often anyway. I.e. you want to write t:append(e) instead
> of Table.append(t,a) or x:sin() instead of Number.sin(x).
This idea seems quite a good one although I'm easy either way. It could be
said it would be starting some sort of a coding standard though which could
be an issue for some.