lua-users home
lua-l archive

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


> Good point sir.  In fact, I haven't seen a compelling reason to
> deprecate anything in the standard libraries.

There is (yet) another reason why I'd like to keep math.pow(). I teach
an introductory computer science class at a local high school using
Lua and for those who are new to the language and to the programming
in general, "^" operator looks as alien as something like "##". I
prefer to use math.pow() as it provides two clues: it has to do with
math and it reminds of "power". I can introduce "^" operator later as
a shorter notation after the students are already familiar with the
operation itself, so there is less cognitive load.

I wouldn't miss deg/rad though.

Paul

On Tue, Apr 8, 2014 at 7:32 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Tue, Apr 8, 2014 at 4:18 PM, Coroutines <coroutines@gmail.com> wrote:
>> string.len() asserts its 'self' is a string, # does not -- the only reason
>> to consider *not* removing it -- same for math.pow() it asserts it is
>> operating on numbers -- ^ does not
>
> Good point sir.  In fact, I haven't seen a compelling reason to
> deprecate anything in the standard libraries.
>