ulox
ulox copied to clipboard
Implement 'Platform' library
Single library that provides all access to things that might actually be dangerous for the language to do.
For our starting purposes this is just file read and write.
Insprired by Roc platforms, which are inspired by Deno.
this would subsume the print func.
Could implement as readonly table that is hardwired fallback in get global. That way child vms can easily not have the same platform access.
initial Platform interface
- string readfile(string)
- writefile(string, string)
- print(string)
- ~~cout, cerr, clog~~ (don't actually want to need these)
Should scriptlocator and platform share the same access and restrictions. Would mean if not given read access cannot build queue files