|
On Sun, Jul 06, 2014 at 12:15:16AM -0300, Carlos Pita wrote:What's the #1 excuse for not using a language like Lua: popularity.
> If you do a lot of work with tables you will dislike the syntax:
>
> table{ ....}end
>
> and certainly won't consider {} syntax sugar.
>
> Similarly, if your coding style relies a lot on higher order functions
> you may find:
>
> function()....end
>
> too noisy in contexts like:
>
> seq:foreach(....) or
>
> seq:map(....) or, worst:
>
> switch(
> ...., ....,
> ...., ....,
> ...
> )
>
> Lua semantics doesn't preclude this coding style at all (which, btw,
> is not just about toy dsls). But it syntax discourages it.
>
> I really can't see the ton of effort for a little return here.
>
It's a valid excuse, because using an unpopular language means more time and
expense training your engineers, or finding engineers comfortable in that
language, compounded by the the looonngggg maintenance curve. Plus, it makes
it more difficult to integrate or reuse modules and libraries. (Even if your
syntax change doesn't hinder using third-party modules, it does hinder your
ability to reuse your code elsewhere.)
Now, as niche of a language Lua is, any DSL based on Lua is infinitely more
so.
That's a _huge_ cost.
Python can't hold a candle to the power and capability of PUC Lua, yet when
a corporation chooses a language like Lua over Python, it's a very serious
decision because there are immense costs involved, immediate and
prospective.
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.