flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: git commit: [flex-asjs] [refs/heads/develop] - Uploads are assumed to be POST
Date Tue, 11 Jul 2017 09:29:22 GMT
This is worthy of a discussion.

As it stands now, use of constants result in more JS code after compiled. It’s possible
that this can be optimized, but currently the most efficient JS code is produced if using
string literals rather than constants. (The Google compiler created variables for string literals
used more than once.)

My preference would be to try to stick to string literals in Framework code. This has two
advantages:
1. There’s no calls to constants in the compiled code so we save bytes.
2. The constant classes are not required, so they are not included in the compiled code unless
client code uses them.

As long as we’re careful to use the correct strings, this should not be an issue. If the
strings are complex and/or subject to change, then they should be declared once and constants
should be used. Otherwise, I think the advantages of using string literals outweigh the “correctness”
of using constants.

Thanks,
Harbs

> On Jul 11, 2017, at 11:46 AM, piotrz <piotrzarzycki21@gmail.com> wrote:
> 
> I just think that we should use const whenever we can, but won't fight for
> that if no one think similar. :) If I found such code around my interest my
> natural move would be change it :)
> 
> Piotr
> 
> 
> 
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-develop-Uploads-are-assumed-to-be-POST-tp63070p63078.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.


Mime
View raw message