[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <> redirection and notations



[sorry for taking so long to reply to this recent sequence of notes.]

the suggestion, as i understand is to have to layers of hook  
functions, which i will name consistently with current es.

fn-%openfile	= $&openfile
fn-%open	= %openfile r		# <file
fn-%create	= %openfile w		# >file
fn-%append	= %openfile a		# >>file
fn-%open-write	= %openfile r+		# <>file
fn-%open-create	= %openfile w+		# useless; no special syntax
fn-%open-append	= %openfile a+		# <>>file

(the last three names are up for grabs.  the first three aren't.   
also if people really want <>! or <<> or <>< for %open-create, it can  
always go in, though it does seem truly pointless to me.)

(note also, that fn- variables don't have to be lambdas.  they're  
just substituted in first position.)

in addition, the $&open, $&create, and $&append primitives would be  
dropped from the language.

now, some people have suggested using -x style options for selecting  
which form of open we get.  i don't really like that, because i think  
of -x as an option that changes a default behavior, and in this case  
i don't want a default.

anyway, barring dissent from the list, i want to implement this set  
of operations.  please let me know (as i'm sure you will) about flaws  
in this design.

paul