Implement generics/parameterized records
Opened this issue · 3 comments
dplassgit commented
At least something like:
// Doubly-linked list
List: record<Type> {
entry: Type
prev: List<Type>
next: List<Type>
}
list = new List<int>
list.entry = 3
list.prev = null
list.next = null
second = new List<int>
second.entry = 4
second.prev = list
list.next = second
and it Just Works.
dplassgit commented
I think this would be more impactful than many of the other OO-themed issues.
dplassgit commented
but what about
func: proc(list : List<Type>): Type {
return list.entry
}
???