Re: Embrace polymorphic builtins, for they are cool.

2001-06-20 Thread Michael G Schwern
On Mon, Jun 11, 2001 at 09:18:14PM -0500, David L. Nicol wrote: But I'm digressing. What I want to talk about is overloaded builtins. I recently suggested that Cclose be overloaded to make its argument, when its argument is not a filehandle, become read-only. An objection was made to

Re: Embrace polymorphic builtins, for they are cool.

2001-06-20 Thread David L. Nicol
Now look at eval. When acting on a string, it compiles and runs it as code. When acting on a block, it traps any errors and prevents dying. You may be able to come up with some weak analogies between the two, but they're two different functionalities. i have nothing to add. you

Re: Embrace polymorphic builtins, for they are cool.

2001-06-20 Thread Mark J. Reed
I would argue that eval BLOCK and eval STRING are closer than indicated by Mr. Schwern. In either case, you supply an argument which contains code, and that code is executed. As a small amount of protection from this dynamic element, fatal errors within the eval()ed code are trapped and