Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO API - Nevalang vs Go (descriptions and explicit opening/closing) #790

Open
emil14 opened this issue Nov 28, 2024 · 0 comments
Open

IO API - Nevalang vs Go (descriptions and explicit opening/closing) #790

emil14 opened this issue Nov 28, 2024 · 0 comments
Assignees
Labels

Comments

@emil14
Copy link
Collaborator

emil14 commented Nov 28, 2024

Example: our def ReadAll(filename string) (res string, err error) works only with fs files while Go's accepts abstract File interface that you can/need to get from os.Open. Go's API is about passing file descriptors around and explicitly closing them after. This is more verbose but also more flexible. Go's io.Reader might work with any streams of bytes, not just fs files.

At this point we must figure out how to implement streaming IO properly and these kinds of things are foundation for that.

@emil14 emil14 self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant