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
Consider the executable capsule program seen below.
It uses an @Future procedure. When a compilation unit both declares an @Future procedure and also uses an @Future procedure, that compilation unit will likely need to use two types both named Future
java.util.concurrent.Future
org.paninij.lang.Future
However, because both of these types are named future, they cannot both be imported. Thus, the author of the code needs to decide which of these two types they need to fully qualify. (In the are fully qualified.)
This is rather awkward, and is likely to be confusing to some programmers.
We should probably rename @Future to prevent this common understandable naming conflict. (Alternatively, we could choose to use our own future type, something other than java.util.concurrent.Future, but I prefer the former.) Unless I am mistaken, I think that we can't use a type as both an annotation and a "normal" Java interface type.
Consider the executable capsule program seen below.
It uses an
@Future
procedure. When a compilation unit both declares an@Future
procedure and also uses an@Future
procedure, that compilation unit will likely need to use two types both namedFuture
java.util.concurrent.Future
org.paninij.lang.Future
However, because both of these types are named future, they cannot both be imported. Thus, the author of the code needs to decide which of these two types they need to fully qualify. (In the are fully qualified.)
This is rather awkward, and is likely to be confusing to some programmers.
We should probably rename
@Future
to prevent this common understandable naming conflict. (Alternatively, we could choose to use our own future type, something other thanjava.util.concurrent.Future
, but I prefer the former.) Unless I am mistaken, I think that we can't use a type as both an annotation and a "normal" Java interface type.The text was updated successfully, but these errors were encountered: