whitequark[cis] changed the topic of #prjunnamed to: FPGA toolchain project · rule #0 of prjunnamed: no one should ever burn out building software · https://prjunnamed.org · https://github.com/prjunnamed/prjunnamed · logs: https://libera.catirclogs.org/prjunnamed
ari[m] has joined #prjunnamed
<ari[m]> pardon my rusty inexperience, but in a couple places (eg. here: https://github.com/prjunnamed/prjunnamed/blob/main/netlist/src/logic.rs#L24-L31 ) there's `Result<something, ()>` used, and I don't really understand it. as in, why wouldn't this be an `Option<Self>`?
Wanda[cis] has joined #prjunnamed
<Wanda[cis]> it's because of error propagation
<Wanda[cis]> we impl FromStr later on in the same file for something
<Wanda[cis]> the trait requires us to use Result and provide an error type
<Wanda[cis]> so we use () as the error type
<Wanda[cis]> from_char does the same for consistency (and so that we can propagate errors from from_char via the ? operator)
<ari[m]> so, essentially, because the caller requires some sort of error, and adding enums or whatever for more verbose errors wouldn't add value?
<Wanda[cis]> yeah
<Wanda[cis]> there's essentially 0 point in verbose errors for a [01x]* regex parser
<Wanda[cis]> esp. for something that parses IR (which is supposed to be machine-emitted mostly)
_whitelogger has joined #prjunnamed
_catircservices has quit [Quit: Bridge terminating on SIGTERM]
ari[m] has quit [Quit: Bridge terminating on SIGTERM]
Wanda[cis] has quit [Quit: Bridge terminating on SIGTERM]
_catircservices has joined #prjunnamed