How low can safe languages go?

62
Опубликовано 6 сентября 2016, 5:29
Safe languages try to increase software reliability and security by checking for errors at compile time and run time. For example, Java and C# check types (mostly at compile time) and check array bounds (usually at run time). Unfortunately, these safety checks restrict the operations that a program can perform. Typical safe programs cannot explicitly free memory, cannot change the types of allocated data after allocation, cannot read and write to memory-mapped I/O addresses and I/O ports, cannot initiate DMA, and have limited control over how words are arranged in memory. As a result, most safe languages rely on run-time system code and operating system code, written in unsafe languages, to mediate access to low-level resources like devices and memory words. To alleviate these restrictions, we have developed a safe language called Clay, which uses polymorphic types, linear types, arithmetic types, and delayed types to give safe code flexible and efficient access to low-level resources. This talk will describe experiences developing low-level systems, including garbage collectors and device drivers, in Clay.
автотехномузыкадетское