incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Kwiatkowski <nicho...@spoon.as>
Subject Re: AS3 Enhancements: method overloading. Why do people want this?
Date Mon, 16 Jan 2012 15:27:37 GMT
Sure -- but you would remove compile-time checking and optimization, which
has some performance impacts (this moves the object type checks to runtime,
vs. compile time, at a performance determent).  That would
move convenience over performance, where if you allow overloading, the two
would be equal.

I'm not saying we would be able to accomplish anything we can't today --
but it would be much more convenient for some to have it available as a
resource.

-Nick

On Mon, Jan 16, 2012 at 10:09 AM, David Arno <david@davidarno.org> wrote:

> > From: Nicholas Kwiatkowski [mailto:nicholas@spoon.as]
> > Sent: 16 January 2012 15:02
>
> > public function sendAsString(stringToSend:String):bool
> > public function sendAsBool(boolToSend:Boolean):bool
> > public function sendAsArray(arrayToSend:Array):bool
> > public function sendAsInt(intToSend:int):bool ...
>
> Could you not just have:
>
> public function send(value:*):Boolean
>
> instead?
>
> David.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message