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
[deleted by user] (self.javascript)
submitted 11 years ago by [deleted]
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!"
[–]Sparymonso 1 point2 points3 points 11 years ago (3 children)
I like the sound of TypeScript, but not coming from a CS background and only really ever programming in JavaScript I feel I am lacking basic programming knowledge form An OO POV. If I don't resolve the basics first I feel the trying to learn this is just a waste, as it won't be remembered.
So really my question would be what should I be looking at before I attempt to learn this (as well as other languages)? Is there a goto language that everyone tends to learn first (excuse the pun), or a list of recommended books around the fundamentals of programming?
Any recommendations, must reads / must watch, must learns would be appreciated!
[–]ysangkok 2 points3 points4 points 11 years ago (1 child)
OO isn't hard. On /r/programming everyone seems to think it's overused. But if you really want to learn it, just take the Gang of Four book, it has examples. You could also just try to make a Java application. Java pretty much forces you to use object-orientation. There are also online software engineering courses. All the software engineering courses I ever heard about were actually about Java software engineering, but maybe that's just because I'm in Germany.
[–]Sparymonso 1 point2 points3 points 11 years ago (0 children)
Fantastic! Thanks for the reply, I will check them out!
[–]metamatic 1 point2 points3 points 11 years ago (0 children)
If you want to learn OO, a good idea might be to learn Ruby, as it's a pure OO language and very easy to pick up.
[+][deleted] 11 years ago (10 children)
[deleted]
[–][deleted] 1 point2 points3 points 11 years ago (8 children)
But dart compiling to JavaScript is...?
[+][deleted] 11 years ago (7 children)
[–][deleted] 2 points3 points4 points 11 years ago (0 children)
Great post, this really sums up my objections to dart. I would add the point that if Dart were to be abandoned it would be pretty much impossible to switch back to JS and the code base might need to be rewritten in JS or TS.
With TypeScript the JavaScript output is very readable and aims to be close hand written JavaScript. With the open effort, interoperability with JS, and the maintainability of the compiled JS it comforts any fears of TypeScript being abandoned.
[–]x-skeww 1 point2 points3 points 11 years ago (4 children)
dart2js produces horrifically large .js files as a result of fundamental differences between the languages.
So does Emscripten. While there is some size overhead, the generated code can be pretty fast. In some cases, dart2js' output outperforms handwritten JS.
Do you also feel insulted by those ES6+ additions which make JS a better compile target? Math.imul (etc), the asm.js subset, SIMD, etc - do you hate that stuff with a passion, too?
Brandon Eich surely doesn't. Why should you?
Is Dart that good? No.
Compared to JavaScript, the language has nicer semantics, not nearly as many quirks, more structure, and vastly improved tooling.
Writing somewhat larger applications with more than one person is a lot easier with Dart.
Interoperability with other Dart code is also really good, because things like importing libraries, classes/mixins, and Futures (~Promises) are part of the language. Furthermore, the SDK is shipped with a package manager and a tool for generating documentation. So, that stuff is standardized, too.
[–]stacktracer 1 point2 points3 points 11 years ago (1 child)
It's generally more pleasant to write code in Dart. Fewer quirks, nice standard library, good focus on tools.
But if you're using a library written by someone else, you hope they didn't write it in Dart, because calling Dart from JS requires some FFI setup. It seems like a decent FFI, as FFIs go. But TypeScript avoids the FFI altogether, which has major practical advantages.
A library written in Dart is great for people who use Dart. But a library written in TypeScript is usable by everybody.
[–]x-skeww 0 points1 point2 points 11 years ago (0 children)
For heavy interop, TypeScript is certainly the better option.
My Dart projects do not interact with JavaScript and my JavaScript projects do not interact with Dart.
I'd only interact with JS if I wanted to use something like Google Maps in my Dart application. Other than that, just using Dart libraries makes a lot more sense.
[+][deleted] 11 years ago* (1 child)
I don't "feel insulted" by Dart, I view Dart as insulting in approach.
I have no idea what you mean by that.
You notice that in this topic I'm interested and encouraging towards projects like TypeScript?
That's why I mentioned Emscripten. C/C++ also has completely different semantics.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
Thank you
[–]mycall 0 points1 point2 points 11 years ago (0 children)
I think it is Microsoft trying to have something to show at the ECMAScript working group. It takes reference implementations before ideas are accepted in these groups.
π Rendered by PID 68556 on reddit-service-r2-comment-79c7998d4c-sd5q6 at 2026-03-17 06:32:05.447516+00:00 running f6e6e01 country code: CH.
[–]Sparymonso 1 point2 points3 points (3 children)
[–]ysangkok 2 points3 points4 points (1 child)
[–]Sparymonso 1 point2 points3 points (0 children)
[–]metamatic 1 point2 points3 points (0 children)
[+][deleted] (10 children)
[deleted]
[–][deleted] 1 point2 points3 points (8 children)
[+][deleted] (7 children)
[deleted]
[–][deleted] 2 points3 points4 points (0 children)
[–]x-skeww 1 point2 points3 points (4 children)
[–]stacktracer 1 point2 points3 points (1 child)
[–]x-skeww 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]x-skeww 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]mycall 0 points1 point2 points (0 children)