Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Is this production-ready? #3

Open
3noch opened this issue Mar 22, 2018 · 7 comments
Open

Is this production-ready? #3

3noch opened this issue Mar 22, 2018 · 7 comments

Comments

@3noch
Copy link

3noch commented Mar 22, 2018

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

@chshersh
Copy link

I would also like to see comparison with microlens.

@mrkgnao
Copy link
Collaborator

mrkgnao commented Apr 5, 2018

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.

@3noch
Copy link
Author

3noch commented Apr 5, 2018

What about performance?

@chshersh
Copy link

chshersh commented Apr 5, 2018

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

@RobertFischer
Copy link

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.

@anchpop
Copy link

anchpop commented Sep 30, 2018

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

@3noch
Copy link
Author

3noch commented Sep 30, 2018

@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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants