-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Fable compatibility #36
Conversation
# Conflicts: # .gitignore
* byref -> ref (bad for dotnet) * dirty tracking needs "kind" (as in aardvark.web)
* IAdaptiveObject sadly needs a mutable tag now * due to the lack of typeof<'T> in Fable we need some kind of tags * the implementation is a bit hacky but seems to work (see Demo/Fable)
* replaced all creations of Dictionary/HashSet with Unchecked implementation * working on fable too
everything working now 🤘 |
This is amazing. I've never worked on a library that has both .NET and Fable support, including CI. The future is here! |
Just a note here: I think it's pretty shortsighted and discriminative to litter general-purpose libraries with code that works around shortcomings of any particular transpiler. I have the same observation about Elmish. |
So what's your suggestion then? I personally think that the necessary changes are managable and therefore decided to do it the way I did. |
It is your responsibility as a library author to decide, but right now this makes it a definite no-go for me. You are also using an Your opinion is that Fable "has become an important F# compiler" is more of an indication that you haven't looked at other alternatives. WebSharper, for instance, would not require littering up the code base with silly special cases, all you need is providing the necessary proxies in a separate add-on library. This is a sensitive topic, because you are obviously targeting web applications but you are doing it without doing due diligence on what exists already and without consulting with other library authors who are affected. And as they say, that's a pretty unfriendly way of doing things. WebSharper.UI (and maybe others) are available for an alternative web ecosystem. Say, if that was made to work outside the web as well, would you or any Fable user mind calling it The namespace and due diligence aside, you are already maintaining two versions of the code, and I don't see how anyone can think that's an acceptable solution here - just look at mess that had to be merged to make that happen. If you care about Fable support so much, you should consider renaming this library to reflect that. |
Let's break this discussion into pieces. First, I refer people to the library design guidelines. These are potentially dated, we can discuss, review and adjust. On the question of On the question of naming - I am confident the library falls within the guidelines, which have always sought to balance the need for good naming with the need for positive innovation. This is based on:
I can see the case under the guidelines for potentially calling this "FSharp.Data.Adaptive.Experimental" though that's only a "Consider" guideline. (If the "Experimental" is not added then there is really an obligation on myself and @krauthaufen to abandon and delete the use of the FSharp.Data.Adaptive namespace with a 0.0.x version sequence for this library should the library development stop at some point.) With regard to parts of WebSharper.UI - it is very reasonable to propose moving parts of WebSharper.UI into a separate library in the FSharp namespace. I am not familiar enough with the components to make that call, but if you'd like to propose it I'm open to suggestions or just go ahead and prototype within the guidelines above. |
I just commented on those proposed new guidelines you added, and will move further comments there as the discussion unfolds. The namespace issue you expanded on above to me is governed by this guideline, however:
|
Yes, I know - though see also the next guideline about "incubation and experimentation". When we wrote these we knew there was a tension these two and they need to be considered in balance. As I mentioned, I understand your concern but in balance I'm ok with proceeding. If the library stagnates, is incomplete or doesn't get used we should rename or delete it. That's not really covered by any existing process - we probably need to pay a full time cleaner! There's history with parts of The really hard thing is when there are several plausible designs to core libraries that perform essentially the same role and can't be reconciled. Map/Set implementations are like this, as are "batteries included" libraries. Another huge problem is |
Hey there, For me it is just not really important that this library is called FSharp.Data.Adaptive and I would also be okay with just calling it FsAdaptive or something alike if that resolves any concerns... Regarding completeness and stability I want to mention that most of the code comes from Aardvark.Base.Incremental which evolved over several years now and is also quite battle-tested in real-world applications. Furthermore there are pretty sophisticated tests in the repo validating against a reference-implementation. The major design choice here is that the system uses lazy evaluation and arguably one could implement a similar system with eager evaluation, so maybe a |
PR for fable branch. (#32)
Most things are working and there's a super-simple demo in
src/Demo/Fable
that can be started viabuild -t WatchFable
(watcher on localhost:8080)Remaining problems:
AbstractDirtyReader<'T>
can't type-test for'T
so some kind of Kind for AdaptiveObjects will be needed.Dictionary/HashSet
most likely not hash-based, so caches may be broken