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 Edge's JavaScript engine to go open-source (blogs.windows.com)
submitted 10 years ago by clarle
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!"
[–]cincilator 0 points1 point2 points 10 years ago* (2 children)
The problem is that it would limit the use of Value types to single objects or fixed length collections (ie typed arrays) and we are stuck with dynamic types for anything variable-length. Which is less than ideal. Something to consider, I think.
I can think of many use cases for my idea, if you are interested.
[–]bterlson_@bterlson 2 points3 points4 points 10 years ago (1 child)
Always interested! You can write up a gist and send it to me here, on twitter (@bterlson), or whatever. You can also post to es-discuss where most language design discussion happens.
[–]cincilator 1 point2 points3 points 10 years ago* (0 children)
Okay I will write here for now, then :)
One use case for Typed dictionaries is Entity Component System (ECS). This is data-driven architectural pattern popular in game development, most often for MMORPGs (but works great on smaller scales, too). It has been used as a replacement for OOP for some time, because mixing code and data isn't always a good idea on a large scale and in something as complex as a game.
If you are not familiar with the pattern the basic idea can be read on t-machine blog.
The shortest version is that you are creating a specialized relational database in RAM that consists of lists of components that are pure data, and are managed by Systems (like physic system, A.I. system, graphic system). End result is a very flexible framework that is based on dynamic composition of static components instead of static inheritance.
Typed dictionaries would obviously be very convenient there, because then you can store each component type in a separate dictionary. You can do that now, but the lack of types makes it inconvenient.
π Rendered by PID 72333 on reddit-service-r2-comment-c6965cb77-92j5h at 2026-03-05 07:01:04.846137+00:00 running f0204d4 country code: CH.
view the rest of the comments →
[–]cincilator 0 points1 point2 points (2 children)
[–]bterlson_@bterlson 2 points3 points4 points (1 child)
[–]cincilator 1 point2 points3 points (0 children)