lua-users home
lua-l archive

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


On Mon, Mar 31, 2014 at 1:41 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Mon, Mar 31, 2014 at 10:33 AM, Coroutines <coroutines@gmail.com> wrote:
> I usually show strict.lua to beginners who don't understand yet what is
> possible with metatables, never really needed it though... :>

Beyond a certain point, even the most hardened programmer needs a
spellchecker ;)  When I was moving Penlight away from module(), a
little static analysis script by Egil made the whole thing a lot
easier, and I didn't have to outsource so much debugging[1].... If
you're looking after > 10Kloc, then you need all the help you can get!

There are interesting trends in both the dynamic and static language
worlds.  There are attempts to add type annotations to dynamic
languages (e.g. TypeScript, Typed Lua) so that silly errors are caught
early and an IDE can be designed to handle big codebases.

On the static side, modern languages use local type inference so that
you _don't_ need type annotations ;)

Depends on scale - there's a reason why "programming in the large" was
such a hot topic in its day.

[1] which is rude

Typically I care more about if the object is a container rather than what specific type it is.  I care about how I can iterate over it.  Scalar/sequence/hash difference, I mean :>  I tend to write utility ~things~ though... THE LAND OF OZ IS MUCH MORE FUN WITH A SMALL SUBSET OF CONTAINER TYPES. BUWwahahauwWHAHAHahwhaha ~