Comment

Comment by sunfish

First-class values are values which you can pass as arguments, return as return values, and hold in local variables. Values of type `File` or `TcpStream` are first-class in this sense. They show up in function signatures in the same way as any other first-class values, which is what this blog post is interested in.

This is independent of whether the actual I/O is done via mutation/side-effects/execution/etc. or monads/purity/referential-transparency/etc.

parent sunfish 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton