Giter VIP home page Giter VIP logo

Comments (6)

varon avatar varon commented on June 2, 2024 2

Typically you'd use the operators for this instead.

from aether.

et1975 avatar et1975 commented on June 2, 2024 1

As long as we are throwing personal preferences in, I'm the opposite - I prefer explicit module names, especially when the chance of name collision is high and Lens and Prism would typically be used in the same context.
For personal preferences auto-opened Prelude in your project file is the way to go. That would be ideal place to alias functions you want into an auto-opened module.

from aether.

varon avatar varon commented on June 2, 2024 1

@cmeeren - the entire way Aether is written, even down to the type level is designed to be maximally flexible and compatible.

In general, qualified access serves as a stopgap measure in the absence of proper HKT support, much like List, Set and Map do.

The library (in general) tries to provide some conventions on how to do things; with the operators offering very decent syntax for most tasks. if you'd like to write your own get/set functions, they're incredibly trivial to do in your own prelude.

from aether.

cmeeren avatar cmeeren commented on June 2, 2024

Can you do x |> set a_ "a" |> set b_ "b" |> ... with operators?

In any case, I often prefer functions over custom operators for legibility reasons, and it's nice to have the option. 😊 Particularly since The change is trivial.

from aether.

cmeeren avatar cmeeren commented on June 2, 2024

Sure, but removing RequireQualifiedAccessAttribute doesn't change anything for you or other users who prefer explicit module names. It's a tiny and fully backwards compatible change that doesn't impact anyone except those that choose to make use of it. It makes Aether more flexible without adding any maintenance burden or impacting those who aren't interested.

from aether.

cmeeren avatar cmeeren commented on June 2, 2024

stopgap measure

Against what, would be my question. I don't see the harm in allowing the module to be opened. It won't impact anyone except those users who deliberately try to do it.

much like List, Set and Map do.

I don't think it's a fair comparison; those modules (and Option, Array, etc.) contain a lot of functions, many of which have the same names (since they're all functors/monads/etc.). Optic contains get, map, and set (and hopefully over at some point, #57).

and Lens and Prism would typically be used in the same context.

This issue is only about Optic, not Lens and Prism.


In any case, though I stand by my position that this would be a convenience, it's a fairly minor one (as you point out), and not something I personally feel is worth further discussion. Feel free to close. 🙂

from aether.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.