Better HN
topnewbestaskshowjobs
Log inSign up

swort

9 karma · joined Aug 20, 2016 (10y ago) · 4 submissions

Submissions

comment 8y ago · link · parent

Or, for an example of actual-zero-overhead tree processing using the visitor pattern:

https://medium.com/@swortelbernux/libraryless-reflection-in-...

comment 10y ago · link · parent

The linked FAQ specifically talks about returning pointers to structs that fulfil the 'error' interface and why it's a bad idea.

comment 10y ago · link · parent

Typed 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_error

Of course, there are ways around this such as returning a struct, but then that's no longer compatible with the error interface.

comment 10y ago · link · parent

The 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