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
As of #102 defaults are type checked. This is a side effect of a fix to type check after applying a default. It's probably a waste of CPU to type check constant defaults at runtime.
Type check constant defaults at compile time only.
When compiled, the default for $place would be type checked because it is a constant. When run as hello()$place would not be type checked as it is using a constant default. $greeting would be type checked as it is using a computed default. If arguments are passed in for either $place or $greeting they will be type checked.
PPI can probably be used to determine if a default is a constant. Be conservative, it is better to not recognize a complicated constant than to think a computed default is constant.
The text was updated successfully, but these errors were encountered:
As of #102 defaults are type checked. This is a side effect of a fix to type check after applying a default. It's probably a waste of CPU to type check constant defaults at runtime.
For example.
When compiled, the default for
$place
would be type checked because it is a constant. When run ashello()
$place
would not be type checked as it is using a constant default.$greeting
would be type checked as it is using a computed default. If arguments are passed in for either$place
or$greeting
they will be type checked.PPI can probably be used to determine if a default is a constant. Be conservative, it is better to not recognize a complicated constant than to think a computed default is constant.
The text was updated successfully, but these errors were encountered: