lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Roberto Ierusalimschy <> wrote:
> The two obvious solutions would be to change the character that marks
> filenames or the character that starts labels. The second option has the
> slight advantage of not creating a small incompatibility. Suggestions?

How about changing the label syntax to "name::" where :: is a new lexical

There's an amusing syntactic difference in the functional programming
world, where ML uses :: for linked list construction and : for type
annotations, but Haskell is the other way around. So C++ uses : for labels
and :: for namespacing, and with this suggestion Lua would use :: for
labels and : for methods (with a vague handwavy connection to namespaces,
please ignore the man behind the curtain).

f.anthony.n.finch  <>
Fair Isle: Cyclonic 5 to 7 becoming northwest 7 to severe gale 9, decreasing 4
or 5 later. Moderate or rough, occasionally very rough in southeast. Rain or
showers. Moderate or good, occasionally poor.