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
We should implement casting operations. The suggested syntax is:
x = Type(value);
There are some ideas of implementations of that:
Internally on init() (where we have addMethod()) we could have:
addCast(CLEVER_INT, method_int_cast_name); // Method that casts an Int to the current type
addCast(CLEVER_STR, method_str_cast_name); // Same with String
...
User classes (we could replace @ with cast):
class Foo {
function @Int(x) {
}
// ... or
cast std:collection:Set(x) {
}
}
What do you think?
The text was updated successfully, but these errors were encountered:
We should implement casting operations. The suggested syntax is:
There are some ideas of implementations of that:
init()
(where we haveaddMethod()
) we could have:What do you think?
The text was updated successfully, but these errors were encountered: