Core Concepts
Exposing C++ objects to scripting languages through fat APIs enhances accessibility and functionality.
Abstract
Abstract:
Fat API vs. Thin API for C++ objects.
Reflection needed to expose C++ objects.
Introduction:
Minsky simulation package transition to TypeScript.
Advantages of using TypeScript over TCL/Tk.
REST Service:
Explanation of REST principles and operations.
Mapping method calls in the schema.
Node.js API:
Challenges with Mac architecture for native window handling.
Implementing a dynamic library for Node.js integration.
Attributes and Methods:
Mapping public attributes to setter/getter methods.
Overload resolution between JavaScript and C++ methods.
TypeScript:
TypeScript extension for type annotations in JavaScript code.
Custom TypeScript descriptor for Minsky project bindings.
Python:
Issues with existing Python API descriptor requiring boost-python library.
Implementation of Python interface using low-level Python C API.
Stats
A fat API exposes nearly all of a C++ object’s public attributes and methods to a consuming environment, such as a scripting language, or web client.
Quotes
"JavaScript does not provide for overloaded functions at all, but with type introspection built into the language, it is possible to write a method that can dispatch to different implementations based on types and number of arguments."
"Using the RESTService descriptor comes at additional build cost, compared with the original TCL bindings used for the Eco Lab package."