amaranth-lang / amaranth

A modern hardware definition language and toolchain based on Python
https://amaranth-lang.org/docs/amaranth/
BSD 2-Clause "Simplified" License
1.56k stars 174 forks source link

Normalize diagnostics to use either a backtick or a single quote, not both at random #1160

Open whitequark opened 7 months ago

whitequark commented 7 months ago

Bikeshed: which of these should we use?

tpwrules commented 7 months ago

What is an example of each in the code as it stands?

I'd say that backticks are better for code examples in like "x is bad. Do y". But single quotes are better for values, like "x should be a y, not 'z'"

whitequark commented 7 months ago

I'd say that backticks are better for code examples in like "x is bad. Do y". But single quotes are better for values, like "x should be a y, not 'z'"

I like this distinction!

What is an example of each in the code as it stands?

Backticks: https://github.com/amaranth-lang/amaranth/blob/31a12c03d19fef601b6515c431c5b686d2ba3702/amaranth/back/rtlil.py#L1007

Single quotes: https://github.com/amaranth-lang/amaranth/blob/31a12c03d19fef601b6515c431c5b686d2ba3702/amaranth/build/plat.py#L48