-
Notifications
You must be signed in to change notification settings - Fork 5
Automate control generation #2
Comments
@TimLariviere This work to generalize the bindings is amazing!
What's the root cause for the differences in efficiency? Is it that the creation of the ViewElement property bags just ends up less efficient? |
@TimLariviere Thank you for the follow-up, indeed the generator looks very clean! I will need to dive into it to see whether it will be applicable for simple elements because sometimes I want to customize extension methods into the property items (see Util.fs) which is not applicable to all elements and since the elements API is reasonably stable, I am not sure if I really need it.
I would rather go for option 1 (with or without the generator) to keep the library backwards-compatible with what already exists in the core of Fabulous
In theory it might be less efficient because of the intermediate steps, boxing and unboxing values etc. but in practice it does not really matter (I need numbers or user cases). |
@dsyme No, ViewElement is fine. I meant avoiding to reuse the View DSL of Fabulous.
@Zaid-Ajaj I agree the impacts will be low, but some platforms are quite sensitive to this, like Android. But for now, I think it's fine to continue the same way fabulous-simple-elements does. |
It took a few months, but the Fabulous generator has finally been rewritten and is now easily customizable. :)
By forking the generator and reusing the JSON bindings file, there's 2 options:
https://github.com/fsprojects/Fabulous/blob/master/tools/Generator/CodeGenerator.fs
The text was updated successfully, but these errors were encountered: