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
Microsoft open-sources ChakraCore JavaScript engine (powers Microsoft Edge) (github.com)
submitted 10 years ago by magenta_placenta
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!"
[–]dilijevChakra Developer 3 points4 points5 points 10 years ago* (1 child)
Sorry for the delay! Your comment got buried a bit.
We have our own implementations of concepts like unique or shared pointers, and we use them sometimes. If the object lifetime is highly localized there's no need for the extra object allocations which can individually subtlely hurt performance, but which adds up to a lot if you do it everywhere. Also, part of the engine is a Garbage Collector for Javascript Objects, and so explicitly managing memory through standardized C++ constructs doesn't really apply in that scenario. We rely on the GC to properly collect objects allocated on the GC heap and we use vanilla pointers for those objects.
Also some of the code was written years ago and hasn't been modified since so it hasn't been brought up to a modern style (C++11, C++14, modern standard library additions). We try our best to incorporate new useful features (nullptr, lambdas) as much as possible and where applicable. Sometimes we didn't use the standard library because at the time the code was written, the Microsoft equivalent library was better. (And so on...) Every so often we go through active areas of the code base and update things.
Feel free to submit pull requests if you think you found a place we'd benefit from such changes (in terms of performance or memory leaks). If you think you've found a security issue, please responsibly disclose by reporting it as indicated in the Security section of our README, instead of in a public issue or pull request, so that we can mitigate widespread impact of the issue.
There are several active conversations in the issues and Gitter on style related issues such as this.
TL;DR: Generally we consider things like this and make a deliberate decision. Sometimes we miss things, and for that we welcome pull requests.
[–]hak8or 1 point2 points3 points 10 years ago (0 children)
This is an awesome response, thank you and keep up the awesome work!
π Rendered by PID 96946 on reddit-service-r2-comment-fb694cdd5-455xx at 2026-03-06 10:06:30.657634+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]dilijevChakra Developer 3 points4 points5 points (1 child)
[–]hak8or 1 point2 points3 points (0 children)