Typing a function like
public function send(value:*): void{}
removes auto-completion in the IDE and type-safety during compilation.
Furthermore if you want to code it out
you better throw an exception creating potential error-prone code. Also
the if checks for the type cost performance.
yours
Martin.
On 17/01/2012 00:09, David Arno wrote:
From: Nicholas Kwiatkowski [mailto:nicho...@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.