tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.03k stars 48 forks source link

casting pointer types to and from `(p void)` just seems like unnecessary verbrosity #120

Closed porky11 closed 7 years ago

porky11 commented 7 years ago

(p void) is not useful without casting another pointer to or from it. Function dispatch for pointers could work similar as for untyped macros, so if a function takes (p void) as argument, and is called with a (p T), and the function has no overloading for (p T) the version with (p void) could be called without explicitely casting it. And to avoid casting from void to a type, it would be useful, if functions, that use pointers to functions that take a (p void) you also could call it with a function that takes a function to (p T). Since this would requre to edit the core (and as long the macro dispatch doesn't work correctly) this isnt important.

porky11 commented 7 years ago

Because of the answer in #112 this seems to be wanted to be solved as macros