Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Conversation

@aep
Copy link
Collaborator

@aep aep commented Sep 27, 2020

so i've been thinking about how MutSlice is weird.

i'm proposing a generic IO thing that includes all the read/write stuff and works on FILE, fds, sockets, etc rather than just memory

suggested io api
@aep aep requested a review from jwerle September 27, 2020 10:12
Copy link
Member

@jwerle jwerle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like. So the idea is to implement this interface or will a handle be a first class type with it's prototype (impl) set up in a constructor implementation?

@aep
Copy link
Collaborator Author

aep commented Sep 28, 2020

well, in C interfaces are first class :D
so yeah, there's no additional compiler magic for this, its just a struct you return with handles,

maybe like

let h = fs::open("/etc/passwd");


new socket = tcp::make();
let h = socket.io()

@jwerle
Copy link
Member

jwerle commented Sep 28, 2020

hell yeah!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants