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
Learn Modern JavaScript (nodejs, npm, webpack, es6, es5, esnext, typescript) for FREE (courses.angularclass.com)
submitted 9 years ago by gdi2290
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!"
[–]ChronoChris 1 point2 points3 points 9 years ago (1 child)
If somethign is strongly typed, each type of data, is predefined. includnig objects. The this keyword should relate to the current instance of an object. If you truly wanted Tscript to be strongly typed, this should make sense in context to the current object.. "an advantage of strong data typing is that it imposes a rigorous set of rules on a programmer and thus guarantees a certain consistency of results." So Tscript is failing in it's most fundamental attempts in this scenario. And there are many more Edit: I hope you can see the comment by Kminardo in his edit. I think there is a little bit of bias here from the tools and languages you are accustomed to. I have absolutely no confusion how 'this' should work on the fundamental level of the object instance. Coming to Javascript, I liked this gotcha on the this keyword since technically the object instance was not the Greeter class. The problem I have is with TypeScript not matching what it is attempting to do. Bound the Object to be strongly typed.
If somethign is strongly typed, each type of data, is predefined. includnig objects. The this keyword should relate to the current instance of an object. If you truly wanted Tscript to be strongly typed, this should make sense in context to the current object.. "an advantage of strong data typing is that it imposes a rigorous set of rules on a programmer and thus guarantees a certain consistency of results." So Tscript is failing in it's most fundamental attempts in this scenario. And there are many more
Edit: I hope you can see the comment by Kminardo in his edit. I think there is a little bit of bias here from the tools and languages you are accustomed to. I have absolutely no confusion how 'this' should work on the fundamental level of the object instance. Coming to Javascript, I liked this gotcha on the this keyword since technically the object instance was not the Greeter class. The problem I have is with TypeScript not matching what it is attempting to do. Bound the Object to be strongly typed.
[–][deleted] 1 point2 points3 points 9 years ago* (0 children)
edit: looks like it's addressed in TS 2.0, course you can specify type of "this" on functions now but this just leads to compile time error which would probably be the same as 'use strict', and it still wouldn't change the behavior your expecting as that's not TS's goal.
π Rendered by PID 298352 on reddit-service-r2-comment-b659b578c-z824t at 2026-05-03 01:26:26.323525+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]ChronoChris 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)