Skip to content
New issue

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

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

Already on GitHub? # to your account

Add functionality to handle variadics/slices (#7) #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Houndie
Copy link

@Houndie Houndie commented Mar 16, 2018

Note: Right now the slice will grab every argument from where it is til
the end. This is fine for variadics which must be the last parameter,
but slices don't have to be. Need to implement error handling for
functions which contain a slice argument which is not last.

Alternatively, define alternate syntax for slices such as
"gorram pkg func {some, slice, parameter} other parameters"

Note:  Right now the slice will grab every argument from where it is til
the end.  This is fine for variadics which must be the last parameter,
but slices don't have to be.  Need to implement error handling for
functions which contain a slice argument which is not last.

Alternatively, define alternate syntax for slices such as
"gorram pkg func {some, slice, parameter} other parameters"
@Houndie
Copy link
Author

Houndie commented Mar 16, 2018

As noted before, I'm not particularly happy with this changeset, it feels very tacked-on to the current code. Doubling the number of converters is probably much cleaner but might be difficult to maintain depending on projected life of the project (if we need to start adding other variations on types, the combinatorics might get high).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant