Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Deprecate comment blocks and use has.js #2133

Closed
ibolmo opened this Issue · 3 comments

2 participants

@ibolmo
Owner

If we use has.js we can deprecate comment blocks.

From

/*<1.2compat>*/
deadCode();
/*</1.2compat>*/

To

/*<1.2compat>*/
if (has('1.2compat')){
  deadCode();
}
/*</1.2compat>*/

Benefits

  1. Testing against compatibility (and other dead code branches) can (finally) be programmatic.
  2. UglifyJS and other compilers that support dead code removal will take advantage.
@arian
Owner

It wouldn't be too difficult to use and it's probably a good idea.
For this we would need a 1.5, because it would break the comment blocks for those who are using it and it wouldn't be backward compatible.

@ibolmo
Owner

Well, we'd have to keep the comment blocks as I mentioned in the issue description to keep 'em. This way we could release it in 1.4.2, instead of waiting for 1.5.

@ibolmo
Owner

As a note, this also implies work on the website.

@ibolmo ibolmo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.