-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
User-defined Functions: support namespacing, description, optional args, default values #2805
Comments
I'd like to do this. Do you have any thoughts for how to call functions with optional parameters in the editor (as in, what do you type to learn about, add, remove, etc, optional arguments)? |
Hm that's a good question. I'm not sure the best way to do this, I'll have to think about it more. Perhaps the easiest way to handle this would be to require all optional arguments to have a default value, and when you autocomplete that function in the editor, the default values are placed in at the calling location- saving the user some typing, but letting them replace the value if they want. I'm not sure if this is maximally flexible, but it also make implementation on Dark's side a bit easier. Perhaps reasonable for a V0? |
Closing this issue, as it's not quite applicable to dark-next:
|
There are a number of useful aspects of defining methods in most languages that are currently not supported (or at least appear to be not supported) for user-defined functions in Darklang:
Twitter::send_tweetv0
)let _ = "..."
is the comment.HttpClient::postv5
but user-defined functions and datastores do not.The text was updated successfully, but these errors were encountered: