[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Injecting names & method chaining (was Re: [ANN] Penlight Libraries, First release)
- From: Henk Boom <henk@...>
- Date: Mon, 4 May 2009 10:21:18 -0400
2009/5/4 steve donovan <firstname.lastname@example.org>:
> There is a potential issue, which came up in a
> recent poster's question of what Lua he needed so that 'os.rmdir'
> worked. That people could see code snippets and assume that the
> extended tables were somehow part of the standard kit. So it's really
> a documentation caveat.
This feels like the most important issue to me. It's misleading in
that it suggests that 'rmdir', for example, comes from the 'os'
module. Even after you realize it was injected, it's hard to figure
out where it actually came from since you can't easily tell which
'require' statement introduced it.
Other than that, you could easily have collisions with other libraries
which also inject similar functions. In this respect using a module
name such as 'stringx' is just as bad, since other people are likely
to use it too.