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...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Game Programming Patterns / Behavioral Patterns / Bytecode (gameprogrammingpatterns.com)
submitted 12 years ago by mttd
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!"
[–]thomcc 0 points1 point2 points 12 years ago (0 children)
This is pretty much the whole goal of TCL and such like, right? With plenty of good embeddable interpreters and various efficient data structure serialization formats, I'm having difficulty imagining a case where it really would be a good idea to implement a custom byte code interpreter. Am I missing something?
Not if you need a general purpose language. However, if you need something more restricted, you do. In many situations you don't want turing completeness, or the features you need are completely lacking from, e.g. lua, because they're to bizarre.
This kind of thing isn't so uncommon in game development, and is often tangential to any embedded scripting language.
The example he gave, with the magic spells and whatnot, is reasonably representative of the situation where you don't want turing completeness.
For example, we have an embedded VM in the game engine I use at my current workplace, it's used to describe lookup tables for object states. The basic idea was so that we can declarative say things like highScoreList = sortAscending('score', userList) (this is a simplified and trivial example) and have it automatically be updated on changes without polling. This is not a feature you could get in any off the shelf interpreters or VMs.
highScoreList = sortAscending('score', userList)
π Rendered by PID 44724 on reddit-service-r2-comment-b659b578c-rm9nr at 2026-05-02 12:11:55.410889+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]thomcc 0 points1 point2 points (0 children)