Skip to content

Take Sutil towards the Svelte experience #96

@joshushmaximus

Description

@joshushmaximus

Opening an issue to discuss/document this idea further:

I would love to see how far the Fable compiler plugins could take Sutil towards the Svelte experience - by which I mean no "Bind.el" or "disposeOnUnmount" boilerplate that we currently have in Sutil. Svelte does all this for you
[via: https://x.com/DaveDawkins/status/1850538811442229667]

I personally am not familiar with fable (or really f# that much tbh).
I get what you're saying that if you could analyze the code being generated at the right stage (what stage?), you could automatically generate more code and reduce the burder on the user. Svelte is already a compiler and so it does this, to do the same you'd have to extend fable somehow to be able to generate more AST nodes for these things that eventually need to be bind.el-d?

Is it like this?

sutil -> fable -> html/ts

and if we do this

sutil -> [bind-identification-and-emitter] fable -> html/ts

then the sutil part becomes more like svelte (and also just simpler).

Can you expound on this further?

Recommended approach?

Best fable plugin documentation? (here is what i found, first seemed most applicable to this task)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions