You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a purely front-end proposal for possibly adding type inference to Filament. This would allow the user to write programs without directly specifying their timing, Initially, we can just eliminate the requirement for providing events.
This should be relatively simple to implement, but does have a few interesting questions on the backend side.
Instances and Invocations?
I think the best way to go here is to allow instances and invocations just the same. This means however that if the user invokes a component twice, the compiler would still have to infer a non-intersecting timing for reuse.
Another idea is to allow the compiler to infer reuse, which we could do using a component level attribute flag. In this case, we might turn every invocation into an instantiation, or instead only allow the compiler to combine instantiations, not create new ones.
Partially type inferenced components
This representation allows for some invocations to be type inferenced, while others can still be explicitly described. Not sure how this feature would be useful, but we could use these explicit invocations to further constrain the compiler.
Enable/Disable?
For safety, I think it would be nice to maybe have an attribute like type_inference or something that needs to be set, so that the user has to explicitly ask for this feature. Not sure if this is necessary though.
As this is simply a frontend proposal, we can implement it for now and simply have the compiler throw an error when the the user attempts to use it.
The text was updated successfully, but these errors were encountered:
This is a purely front-end proposal for possibly adding type inference to Filament. This would allow the user to write programs without directly specifying their timing, Initially, we can just eliminate the requirement for providing events.
This should be relatively simple to implement, but does have a few interesting questions on the backend side.
type_inference
or something that needs to be set, so that the user has to explicitly ask for this feature. Not sure if this is necessary though.As this is simply a frontend proposal, we can implement it for now and simply have the compiler throw an error when the the user attempts to use it.
The text was updated successfully, but these errors were encountered: