[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Injecting names & method chaining (was Re: [ANN] Penlight Libraries, First release)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 4 May 2009 16:04:55 +0200
On Mon, May 4, 2009 at 2:35 PM, Luiz Henrique de Figueiredo
> I don't see a problem here at all. Take for instance my mathx, which
> extends the standard math library with the functions available in C99.
> I think it's quite natural to ad those to math instead of creating a
> mathx table.
Personally, I can't see the problem either ;) Just following the
intellectual exercise that starts from the premise that 'all
modifications of standard function tables are harmful'. Personally, I
like popping pl.string functions into string. No _existing_ functions
are modified, so existing code cannot be damaged.
Of course, I may be wrong, so the challenge is to find a
non-theoretical case where this is indeed harmful, given the 'no
overriding' rule. 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.