You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anthropic having a bad day. Hit or miss on a publicly shared URL in an incognito browser. May be try again in 10 mins.
Here's the key part:
This pattern separates the data layout from the API surface, and it's a common C++ design technique. Here's why someone would do it:
1. ABI Stability
The inner uuid struct with int128_t value is a plain-old-data (POD) type with a fixed, predictable memory layout. The outer UUID class provides the public interface. If you need to add methods, change behavior, or refactor internals, you can do so without breaking the binary interface — the underlying data layout stays the same.
2. The LBUG_API Export Macro
This macro typically expands to something like __declspec(dllexport/dllimport) on Windows or visibility attributes on Linux. Marking the whole UUID class with it exports all its methods from a shared library (.dll/.so). The inner uuid struct doesn't need this because it's just data — no vtable, no methods to export.
3. Separation of Concerns
uuid = pure storage, trivially copyable, no dependencies, can be used in C-compatible contexts or passed across FFI boundaries
UUID = rich C++ wrapper with formatting, parsing, comparison operators, serialization, etc.
Anthropic having a bad day. Hit or miss on a publicly shared URL in an incognito browser. May be try again in 10 mins.
Here's the key part:
This pattern separates the data layout from the API surface, and it's a common C++ design technique. Here's why someone would do it:
1. ABI Stability
The inner uuid struct with int128_t value is a plain-old-data (POD) type with a fixed, predictable memory layout. The outer UUID class provides the public interface. If you need to add methods, change behavior, or refactor internals, you can do so without breaking the binary interface — the underlying data layout stays the same.
2. The LBUG_API Export Macro
This macro typically expands to something like __declspec(dllexport/dllimport) on Windows or visibility attributes on Linux. Marking the whole UUID class with it exports all its methods from a shared library (.dll/.so). The inner uuid struct doesn't need this because it's just data — no vtable, no methods to export.
3. Separation of Concerns
uuid = pure storage, trivially copyable, no dependencies, can be used in C-compatible contexts or passed across FFI boundaries
UUID = rich C++ wrapper with formatting, parsing, comparison operators, serialization, etc.
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
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.
This PR merges structs uuid and UUID. There's no point in having a separate class just to store static helper methods
resurrecting #243
Depends on LadybugDB/ladybug-python#1