aabtop / reify

Reify lets you embed a customized TypeScript runtime within a C++ application.
MIT License
6 stars 0 forks source link

Enable syntax like "Mesh3Union(...).asMesh3" instead of "Mesh3UnionAsMesh3(Mesh3Union(...))". #9

Closed aabtop closed 4 years ago

aabtop commented 4 years ago

Making this change will reduce the verbosity of the code, since we would no longer need to redundantly type the struct name twice (e.g. "Mesh3Union" in the example from the subject).

It also makes it easier to determine the "outputs" of processing a node, for example an IDE could autocomplete after typing "Mesh3Union(...)." to show all outputs of the Mesh3Union operation (in many cases it may be just a mesh).

The down side to this is that our objects become a bit chunkier in that they now also have to hold references to their potential outputs. It also complicates things because you can no longer query the ability to determine how to produce a Mesh3 by simply querying all functions that output Mesh3s, since now you may also get a Mesh3 via a property of an object.

aabtop commented 4 years ago

After 49e5b38c31d78fd394a57a393bd077beb1157914, it's even better than described above!!