PLT general.

1 2019-01-10 21:31

Got any ideas to extend the language you're working in or willing to describe your ideal language? This is the thread for you.

If you've been in the 'What are you working on?' thread you've no doubt heard that I'm working on a radix-tree library in scheme. I've been trying to think of the applications of this feature at a PLT level, and a few things have come to mind. The first is that because you can express all other abstract collections in variations of this datastructure with immutable vectors, HAMTs, & conc lists you can actually write universals on all the derivative abstractions. So you could have a generic map function which applies to sets, vectors, & lists extremely simply, and this allows you to develop a large number of predefined functions on these data structures like in Pico Lisp, & APL without losing the express power of having many different collection types. The second is that if you implemented the Adaptive variant of the core library you could have a very functional vector programming language without sacrificing memory, or the expressiveness of vector programming languages (although you are less efficient than a typical vector programming language for append, insert, and delete because I don't think you can actually have a relaxed adaptive radix-tree). Third you can pretty easily integrate a system of reference counting into the core data structure such that any node will be removed if there are zero references to it. If you're willing to give up assignment similar to Linear Lisp you can use this reference count to frequently get in place updates on your data structures and to have a programming language with deterministic garbage collection and effectively zero over head from it without having any sort of explicit memory management or the consequences of state. If all of these things were implemented the result would effectively be a performant variant of Backus's function-level programming languages although not quite. What are /prog/'s thoughts on this?



do not edit these