Giter VIP home page Giter VIP logo

Comments (4)

dzmitry-lahoda avatar dzmitry-lahoda commented on September 27, 2024

Lenses seems are hard as many relevant topics emerge:

  • immutability and Dispose (custom X Dispose() with X X.Using(), not void Dispose() using(x){}). I.e. other mechanisms for memory management inside immutable tree (e.g. reference counting for some cache/pool/native pointers/ kernel handles/ file handles/ etc), not GC. These infect whole tree, mutable inside immutable?
  • if have object tree better have it structural equality out of box for all of it.
  • can tree use Ref wrappers around value tuples, around readonly structs? ref returns of structs from immutable tree? Stack only tree and it lenses (infinite loop handling evens and changing readonly struct stored on stack?
  • default values not set? Options?
  • could we have expression based lenses - allows for clever dependencies tracking, merge, diff, updates. see also https://github.com/louthy/language-ext/blob/e385e64c8c025b606640e4631c53d63bf27c2a58/LanguageExt.Core/DataTypes/Patch/Edit.cs
  • how to notify about update our of immutable tree to show changes in UI (lenses with notify property changed)?
  • Clone lense - sub tree or whole? Custom View onto immutable tree? View with custom lenses?
  • when I balance tree, what API is best for less typing and less breaks when changing lenses?
  • experience of F# lenses? https://xyncro.tech/aether/
  • performance, tests, documentation

I.e. what is basic lens API? Not sure that interface ILens<T, P> is best or good one or enough for real world.

10 man days work to get it to be known:)

from imtools.

dzmitry-lahoda avatar dzmitry-lahoda commented on September 27, 2024

I wrote down the case when generic struct interfaces with unmanaged constrains and inlining via attribute and all possible in and ref with zero GC do work in C# and beat internal calls to CLR (C++ methods).

Also I tasks and tuples and other patters get double (class and struct semantics).

So should unions be structs and passed by ref? Should be 2 kinds of interfaces?

So yet another open question at least for me.

Another question how to pass equality compares. In immutable stuff comparing becomes more usable and more important. May be it is time in .NET for next design https://github.com/qbit86/misnomer#misnomerfictionary ?

from imtools.

dadhi avatar dadhi commented on September 27, 2024

Here is another experiment:
dotnet/corefxlab#2458

Funny thing, that this PR is close to approval to namespace Microsoft.Collections.Extensions.

from imtools.

dadhi avatar dadhi commented on September 27, 2024

Not now or maybe ImTools is not a good place for that.

from imtools.

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.