lua-users home
lua-l archive

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


> It was thus said that the Great Dirk Laurie once stated:
>> 2014-04-16 19:15 GMT+02:00 Hisham <h@hisham.hm>:
>>
>> > Monkey Patching is Never Really Needed.
>>
>> Does strict.lua count as monkey-patching?
>
>   Yes.
>
>   But (going by the code in Lua 5.1 etc/ directory), code written to work
> with strict.lua will still work without strict.lua, i.e. code does not
> depend on strict.lua being in use.

Moreover you should probably not require strict in a module
you publish, precisely because then you cannot use a module
that does not respect the strict model simultaneously.

I usually include strict.lua (or pl.strict) only in my
test suites. This way you can find bugs in your module but
you do not impose strictness on others.

The only exception (I think) I made to this rule is my
test helper, because I consider it a feature to impose
strictness in test suites :)

-- 
Pierre Chapuis