lua-users home
lua-l archive

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

I see that there are a lot of resistance to introduce the short
function syntax :

|args| expr  ==> function(args) return expr end

The main reason is not technical but just a matter of style, many
people prefer to keep a more traditional keyword based syntax. Another
given reason is to avoid another level of precedence.

I believe that, from a mathematical/functional point of view it is a
very useful notation and if it is noisy than we should consider that

a = 2 + 4*x - 3*x^2 + f(a+b)

is an incredibly noisy notation because of the '=', '+', '*', '^', '('
and ')' without not even a keyword. It is nevertheless universally
accepted as one of the most convenient notation both in mathematics
and in programming. I believe that the same logic also applies to the
short function syntax. But anyway, I will not argue anymore, I can
understand that Lua user base is not so mathematical of functional
oriented and prefer to keep the traditional notation using the
'function' keyword.

Another resistance is against modification of the interpreter to
introduce complex numbers. For me is very simple: people without a
strong mathematical background does not understand the importance of
complex numbers. In my point of view the complex number as native
types is *fundamental* for any serious numerical calculation work .
full stop. If the majority of people here does not want to introduce
complex numbers in Lua I understand because the majority of the user
base has a background mainly on IT or computer science and not on
mathematics, but IMHO this is an error. full stop.

I'm going to keep the same orientation for GSL shell whatever Lua
people may decide about mainstream Lua release.

People here have suggested to:
- prefix with 'math.' and 'gsl.' all the functions I'm using like
'sqrt' or 'plot'
- keep the full function literal notation
if I adopt these suggestion the GSL shell code will became awful and
painful to write as well to read, so I simply cannot adopt this
suggestion . full stop.

Otherwise I will remark that no help whatsoever came till now to help
the development of GSL shell. That is a little bit unfortunate because
a Lua package for numerical computation and graphics will be of great
benefits for Lua itself in the long term but this is just my idea.

So, I will continue to develop GSL shell as before, alone. Thank you guys.