Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
Handle<T>
, so that T
is the output type
`Handle<T>` is a type that serves as a handle (as the name suggests) for operations. So far, the operation that a `Handle<T>` referred to, was always of type `T`. This is a problem, given what I'm trying to do with operations in this experiment. Unlike the current mainline code, where operations are just "code that transforms objects", I want to reify operations. They should be concrete things that you can see (right now, in the debug viewer's operation tree) and (later on) refer to and build upon. Let's use the example of translating faces, to understand what the problem is. If the translate operation is just a piece of code that transforms one face into another, then any other operation that expects to operate on a face can receive the output of that operation. Because it's just a face. But if the translate operation is a concrete thing in a tree of operations, then it's not as simple. Because that other operation, that expects to operate on a face, it can't _just_ operate on faces. It needs to be able to operate on any nested operation that _produces_ a face. Like our example translate operation. And this is what this change to `Handle<T>` enables. Where previously, its type would have been `Handle<Translate>`, because `Translate` (in this example) is the operation it refers to; it's now `Handle<Face>`, because `Face` is the output that `Translate` produces. So this new version of `Handle<T>` abstracts over the concrete operation it refers to, only exposing what that operation's output is. That means our example `Translate` operation can now be treated just like a `Face`, or any other operation that produces a `Face`.
- Loading branch information