Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Contextual I/O #38

Open
Open
@sagebind

Description

Make stdin, stdout, and stderr into normal context variables and make a "stream handle" a built-in type. Then we can do something like:

let @stdout = (open -w "message.txt") {
 println "Hello world!"
 fclose @stdout
}

All sorts of fun and useful programming abilities open up that many shells can't handle because you can't hold a file descriptor in a variable. Of course, it can also mean that users can leak file handles...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /