lua-users home
lua-l archive

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

On Sun, Jul 6, 2014 at 5:46 AM, William Ahern
<> wrote:
> The same considerations apply regarding a DSL, and as nice as some of these
> enhancements to Lua are, are they really the same order of difference as
> between Lua and Python? IMO they should be to justify the costs.

This is a good argument against ad-hoc syntax modification. Say a
developer embeds stock Lua; then their users can use online resources
like Stackoverflow and any Lua tutorial without confusion - in this
way, the developer can outsource documentation and concentrate on the
specific API they have exposed.  Syntax changes mess up this
complementary situation and the developer must document these changes
in addition; this applies also to extensions to standard library
namespaces.  Something like string.split is useful, but that name will
cause confusion when users seek help (and I've seen precisely this
kind of thing happening on Stackoverflow) so it should have a distinct

I brought Moonscript into the discussion, not because I think it's the
way forward, but because it's a consistent but different syntax to
regular Lua, backed by the same semantics.  It is better than ad-hoc
modifications because this new syntax is documented.  However, it's
not more beginner-friendly, since there's a good deal more syntax
involved and it's more terse and less readable by beginners.  So by
this logic, it's best to keep your Lua plain and vanilla.

In other words, I agree ;)

steve d.