Language with direct RAM<->HDD communication

Why nobody invented language with built-in direct RAM<->HDD communication so far? I think this would have many pros (if used right), even in modern times where RAM is getting cheaper and cheaper.

Some examples (in Java code):

Example class:


import java.util.ArrayList;

public class ExampleClass {

    //field for internal JVM use only, possibly by GC
    private boolean loaded = true;
    
    private ArrayList<String> list;
    
    public ExampleClass() {
        list = new ArrayList<>();
    }
    
    public ArrayList<String> getList() {
        return list;
    }
    
    public void setList(ArrayList<String> list) {
        this.list = list;
    }
    
    //this method should be directly in Object class
    public boolean isLoaded() {
        return loaded;
    }
    
    //this method should be directly in Object class
    public void setLoaded(boolean loaded) {
        this.loaded = loaded;
    }
    
    public void doSomething() {
        //do something here
    }
    
}

Example 1:


public static void main(String[] args) {
        //new object is created in memory
        ExampleClass obj = new ExampleClass();
        obj.getList().add("Hello World!");
        obj.doSomething(); //working as usual

        obj.setLoaded(false); //JVM receives hint that obj and everything inside should be unloaded from memory and moved to HDD on next GC cycle
        obj.doSomething(); //still working as usual, unless GC cycle happens between this and previous call
        
        System.gc();
        obj.doSomething(); //obj is loaded from HDD and is stored here until end of method and next GC cycle, if called method is using list inside obj, then this list is loaded as well
        
        obj.setLoaded(true); //the whole obj is loaded from HDD to memory and deleted on HDD
        obj.doSomething(); //working as usual
    }

Example 2:


public static void main(String[] args) {
        ExampleClass first = new ExampleClass();
        ExampleClass second = new ExampleClass();
        
        first.setList(second.getList());
        
        second.setLoaded(false); //only second will be unloaded to HDD on GC as list is used somewhere else
        System.gc();
        first.list.add("Hello World!"); //works as usual
        second.doSomething(); //second is loaded from HDD, but list inside is in memory all the time
        
        first.setList(new ArrayList<>()); //reference to list inside second object is erased
        System.gc(); //list inside second object is unloaded to HDD
        second.doSomething(); //obj is loaded from HDD and is stored here until end of method and next GC cycle, if called method is using list inside obj, then this list is loaded as well
    }