Hacker News new | past | comments | ask | show | jobs | submit login

So my thoughts are as follows:

1. Every source file must be annotated with language version.

2. Every language version can remove things from previous language versions. More like "hide" I guess, but you can't compile source file that's using removed features or APIs. So to migrate to new version you're supposed to change sources. Of course preferable using some migration tools, but that's out of scope.

3. You can access old API indirectly. For example if you're using library which uses old API and returns struct from that old API.

4. There should be some well thought rules for situation that you describe. To make structs forward and backward compatible as much as possible. May be even to provide some implicitly running migrations to convert between structs with different versions.

5. If there's no way to automatically convert v1975/SomeStruct to v2022/SomeStruct, you can't do that and need to convert it manually.

This is hard problem and must be thought on every level: data layout compatibilities, ABI compatibilities, type system compatibilities. But I'm not convinced that it's unsolvable problem. And if solved it would provide great benefit allowing lots of freedom and agility for language development.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: