Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Standardize abi

What's with this strange desire to mandate One True Way to implement function calls in every language implementation? If I want to use rbx/r11/r10/r9 for argument passing and return results in rdx/rsi by default and have to use

     @if os.LINUX and cpu.X64
     import external func[[regseq("rdi,rsi,rdx,rcx|rax"), library("libc.so")]] fwrite(buff ptr, size int64, count int64, stream ptr) int64;
     @endif
to interoperate with one particular implementation of libc for one particular OS on one particular ISA, then that should be perfectly fine.


That in no way conflicts with the existence of a standard. A standard is just a common default, you can deviate from it. And this being C the ability to do so when needed would be expected.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: