News for hackers. Stuff that matters.
Re:Lenses: Composable Getters and Setters for Functional Pro... by coldcode on Monday December 24, 2018 @09:22AM (#18752231)
Has anyone done a performance analysis on the use of the lens concept in various languages? Given it is essentially duplicating data for every set it would seem to produce a lot of garbage for whatever memory allocator style is in use.
Re:Lenses: Composable Getters and Setters for Functional Pro... by aeneasmackenzie on Monday December 24, 2018 @09:35AM (#18752284)
In haskell they're optimized out, but some delicate work has gone into ensuring that. They're actually faster than alternative methods in some cases, uniplate was rewritten in lenses and got faster and with better type safety as well.