-
Notifications
You must be signed in to change notification settings - Fork 323
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
Add key functions to Table to make it act as [Column] #3644
Merged
+222
−182
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a4c1b36
Extend at, add length
radeusgd 07648fe
Add tests, checkpoint
radeusgd c99f5fa
fixes
radeusgd 331ff06
Remove `length` from the Table as causes confusion. Replaced with `co…
jdunkerley 987bd3c
CHANGELOG
jdunkerley 3edff35
Merge branch 'develop' into wip/radeusgd/table-at-integer-181370836
jdunkerley fb77382
Trailing space.
jdunkerley 8f62c01
Use column_count where possible. Fix on mis-use of length.
jdunkerley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 added the default parameter to
at
(being0
to choose first available column), but this has a downside that now we cannot nicely usetable.at
as a higher order function - if it gets no arguments it will use the defaults - so to pass it as an unapplied function we need to use the_
(or in the future...
or sth) to make sure defaults are not triggered.I'm not saying this is a problem, especially as our GUI users will probably not use
at
in this mode too often. Knowing that our rule of thumb is to have default arguments wherever possible, I think we may keep it, but there is a trade-off to make.Another thing I'm worried about is that if some users start learning about higher order functions they will can really easily get confused with how these default arguments work - but this a bigger problem of language design and I'm not sure if a better solution than we currently have is possible - it is always a trade-off. We probably just need to be careful about these defaults when writing user manuals, to make sure the users understand that they need the underscore to avoid defaults. We may also consider trying to improve the error messages somehow, as currently tracking the
Not_Invokable_Error
was a bit hard even for me, who I tihnk knows Enso pretty well.