News for hackers. Stuff that matters.
Re:Participle: A parser library for Go by skybrian on Tuesday July 17, 2018 @11:21AM (#17550303)
Cool idea. The way it handles alternatives looks awkward since each alternative is a field in a struct. You have to check each field to find the one that's not nil.

(See Term in the example.)

Normally this would be done with an interface, like in go/ast

Re:Participle: A parser library for Go by skybrian on Tuesday July 17, 2018 @02:49PM (#17552081)
Although, on second thought, this means writing a chain of if-else statements instead of a type switch in a visitor. Maybe it's not that big a difference?