stdcpp - what is it?

Monkey Forums/Monkey Beginners/stdcpp - what is it?

Irvau(Posted 2014) [#1]
Just out of curiosity, what's stdcpp? I see it mentioned in some of the module API supported platforms, but I don't know what it is.
Thanks in advance!


dawlane(Posted 2014) [#2]
The stdcpp target is the core Monkey language for desktop console applications. You use it to create tools that don't need the bangs and whistles of a full Monkey desktop game. The Monkey compiler it's self is this target as is some of the programs in the Monkey X bin directory.


therevills(Posted 2014) [#3]
Just to clarify on what dawline stated: Console = command line application :)


ImmutableOctet(SKNG)(Posted 2014) [#4]
I'll leave this here. Basically, these days, Monkey's compiler ('Trans') compiles itself, and it uses that target to do it. It's also a very useful target for small command-line tools, and not to mention game-servers.

Most programming languages do this kind of thing. For example, you'll find C++ compilers which were written in C and C++. Basically, if the compiler can compile the language you created, you can likely remake what you'd be using (The compiler) in that language. And from there, everything optimization and feature related is sparked. At that point, you just keep having it compile itself.

But, for this reason 'Trans' (With a bit of work) can compile to any of Monkey's targets. Which would actually be pretty awesome for making say, a JavaScript web-compiler. And with services like 'CompileOnline', this would be a lot better on their servers (If they were to add Monkey as a language), as your client would be doing the work. Or even though it's not the greatest platform, there's the option of recompiling 'Trans' with the unofficial 'Java Tool' target, announced by devolonter. Which would make compiling on most systems even easier, though it would probably be best to just recompile an STDCPP version afterward.

And of course, since this is standard C90/C99 and C++98/C++0X (Or even possibly C++1X) compatible code it generates and uses internally, you can recompile the Linux output for an embedded machine, like the Raspberry Pi (Which several of us have done).