maralorn, (edited )
@maralorn@chaos.social avatar

After extensively using the library for half a year at work I have now played around with the library again. I am amazed by how much more helpful error messages are with . It’s an amazing library and I would recommend it over whenever you have the choice.

pmidden,
@pmidden@fosstodon.org avatar

@maralorn any noticeable downsides to optics?

maralorn,
@maralorn@chaos.social avatar

@pmidden Well, they compose with % instead of . which you might find less pretty.

They use an opaque type for optics which is the big selling point but also means you need to depend on optics-core to define compatible optics.

I remember missing one operator from which I found to be quite cool, but I don’t remember which one, so it can’t be that important.

mangoiv,
@mangoiv@functional.cafe avatar

@maralorn @pmidden how’s the “abuse of type system” lock in? I imagine it’s what you’re talking about with the “depend on optics-core”?

maralorn,
@maralorn@chaos.social avatar

@mangoiv I do not know what you mean. You need to depend on optics-core to provide lenses usable with the library, just because the type of those optics is not a type alias like it is in lens.

mangoiv, (edited )
@mangoiv@functional.cafe avatar

@maralorn yuh I just mean like often, when you have a heavy type directed eDSL, they’re optimised for a specific purpose. That means it adds a significant amount of churn if you want to do anything yourself. One example of that is polysemy. Another one is squeal-postgresql

maralorn,
@maralorn@chaos.social avatar

@mangoiv Hasn’t been my impression with yet. To me it feels like the type level stuff is "finished". As long as you only define and use existing types of optics you don’t need to worry about it.

mangoiv,
@mangoiv@functional.cafe avatar

@maralorn sounds really good! I think I might actually wanna try them at work.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • kavyap
  • thenastyranch
  • ethstaker
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • Youngstown
  • everett
  • mdbf
  • slotface
  • ngwrru68w68
  • rosin
  • Durango
  • JUstTest
  • InstantRegret
  • GTA5RPClips
  • tester
  • cubers
  • cisconetworking
  • normalnudes
  • khanakhh
  • modclub
  • anitta
  • Leos
  • megavids
  • provamag3
  • lostlight
  • All magazines