Comment

Comment by DougBTX

There would probably be a much longer list of issues if ESR had converted to Rust instead, but the syntax for error returns is quite interesting. Rust and Go both opt not to have exceptions, instead they use error return values.

The original Python code using exceptions was:

    sink = transform3(transform2(transform1(source)))
Making that use error return values looks quite verbose in Go, but Rust has syntax specifically for that case, making it quite manageable:

    sink = transform3(transform2(transform1(source)?)?)?
parent DougBTX 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton