Replies: 1 comment 2 replies
-
Where have you seen that come up? You used to have to do something like that for just about any file event, because file events had a $conns attribute (that only ever contained a single connection). But I believe we fixed that and file events should have a $conn attribute now. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Multiple times now I've run across the following fairly weird-looking idiom:
It would be nice/cleaner to have something like
sample_element(t: any): any
that takes atable
orset
and returns an arbitrary element (for tables, this would be an index).If we had a notion of type templates, then this would be something like
sample_element(t: table[T1] of _): T1
(and maybe an overloaded versionsample_element(s: set[T1]): T1
) ... though I'll take the simplerany
version for now.Beta Was this translation helpful? Give feedback.
All reactions