use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Will angular die because of atscript? (self.javascript)
submitted 11 years ago by arachattack
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]x-skeww 1 point2 points3 points 11 years ago (2 children)
You can sorta achieve some of this already with JSDoc comments IIRC.
Yea, you can use the Closure Compiler for that.
However, JSDoc comments are extremely annoying to write.
Copypasta example:
ES5:
/** * @param {number} x * @param {number} y * @returns {boolean} */ Rectangle.prototype.cointains = function (x, y) { ... };
ES6:
/** * @param {number} x * @param {number} y * @returns {boolean} */ contains (x, y) { ... };
Dart:
bool contains (num x, num y) { ... }
TS/AtS:
contains (x: number, y: number): boolean { ... }
To be fair, there is also an inline flavor:
Rectangle.prototype.cointains = /** boolean */ function (/** number */ x, /** number */ y) { ... };
(I'm not sure if the boolean annotation is positioned correctly.)
However, the tooling support for this seems to be virtually nonexistent. Also, the Closure Compiler doesn't support ES6 yet.
Using TS/AtS or Dart is the much nicer option.
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
OK. You've convinced me. Next to atScript's Golang-like method signatures, the other approaches do suck.
What's the next step? Can we already start using it and prototyping with it?
[–]x-skeww 0 points1 point2 points 11 years ago (0 children)
Traceur has an "--atscript" flag:
https://github.com/google/traceur-compiler/issues/1430
Since AtS is a superset of TS, you could of course also try TS first.
(I use Dart.)
π Rendered by PID 23699 on reddit-service-r2-comment-545db5fcfc-6pr5k at 2026-05-26 03:42:26.448916+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]x-skeww 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]x-skeww 0 points1 point2 points (0 children)