Open TwitchBronBron opened 2 years ago
❤️
I assume class syntax would be similar?
class Queue<T>
private data as T[] = []
sub push(item as T)
m.data.push(item)
end sub
function pop() as T
return m.data.shift()
end function
end class
Yep I think that makes sense.
Other languages (like TypeScript) have generics support. The BrighterScript type system should support them as well. For example: