-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Design for Python-like functions in Oil #1112
Comments
It's related to error handling, because procs have exit codes, and a expression like |
Key question: Are functions vectorized ? I think they can use QTT for args and return values. So you get the args on stdin. And then you return on stdout. And a non-zero exit code is turned into a fatal "exception"? It aborts the recursive expression evaluation, which again turns into an exit code at the statement/command level. Something like this, but we also need headers
Or maybe
Do we have multiple types of functions -- vectorized and non-vectorized? The vectorized ones are more typed with QTT ? |
I think we should consider putting user-defined functions and builtin functions in the "proc" namespace, sort of like a Lisp 2 And then have
|
Feedback here on potential (syntactic and semantic) confusion between procs and funcs It is a hard design problem |
Done - future work described here https://www.oilshell.org/blog/2024/01/release-0.19.0.html |
This issue was mentioned here
http://www.oilshell.org/blog/2021/12/review-arch.html
And many related issues
https://oilshell.zulipchat.com/#narrow/stream/121540-oil-discuss/topic/Python-like.20functions.20.28errexit.20issue.20and.20docs.29
The text was updated successfully, but these errors were encountered: