Re:Yukihiro Matsumoto: “Ruby is designed for humans, not mac...
by pdimitar on Sunday January 19, 2020 @02:45PM
(#22093519)
In C/C++ it definitely is. But it sounds Matz wants to do it similarly (but not exactly) like in OCaml, where the "interface" file only describes all public modules and functions and their typing signatures, which serves the purpose of (a) limiting access to the users of your modules/functions to only those you want to expose and (b) help the compiler's typing system.
Do note that in OCaml explicit typing is rarely needed. The compiler is quite amazing at inferring the data types of your functions. In Ruby though, it seems the typing definitions will be the front and center of those suggested interface/header files.
My experience using C/C++ is limited, but this always feel felt rather cumbersome to me.