by ProfHewitt · 5y ago · 0 comments
open:[String]->FileDescrptor
ReadWrite restriction FileDescriptor to
read -> Item,
write[item] -> Void
ReadWriteOpen:[String]->ReadWrite
[aString] |->
aDescriptor <- Open.[aString],
Implementation ReadWrite
read |-> aDescriptor.read,
write[anItem] |-> aDescriptor.write[anItem]
fd <- ReadWriteOpen.["/etc/passwd"]
Now we have an Actor fd that can only do reads and writes onthe opened file.
Consequently, fd is just one thing in Actors as opposed to
kind of being two separated things in Pony.
Is the separation in Pony really a good idea?
No comments yet.