Hi Doc, I understand your point and i agree.
I think that could be followed a path like the View one.
i am thinking to the feel object, with recurring standard name until is
possibile:
My first attempt make me think to (arguments here are only example):
port/locals/feel: make object! [
resolve: func ["dns lookup done" port][]
read: func ["read op done" port][]
write: func ["write op done" port][]
end: func ["connection is closed by peer or task is at the end" port][]
connect: func [ "connection is open" port][]
detect: func ["low-level" port][]
]
or
port/locals: make object! [
.... (internal stuff)
resolve: func ["dns lookup done" port][]
read: func ["read op done" port][]
write: func ["write op done" port][]
end: func ["connection is closed by peer or task is at the end" port][]
connect: func [ "connection is open" port][]
detect: func ["low-level" port][]
]
or it could be a block not an object.
port/locals/feel: []
Not all functions are needed for all protocols, and sometimes they can have
other meanings.
In both cases, it should be a good thing to permit the user to define the
function at make port! time. To reach this goal, a syntax could be:
1) p: open/custom url [resolve: [user-code ] read: [user-code]]
or
2) p: open/custom url reduce [resolve: func [port data][user-code ] read:
func [port data][user-code]]
or
3) p: open/custom url [resolve: [port data][user-code ] read: [port
data][user-code]]
the last permits to define local vars without reducing the block:
p: open/custom url [resolve: [port data /local a b c][user-code ]]
perhaps all 3 cases could be supported by the handler with a parse rule.
What do you think?
---
Ciao
Romano
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.