Generics parameter syntax
Generics parameter syntax
Posted Jul 3, 2020 18:49 UTC (Fri) by mathstuf (subscriber, #69389)In reply to: Generics parameter syntax by davecb
Parent article: Generics for Go
Posted Jul 3, 2020 22:39 UTC (Fri)
by davecb (subscriber, #1574)
[Link] (2 responses)
Posted Jul 5, 2020 2:26 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Jul 17, 2020 17:08 UTC (Fri)
by anton (subscriber, #25547)
[Link]
Generics parameter syntax
Generics parameter syntax
I expect that symbol table lookup in the parser is not a performance problem. It is a conceptual problem because you need to know the parse tree to know the scope of an identifier; of course, for some kinds of languages the problem is solvable (LL(1) languages with definitions before use of symbols should be fine), but it means that the language requires an integration of parsing and "static semantics". And possibly scanning, if, e.g., the syntax requires a token for a type that's separate from an identifier token.
Generics parameter syntax