lua-users home
lua-l archive

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




On 9/30/23 06:17, Gavin Wraith wrote:
On Sat, 30 Sep 2023 11:48:47 +0300
Родион Горковенко <rodiongork@gmail.com> wrote:

Main point I want to address (attack!) is that Lua is not used for
education, ...   a big mistake definitely. 
I agree. It has been my experience that educational administrators
seldom appreciate the difference between the requirements for teaching
and the requirements for use or research. For example, users must avoid
reinventing the wheel. Learners, to the contrary, must reinvent the
wheel. Unfortunately many administrators believe (wrongly IMHO) that
just because a language is popular it has to be good for teaching.

I recommend Roberto's lecture
https://www.youtube.com/watch?v=XxcSvnEIUq4
in any discussion of the merits of Lua for teaching.

Lua makes much clearer the contradiction between space and time: the use
of functions, f(x), and lookup-tables, f[x]. As far as I know, no other
language does this.

Scheme (and the SICP book) used to be the big educational programming
language in the USA. Lua could certainly take its place. Unfortunately
neither Scheme nor Lua are much use for teaching the importance of
strong typing in programming. I suppose it depends on the educators'
targets.

[KSB] I don't want to start a flame war, but I strongly believe that typing should be associated with the value, and not with the variable. Associating a type with a variable started with FORTRAN (and was perpetuated by C) as a way to simplify compiler writing and execution efficiency. Typing variables forces  programmers to think about underlying representations and instruction sets. Yes, under the covers conversion can and will take place. But I as a programmer should be able to say write A/B and expect the result to be 1/2 if A is 1 and B is 2, without having to think about what type the variables are declared as. Similarly, I want to be able to append a € to A without having to deal with the underlying representation. I should be able to add a column of financial numbers and have the total correct to the cent without having to worry about whether the variables are declared as floats or decimal numbers.

Typing of variables is a disservice to 21st century software development. Strong typing is just something that makes this anachronism sound like something desirable.

Regards
– Bhaskar



--