[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is it time to remove dofile/loadfile? (was: Can a Lua module find out whether it is being required or dofiled?)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 25 Sep 2015 07:46:41 +0200
2015-09-25 4:20 GMT+02:00 Patrick Donnelly <firstname.lastname@example.org>:
> Since recently Lua has been trying to slim down (e.g. removing certain
> math functions), perhaps it's time to remove dofile/loadfile, as they
> can be trivially replaced with intuitive one-liners (using io.lines
> features available since Lua 5.2):
ALERT! Intuitive one-liner follows!
> assert(load(io.lines(f, 4096), "@"..f))
Careful here, Patrick! This list has in the past shown some
inability to understand sarcasm!