3 ms·
I would not call it a feature. The clean solution would be dependent types so we can model the proposition "that list is not empty" in the type system. It is ve
by Zalastax 8y ago
I would not call it a feature. The clean solution would be dependent types so we can model the proposition "that list is not empty" in the type system.
It is very neat to have the standard list as your data-type, but accompanying it is a proof that the list has elements.
However, dependent types are not mainstream yet and we need a lot more research before that can change.