[Cython] RFC: an inline_ function that dumps c/c++ code to the code emitter

Jason Newton nevion at gmail.com
Tue Aug 23 08:22:51 EDT 2016


Just trying and improve the state of the art.  Yea maybe we have to add
some tricks to separate the two grammar wise, so they can play together.
Besides, I didn't start with that complexity, it evolved into seeing if
that was a viable path forward.

On Tue, Aug 23, 2016 at 5:15 AM, Alex S. <alex0player at gmail.com> wrote:

> Watching this thread for a long time now, and I must say I absolutely love
> how someone just barges in «oh just add parsing of C++ AST».
> C++ is a language with an extremely complex context-dependent grammar,
> much more so than C. Not to mention they took to updating the standard with
> new awesome features every 3 or 4  years, which all seem to absolutely need
> their own syntactic support.
> > 23 авг. 2016 г., в 8:03, Robert Bradshaw <robertwb at gmail.com>
> написал(а):
> >
> > On Mon, Aug 22, 2016 at 9:44 PM, Robert Bradshaw <robertwb at gmail.com>
> wrote:
> >
> >> And it would be a step back
> >> for the nice auto-conversion facilities you care about, e.g.
> >>
> >>    py_func(c_func(py_value))
> >>
> >> would become
> >>
> >>    c_value = py_value
> >>    cdef some_type c_ret
> >>    inline_cpp "c_ret = c_func(c_value)"
> >>    py_func(c_ret)
> >>
> >> It's just choosing a smaller unit (line vs. file) to swap between
> languages.
> >
> > And on this note it would also encourage use of the Python/C API (over
> > swapping "back" to Python) which is often a dangerous step backwards.
> > _______________________________________________
> > cython-devel mailing list
> > cython-devel at python.org
> > https://mail.python.org/mailman/listinfo/cython-devel
>
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20160823/d300d60c/attachment.html>


More information about the cython-devel mailing list