4 ms·
Consider the following example: open:[String]->FileDescrptor ReadWrite restriction FileDescriptor to read -> Item,
by ProfHewitt 6y ago
Consider the following example:
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 on
the 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?