swort·il y a 8 ans·discussOr, for an example of actual-zero-overhead tree processing using the visitor pattern:https://medium.com/@swortelbernux/libraryless-reflection-in-...
swort·il y a 10 ans·discussThe linked FAQ specifically talks about returning pointers to structs that fulfil the 'error' interface and why it's a bad idea.
swort·il y a 10 ans·discussTyped vs untyped nil means that, in practice, all functions must return an error of type 'error', and force clients to downcast at runtime:https://golang.org/doc/faq#nil_errorOf course, there are ways around this such as returning a struct, but then that's no longer compatible with the error interface.
swort·il y a 10 ans·discussThe letter 'M' in the Roman alphabet is derived from the symbol for running water in phonecian, and the letter 'A' is a rotated cow's head.Phonecian is partly derived from Egyptian hieroglyphics. I love this stuff.https://en.m.wikipedia.org/wiki/Phoenician_alphabet
https://medium.com/@swortelbernux/libraryless-reflection-in-...