Skip to content

Sizeof member#174

Merged
IgorDeepakM merged 2 commits into
masterfrom
sizeof_member
May 13, 2026
Merged

Sizeof member#174
IgorDeepakM merged 2 commits into
masterfrom
sizeof_member

Conversation

@IgorDeepakM
Copy link
Copy Markdown
Owner

No description provided.

IgorDeepakM and others added 2 commits May 13, 2026 21:38
Changed so that sizeof dotexpr and offsetof dotexpr are now
accessed using member variables, dotexpr.size_of and
dotexpr.offset_of. This is more in line of the original idea of
copying the design of the D language where those operations are
member access variables. The reason it was not first done was that
the Pony language lacks static methods. Also using member
variables makes it easier to add more functionality in the future
without having to add special keywords.

Instead, in SpacePony the sugar pass looks for these special
variable names and rewrites the AST using TK_SIZEOF and
TK_OFFSETOF. Internally it works similar but the syntax has
changed.
@IgorDeepakM IgorDeepakM merged commit 018a7d8 into master May 13, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant