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
Optional types is a great idea, but for those of us who want to use types everywhere it would be nice to have an option to let Dart ensure that they really are used everywhere.
It is easy to forget adding a type somewhere. In that case I may think the program is type-correct (no warnings or errors in checked mode), because I thought I added types to everything, but it really isn't.
As it is now, if you forget a type somewhere even with "Checked mode" activated on the Dartboard there are no warnings about missing types.
Concrete example:
main(){}
int someFunc(var strX)
{
int y = strX - 1;
return y;
}
If I choose to have Dart force types (either through warnings or errors as in checked mode), Dart should warn me there is no type on strX. I would then add a type on strX (String) and get the type warning/error on the subtraction operation.
The text was updated successfully, but these errors were encountered:
This issue was originally filed by [email protected]
Optional types is a great idea, but for those of us who want to use types everywhere it would be nice to have an option to let Dart ensure that they really are used everywhere.
It is easy to forget adding a type somewhere. In that case I may think the program is type-correct (no warnings or errors in checked mode), because I thought I added types to everything, but it really isn't.
As it is now, if you forget a type somewhere even with "Checked mode" activated on the Dartboard there are no warnings about missing types.
Concrete example:
main(){}
int someFunc(var strX)
{
int y = strX - 1;
return y;
}
If I choose to have Dart force types (either through warnings or errors as in checked mode), Dart should warn me there is no type on strX. I would then add a type on strX (String) and get the type warning/error on the subtraction operation.
The text was updated successfully, but these errors were encountered: