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

Part of the reason is that Fortran passes arrays by value, while C passes them by reference.

Actually, the reason is that Fortran arguments may not alias (passing big arrays by value would be horribly inefficient).

Btw, one of the main goals of C99 was making C a better language for numerics (ie catching up to Fortran): The restrict qualifier was introduced (mainly to mark non-aliasing parameters) as well as complex numbers, variable-length arrays and type-generic math functions.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: