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
I think in general we should use a model of allowing anti-patterns, but warning. In this case the anti-pattern is defining very large numbers of functions and types in a single FTL module.
So instead of preventing types from subpackages:
eg.
unsupported type ftl/foo/bar.Currency from subpackage
Instead, we'd allow this but warn if the number of types/functions defined is over a certain threshold. Of course, due to the single namespace in FTL we would not be able to allow the same type name across multiple subpackages (eg. foo/bar/Currency and foo/waz.Currency), as that will result in an error.
The text was updated successfully, but these errors were encountered:
alecthomas
changed the title
Remove restriction on defining verbs/types only in root package
Remove restriction on defining verbs/types in subpackages
May 21, 2024
I think in general we should use a model of allowing anti-patterns, but warning. In this case the anti-pattern is defining very large numbers of functions and types in a single FTL module.
So instead of preventing types from subpackages:
eg.
Instead, we'd allow this but warn if the number of types/functions defined is over a certain threshold. Of course, due to the single namespace in FTL we would not be able to allow the same type name across multiple subpackages (eg.
foo/bar/Currency
andfoo/waz.Currency
), as that will result in an error.The text was updated successfully, but these errors were encountered: