Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement
doesNotUnderstandWithKeys
#6227Implement
doesNotUnderstandWithKeys
#6227Changes from 12 commits
318f139
591e8f6
b30607d
4e77318
b336225
389c8d3
958af68
be80f55
ec776bc
a8fafc1
2154969
faf6b29
6d6a86f
d9f07f2
750f8f5
61b2c68
4144747
32c3333
919956f
9dc1da5
26428b3
aa519f4
ab00109
ad04f69
aeb6a95
b3f7a7f
ebf5805
f79e656
27679c5
704d0cf
d15afc8
76b7708
024eac1
0b15f0f
b38cb22
ad8f2cb
629686c
d0b8df2
7826824
ef4fdc3
bf55260
94a6cd2
5e4a7f8
eda146e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can then now be:
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that would change how object prototyping calls methods and potentially break stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry, sure. I meant
^func.performWith(\value, [this] ++ argsArray, keywordArgsAsPairs.asEvent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that still won't work because it needs to go through
functionPerformList
which is how classes currently opt into object prototyping. I think it would be better if that was not the case, but that's a different conversation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that it may be inefficient to calculate the array when none is needed. So a method like
functionPerformWith
would be logical, which would simply returnthis
for objects and callvalueWith
for functions.But, I suppose it is a rare case anyhow that someone passes arguments when simply accessing an object in a prototype.
Like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a keyword argument, and should already work? Away from computer, but I'll test later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to demonstrate a case where the user just wants to access the value?
What you've written throws an error because the keyword does not exist in array's value method (I think...)
I don't think it ever makes sense to use a keyword when you want to access something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine the case where the message
finch
would be sent to different prototype objects (dictionaries), and some of them have a function in finch to generate a new object, takingfreq
as an argument, and others have a fixed object in them, ignoring the argument.In the case of normal objects, this just goes through without complaint:
But my comment was mainly about optimization: if you call
(x:600).x(where:7)
and there is an object (here 600) is fixed, there is no need to go through the wholemakePerformableArray
.But this is just something to keep in mind, I suppose.
Essentially a method
functionPerformWith
would solve it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should work as usual. I was just referring to the getter (not the setter), a call to which may have more arguments that remain unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think this bit of the code is wrong because right now it only works with functions, and won't work with other classes as it just looks up the
def
. I'll change this now.