Elektrine lite

← Feed

@slava@mathstodon.xyz

Post #3407653

2026-06-26 14:16 UTC

@SRAZKVT@tech.lgbt @pinskia@hachyderm.io Swift generics are separately compile. They do not require monomorphization, it is an optimization that can be performed when function bodies are visible to the caller (but obviously an important one because you can imagine there is some overhead otherwise)

Replies (1)

  • @joe@f.duriansoftware.com 2026-06-26 14:32

    @slava@mathstodon.xyz @SRAZKVT@tech.lgbt @pinskia@hachyderm.io if you really want to go for the "C successor" mantle though, i think you could do separately-compiled generics much simpler than swift, if you limit the use of generics to situations where they don't introduce representation polymorphism (like pointers, roughly the same situations where incomplete types are allowed in C) and let the developer bring their own metadata as needed

    Open ##3407652