Open DavePearce opened 2 years ago
One problem here is how to represent File
. Some points:
File
as a fixed-width record. This follows Rust, where File
is a struct
albeit with hidden fields.FileDescriptor
or RandomAccessFile
or similar. These don't exist in Whiley, so you're forced to hide them in an open record.Not sure how to reconcile this. One possibility is perhaps to allow for a native type fd
which is hidden from the user. Then, on C/Rust platforms this is just a uint
whilst on Java it is something else altogether.
Yet another approach on the JVM is to add a second level of indirection. Basically, an array of FileDescriptor
objects which can be indexed into. I suppose that would work at least.
Need to figure this out in conjunction with the standard library.