Taka,

When you're done building your Straw Man, you let me know and I'll happily continue the discussion with you.

Cheers,
Steven


Taka Kojima wrote:
Writing readable code > writing less code.

That is what it comes down to. Most coders can understand both of the
following:

if(myObj){;}

and

if(myObj != null){;}

I would opt for the latter method always, as otherwise you are relying on
renderer specific logic to handle the conversion, as opposed to explicit
conversion.

I have actually spent an hr trying to debug an IE specific JS error, only to
find that even though implicit type conversion was working in other
browsers, it was throwing an error in a specific version of IE.

By your argument of less code > more code, this:

public function outputList():*{;}

would be better than

public function outputList():Array{;}

and AS2 would be better than AS3 on the whole basis that you didn't have to
typecast anything.

Just because a certain environment can convert types for you, doesn't mean
that you shouldn't typecast or not hint as to their object type in your
code.

Personally, I can type faster than I can think in code. I type really fast,
and I think code really fast, and typing out the extra 10 characters doesn't
hinder my productivity, it probably enhances it.

If you want to take the implicit convesion route, by all means I am not
going to stop you or object. However, I do and will always believe that it
is better for other people reading/working on your code that you do spell it
all out, use line breaks when it makes sense, and typecast all your
variables.

I think Dave's point was that you seemed rather authoritative, and this is
really a subjective matter.

- Taka
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to