On 11/18/2025 10:08 AM, Timur Tabi wrote: > On Tue, 2025-11-18 at 22:04 +0900, Alexandre Courbot wrote: >> On principle, I tend to agree. In practice, we will probably never have >> more than these two variants, so we need to balance the benefit of a >> trait against the overhead of defining it in the first place (there are >> quite a few methods in there). >> >> Trait objects come with their own complications, i.e. you need to store >> them on the heap if you need more than a short-lived reference - but in >> our case the short-lived reference should be what we need anyway. > > So I would prefer not to rewrite everything, especially since you did tell me > early on than an > enum was the right approach. If you see the example I provided, you can still keep the enum if you implemented it with traits. The trait is on the inner object. Thanks.
- Re: [PATCH 11/11] gpu: nova-core: add PIO support f... Joel Fernandes
- Re: [PATCH 11/11] gpu: nova-core: add PIO suppo... Alexandre Courbot
- Re: [PATCH 11/11] gpu: nova-core: add PIO suppo... Timur Tabi
- Re: [PATCH 11/11] gpu: nova-core: add PIO support f... Alexandre Courbot
- Re: [PATCH 11/11] gpu: nova-core: add PIO suppo... Alexandre Courbot
- Re: [PATCH 11/11] gpu: nova-core: add PIO support f... Alexandre Courbot
- [PATCH 09/11] gpu: nova-core: add FalconUCodeDescV2 supp... Timur Tabi
- Re: [PATCH 09/11] gpu: nova-core: add FalconUCodeDe... Joel Fernandes
- Re: [PATCH 09/11] gpu: nova-core: add FalconUCo... Alexandre Courbot
- Re: [PATCH 09/11] gpu: nova-core: add Falco... Timur Tabi
- Re: [PATCH 09/11] gpu: nova-core: add F... Joel Fernandes
- Re: [PATCH 09/11] gpu: nova-core: add F... Alexandre Courbot
- Re: [PATCH 09/11] gpu: nova-core: add Falco... Joel Fernandes
- Re: [PATCH 09/11] gpu: nova-core: add F... John Hubbard
- Re: [PATCH 09/11] gpu: nova-core: add FalconUCo... Timur Tabi
- Re: [PATCH 09/11] gpu: nova-core: add Falco... John Hubbard
- Re: [PATCH 09/11] gpu: nova-core: add F... Alexandre Courbot
- Re: [PATCH 09/11] gpu: nova-core: ... John Hubbard
- Re: [PATCH 09/11] gpu: nova-core: ... Miguel Ojeda
- Re: [PATCH 09/11] gpu: nova-core: add FalconUCo... Timur Tabi
- Re: [PATCH 09/11] gpu: nova-core: add FalconUCodeDe... Alexandre Courbot
