Re:Cello High Level C: A Fat Pointer Library
by mistercow on Sunday November 08, 2015 @07:39PM
(#10530791)
I think the reason for this is that they're trying to manipulate C's syntax to get a certain kind of intuitive style. They seem to want it to be concise and C-like (without resorting to macros), but they want to add their own functionality without actually extending the language. In this case, they want you to just be able to cast a Cello "var" pointer to a specific type pointer using the normal cast syntax.
I'm not saying it's the right choice. Just that I understand why they did it that way.
Still, I think a macro would be a perfectly reasonable way to do it.
I'm not saying it's the right choice. Just that I understand why they did it that way.
Still, I think a macro would be a perfectly reasonable way to do it.