Again, I have no real issue with one way or the other, people have their
preferences, you can't force all programmers to write code in the same way.

Regarding your link:
http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions#CodingConventions-Expressions

"Some of these standards are completely arbitrary, since there is not always
a “best way” to code. Nevertheless, in the interest of consistency, all
commits to the Flex SDK project will be expected to follow these
conventions."

I'm all for consistency, so if you're developing flex framework components,
by all means stick to the conventions. Otherwise, the conventions within a
given environment are all going to be different. We do have a conventions
doc at my work that we all agreed on as a whole, and it works quite well,
all of the code in our framework and components is very consistent.

I, for one take pride in having extremely readable and manageable code, this
is mainly due to me having to take on other people's work countless times
when it was a complete mess. I'm not trying to say that I code better than
anybody else, or that the approach I take, or syntax I use is even correct,
but it works and I've only gotten compliments on having clean, easy to read
code, and never gotten any negative remarks or comments about how I code.

And this is also not to say that I don't use the less code method at all. I
definitely use ternary operators and I always try to consolidate code, but
if it affects the readability to a certain point, I will rewrite it to make
it clearer.

- Taka


On Tue, Aug 18, 2009 at 8:48 PM, Taka Kojima <gigaf...@gmail.com> wrote:

I didn't understand your analogy at all.
>
> ------------------------------
> Steven Sacks wrote:
>
> 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
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to