Case study on ranges and lazy evaluation
    John Colvin via Digitalmars-d-announce 
    digitalmars-d-announce at puremagic.com
       
    Mon Jul 20 12:46:13 PDT 2015
    
    
  
On Monday, 20 July 2015 at 19:44:01 UTC, John Colvin wrote:
> On Monday, 20 July 2015 at 18:17:18 UTC, Adam D. Ruppe wrote:
>> Quick, what does this loop in this function do?
>>
>> void PanelBar::RepositionExpandedPanels(Panel* fixed_panel)
>>
>>
>> I'm willing to guess it repositions the expanded panels.... 
>> named functions are the best abstraction.
>
> That's great for an API user, but it's not as massively 
> impactful for actually getting the code right, changing the 
> code, finding the bugs in the code, etc... where you need to 
> actually need to understand the logic.
P.s. which is not to say that sensibly breaking code in to 
functions with good names doesn't help with the above, but just 
that it doesn't cover all of the same problems that e.g. 
ranges/algorithms try to address.
    
    
More information about the Digitalmars-d-announce
mailing list