[libre-riscv-dev] nmigen frustrations make me want Rust
Jacob Lifshay
programmerjake at gmail.com
Sun Mar 17 14:18:27 GMT 2019
On Sun, Mar 17, 2019, 07:14 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:
> Example of the polymorphic benefits of python which I plan to exploit is in
> the pipeline Stage API. Use m.d.comb += self.idata.eq(self.idata) and if
> odata is an object or a signal it does not matter.
>
> The API requirement becomes that if it is an object then the eq function
> must return a *list* of eq assignments of all of the signals within that
> class instance that will get the assignment of the idata object signals
> into odata.
>
> Strong typing actually massively interferes with this type of flexibility
> as it is unexpected and unanticipated legitimate *and desirable* behavior
> that not even the authors of nmigen could have predicted, and strong typing
> would prevent and prohibit unless explicitly envisaged, way, way in
> advance, which is almost impossible and impractical.
>
I think Rust can let you do that.
>
> This type of powerful shoot-yourself-in-the-foot capability of python is
> just something that you need to put strict software engineering practices
> in place and adhere to them no matter what.
>
> 15 years ago I genuinely used to think that unit tests were a total waste
> of effort. Then for pyjamas (the python to javascript language translator)
> we accumulated well over 20,000 of them and it was the only way that we
> could safely make forward progress.
>
> As a team we managed some really quite significant fundamental redesigns,
> outputting completely different code, even with different performance
> characteristics.
>
> L.
>
>
> --
> ---
> crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>
More information about the libre-riscv-dev
mailing list