silica icon indicating copy to clipboard operation
silica copied to clipboard

Is this production-ready?

Open 3noch opened this issue 7 years ago • 7 comments
trafficstars

Could someone use this instead of lens? Are there downsides?

3noch avatar Mar 22 '18 17:03 3noch

I would also like to see comparison with microlens.

chshersh avatar Mar 23 '18 14:03 chshersh

Yes, you should be able to drop this in as a replacement for lens once it's done, since I'm changing as little of the API as I can, but, no, it isn't feature-complete yet. Once it is done, it should be exactly equal in power to lens since that's what I'm porting. (So, for any comparisons with microlens, just compare it to lens.)

Downsides:

  • existing -lens libraries (e.g. lens-aeson) will have to be ported. This is pretty easy: any provided lenses will just have to be wrapped in the fromRaw* functions:
-import Control.Lens
+import Silica

foo :: Lens' Foo Bar
-foo = whatever
+foo = fromRawLens whatever

fromRawLens has the type R_Lens s t a b -> Lens s t a b, where R_Lens is the type that lens provides.

mrkgnao avatar Apr 05 '18 02:04 mrkgnao

What about performance?

3noch avatar Apr 05 '18 03:04 3noch

Maybe inspection-testing library can help with ensuring good performance...

chshersh avatar Apr 05 '18 09:04 chshersh

When you're asking about performance, it's important to specify what performance you're talking about. If you're talking about the performance of developers' efficiency in producing working and adaptable code, then this library is already leaps and bounds beyond lens.

RobertFischer avatar May 20 '18 21:05 RobertFischer

I would be very interested in using this, so it would be nice if it were updated to support newer versions of GHC.

anchpop avatar Sep 30 '18 17:09 anchpop

@RobertFischer I've not actually had any significant trouble using lens as is when it comes to developer productivity. But I would definitely prefer a more beginner friendly tool if it doesn't degrade other aspects of my code (namely, run-time performance).

3noch avatar Sep 30 '18 19:09 3noch