Greg Ewing wrote:
> Stefan Behnel wrote:
>
>> Given this goal, I wonder why the literals are needed in the first
>> place.
>> Currently, you can just do this:
>>
>>     p = Point(color=color, x=y)
>
> I thought about that too, but something I had in mind
> for Pyrex in the future was that
>
>    p = Point()
>
> where Point is a struct type would be shorthand for
>
>    p = <Point *>malloc(sizeof(Point))

IMHO, if we hide the malloc(), we should hide the free(), just as we do
(or Python does) everywhere else. If we can't, it's better to make the
malloc() explicit, too.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to