这是indexloc提供的服务,不要输入任何密码
Skip to content

Create code generator script for the standard library numeric types and conversions #1742

@tothambrus11

Description

@tothambrus11

Currently, the standard library has lots of code duplication, so it's very hard to maintain.

We are also looking into adding strong types for C numeric types that can be converted to Hylo integer types, but this means we also need n^2 number of conversion methods.

See #1684 #1706

I wrote a paper about C interop for Hylo that discusses ideas about what kinds of conversions would be needed: https://ambrus.dev/_astro/High-Fidelity%20C%20Interoperability%20in%20Hylo.7fUYiq3A.pdf

We should write a code generator, preferably in Swift code with some nice readable syntax that generates the files for the numeric types in the standard library.

It's probably best to use the new frontend, as that's much faster, but if you want to test out actually running the code (not just type-checking), then we need to use this repo still.

Let me know if you want to start working on this, I'd be happy to chat & help getting started.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions