Slava Pestov wrote:

> "in.txt" utf8 <file-reader> [
>      "out.txt" latin1 <file-writer> [
>          <duplex-stream> [
>              ...
>          ] with-stream*
>      ] with-disposal
> ] with-disposal

> This is too awkward for a language named "Factor".

Why wouldn't you just "Factor" out that pattern? Something like:

        : with-reader-writer ( path path quot -- ) ... ;

So the above code is just:

        "in.txt" "out.txt"
          [ ... ]
        with-reader-writer

Well, assuming the proposed "path objects with encoding slots", it would look 
like this:

        "in.txt" utf8 "out.txt" latin1
          [ ... ]
        with-reader-writer

Ed

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to