ok i see.

Another idea which comes to my mind:
What about beeing able to specify multiple types for a parameter?

function a( p1:String || Number){
        if( p1 is String){
                
        } else if( p1 is Number){

        }
}

Looks similar to matching, probably some matching syntax is even better 
than specifying everything in the signature. On the other hand, the 
signature also serves as documentation.

function a( p1:Match){
        switchMatch( p1){
        case String:
                break;
        case Number:
                break;
        }
}

Cheers,
Ralf.


Nicolas Cannasse wrote:

>>Also what about something like adhoc interfaces?
> 
> 
> Adhoc subtyping a little more complex to type but still easy so it could 
> possibly be implemented. However I might not add it right now since it will 
> then be difficult to have for example "instanceof" works correctly. Also, it 
> might not pass the subtype runtime checks done by AVM2.
> 
> Nicolas 
> 
> 
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to