On 11/17/25 5:15 PM, John Hubbard wrote:
> On 11/17/25 5:06 PM, Timur Tabi wrote:
>> On Mon, 2025-11-17 at 20:04 -0500, Joel Fernandes wrote:
>>> I don't care about the if/else as much as I care about the opportunity to
>>> just specify FalconLoadTarget once instead twice. I think the match here is 
>>> cleaner for this
>>> snippet, but I am Ok with the if/else as well.
>>>
>>> Something like:
>>>    imem_sec_load_target: FalconLoadTarget {
>>>        src_start: if chipset > Chipset::GA100  {
>>>           app0.offset
>>>       } else {
>>>            load_hdr.os_code_size
>>>       },
>>>
>>> That would be one more line of code, but pretty much the same.
>>
>> Interesting.  I would have thought that duplicating the if-statement is the 
>> higher offense.
> 
> I think the use of traits here generally makes this all a little better
> overall though, don't you think?
> 
> Traits are easier to read and internalize quickly, and easy to maintain
> too. They are yet another way to make implicit rules explicit and 
> self-documenting.
> 

arghh, I replied to the wrong thread. I was looking at patch 9/11 earlier,
and had that in mind.

Here, my comment is not applicable.

I'm not have a very productive reviewer day, to say the least! :)

Sorry for the noise.


thanks,
-- 
John Hubbard

Reply via email to