8000 Patches for %ren-c/curl.reb by hostilefork · Pull Request #14 · rgchris/Scripts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Patches for %ren-c/curl.reb #14

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

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

Conversation

hostilefork
Copy link

Includes compliance for refinements-as-own-arguments:

https://trello.com/c/DaVz9GG3/

Also for COMPOSE is /ONLY by default, and uses ((...)) for splicing.

CALL is now /WAIT by default, and lower-level calls must be used to
get asynchronous behavior (that is pending a redesign).

@hostilefork
Copy link
Author
hostilefork commented Apr 6, 2019

I think this is a particularly nice example of making the refinements as-their-own-args is a cleaner answer. The spec tidies up, and there's no need to use GET-WORD!s for the arguments. You could have used the refinement name as distinct from the argument and avoided the get-word!, but that adds some extra mental bookkeeping. (Presumably those get-word!s originated from a direct porting effort which was trying to mitigate Ren-C's earlier "nulls instead of blanks for args" that did not go look for the name of the refinements...but that only reinforces my point about the separation being bad.)

There's a bit of middle-ground here, in that you're not required to use the refinement name as the variable name. You want to proxy something anyway, in a case like AS--you probably want to get back the system's LIB/AS, so calling it AGENT is good. We need a notation in the spec for doing renamings so that it's done for you...suggestions welcome.

I noticed that BLANK! was used for some of the refinement arguments as an option. Yet the semantics of those blanks were always the same as not using the refinement. You get this for free now, and there's no risk of it getting out of sync. foo: func [/x [integer!]] [...] will always accept foo/x blank or foo/x null, both of which will result in x being blank (despite not being in the type list).

/USER had two arguments but they were both blankable, so they would have been two independently providable things (and they get tested with an ALL). Not clear what providing one without the other would mean. This breaks it out into /USER and /PASS...but could also be /NAME and /PASS.

So an improvement, if you ask me... still trying to hit that essential complexity target...

Includes compliance for refinements-as-own-arguments:

https://trello.com/c/DaVz9GG3/

Also for COMPOSE is /ONLY by default, and uses ((...)) for splicing.

CALL is now /WAIT by default, and lower-level calls must be used to
get asynchronous behavior (that is pending a redesign).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0