Skip to content

New LM Style for Type Definitions (idea roundup) #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andrew-johnson-4 opened this issue May 9, 2025 · 1 comment
Open

New LM Style for Type Definitions (idea roundup) #1496

andrew-johnson-4 opened this issue May 9, 2025 · 1 comment

Comments

@andrew-johnson-4
Copy link
Collaborator

andrew-johnson-4 commented May 9, 2025

There have been several problems and inefficiencies with current type definitions with LM Style structs. The entire codepaths from back to frontend will be replaced during the LM to LSTS rewrite, so this is the perfect time to rearchitect anything.

Proposed New Features:

  • tags are elided if there is only one case
  • fields can be attached to the type directly, outside of all cases
  • LM Style definitions should accept all C Style definitions (packing / alignment / nesting)
  • get rid of "aliases" in favor of direct field declarations
    • aliases were originally a way of minimizes resource usage in the compiler
    • the compiler can efficiently handle this stuff now, so it should not be a problem
  • mangle field names to be human readable after demangling
  • inline implements in type definition

Existing Tickets:

Anything else missing?

@alex-s168
Copy link
Collaborator

seems like a good idea

I also want inline implements, in the definition

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

No branches or pull requests

2 participants