[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require() parse error in 5.3.4/5.4.0-work2?
- From: Kenneth Lorber <keni@...>
- Date: Tue, 26 Jun 2018 07:13:52 -0400
> On Jun 23, 2018, at 8:57 AM, Andrew Gierth <firstname.lastname@example.org> wrote:
>>>>>> "Kenneth" == Kenneth Lorber <email@example.com> writes:
> Kenneth> require() seems to silently accept extra arguments. Is this a
> Kenneth> bug?
> Pretty much every function accepts and silently ignores extra arguments,
> unless the function itself bothers to check for them and throw an
> explicit error.
Thanks, and after a little source diving you are correct, but that's not quite the reply I was looking for.
Is there some reason this is a language feature? Some use-case I don't see? (If so, why is there the occasional check for extra arguments?)
Is it documented somewhere I missed?
Is there any reason not to add checks for extra arguments? If it's performance, it could be available as a compile time option.
I'm working for an implementation for 5.3.4. If there's any interest please let me know or I'll just quietly add it to my copy and stop bothering the list about it.