The technical arguments I see about the form of generics e.g <T>
vs [T] are so full of shit it's insane it's an aesthetics argument plain and simple there's nothing technical about it aside from the fact people suck at writing parsers "Ohh how do you disambiguate Foo<K, List<T>> because >> is token"... is one of the dumbest things I've ever had said to me. I dunno learn how to write a parser.
The technical arguments I see about the form of generics e.g <T>
vs [T] are so full of shit it's insane it's an aesthetics argument plain and simple there's nothing technical about it aside from the fact people suck at writing parsers "Ohh how do you disambiguate Foo<K, List<T>> because >> is token"... is one of the dumbest things I've ever had said to me. I dunno learn how to write a parser.
The combinator pattern is extremely cool case study #5371:
Here's an entirely automatically generated railroad syntax diagram for the JSON parser example that comes with my parser combinator library Chumsky (https://github.com/zesterer/chumsky/).
This works for arbitrary parsers, with no additional work needed on the part of parser authors.
If you've written a parser with Chumsky, you'll be able to call just a single function to get a similar diagram for your grammar. #rustlang #plt #compilerdev
The combinator pattern is extremely cool case study #5371:
Here's an entirely automatically generated railroad syntax diagram for the JSON parser example that comes with my parser combinator library Chumsky (https://github.com/zesterer/chumsky/).
This works for arbitrary parsers, with no additional work needed on the part of parser authors.
If you've written a parser with Chumsky, you'll be able to call just a single function to get a similar diagram for your grammar. #rustlang #plt #compilerdev