Re: Is it time to remove dofile/loadfile? (was: Can a Lua module find out whether it is being required or dofiled?)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- 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: 2015年9月25日 07:46:41 +0200
2015年09月25日 4:20 GMT+02:00 Patrick Donnelly <batrick@batbytes.com>:
> 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!