Retire the hand-written type layer - #18
Merged
estebanzimanyi merged 1 commit intoSep 2, 2026
Merged
Conversation
The binding is a projection of the catalog: `MEOS.NET/Types` holds the 96 generated object-model classes and nothing else, and the three files the library still writes by hand are the runtime substrate — the MEOS session lifecycle, the error check every wrapper makes, and the interpolation enum. The 70 hand-written type files, the helpers only they used (`DateHelper`, `EnumConverter`, `AllocHelper`, the `TimestampTz` struct) and the folder lists naming their directories are gone with them. Two members carry a value between the two generated surfaces, which is what lets the object layer be convenience rather than the only way through: `MEOSObject.Ptr` hands a MEOS value to any function on `MEOS.NET.Functions.Meos`, and `MEOSFactory.Wrap*` wraps what such a function answers back into the class the value's own header names. GoMEOS spells the same pair `Inner()` and `Init()` on each of its hand types. The ExampleApp reads the whole surface that way: `TFloat.In` over an instant answers a `TFloatInst`, `Meos.TfloatOut` prints it through its pointer, `Meos.AddTfloatFloat` answers a pointer `MEOSFactory.WrapTemporal` turns back into a temporal value, a float span set reports its two spans, and a malformed text raises `MEOSInternalErrorException`. Sixteen tests read the same surface, including the interpolation and subtype names MEOS lends out of its static tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The binding is a projection of the catalog:
MEOS.NET/Typesholds the 96generated object-model classes and nothing else, and the three files the
library still writes by hand are the runtime substrate — the MEOS session
lifecycle, the error check every wrapper makes, and the interpolation enum.
The 70 hand-written type files, the helpers only they used
(
DateHelper,EnumConverter,AllocHelper, theTimestampTzstruct) andthe folder lists naming their directories are gone with them.
Two members carry a value between the two generated surfaces, which is what
lets the object layer be convenience rather than the only way through:
MEOSObject.Ptrhands a MEOS value to any function onMEOS.NET.Functions.Meos, andMEOSFactory.Wrap*wraps what such a functionanswers back into the class the value's own header names. GoMEOS spells the
same pair
Inner()andInit()on each of its hand types.The ExampleApp reads the whole surface that way:
TFloat.Inover an instantanswers a
TFloatInst,Meos.TfloatOutprints it through its pointer,Meos.AddTfloatFloatanswers a pointerMEOSFactory.WrapTemporalturns backinto a temporal value, a float span set reports its two spans, and a malformed
text raises
MEOSInternalErrorException. Sixteen tests read the same surface,including the interpolation and subtype names MEOS lends out of its static
tables.