Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyweight construction issue with empty slots definition #385

Open
davidmclifton opened this issue Jan 30, 2025 · 0 comments
Open

Flyweight construction issue with empty slots definition #385

davidmclifton opened this issue Jan 30, 2025 · 0 comments

Comments

@davidmclifton
Copy link

If providing a flyweight constructor expression, if an empty set of slots is provided it throws an error - yet leaving it out provides a flyweight with no slots. Generally in MOO the convention is that optional args go at the end, vs having overrides based on number of args that don't include the earlier args.

> ;<#107, [], {"testing 1"}>;
Failure to parse program @ 1/47: expected ident
47 errors.
> ;<#107, [blah -> "blah"], {"testing 1"}>;
=> <#107, [blah -> "blah"], {"testing 1"}>
> ;<#107, {"testing 1"}>;
=> <#107, {"testing 1"}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant