On 08/05/2010 06:01 AM, Carl Witty wrote:
> I'm working with Enthought on a branch of Cython to target .NET for
> IronPython.  I'm maintaining a repository at
> http://bitbucket.org/cwitty/cython-for-ironpython (I just started
> writing code, so there's not much interesting there yet).
>    
Great, I think this is fantastic news.
> I'm hopeful that eventually this code will be merged back into Cython;
> I don't want to fork Cython.
>    
I hope this stays in Cython as well.
> I'm starting by essentially duplicating all of the generate_* methods
> into generate_dotnet_* methods, and modifying the duplicated methods
> to generate C++/CLI code.  My hope is that once I have a working
>    
Ah, this is very interesting -- when I've spoken with Enthought on the 
matter we've largely ignored C++ for this and were talking about a C# 
backend.
> compiler, I can refactor to merge most of the methods back together
> (eliminating the duplicate code) while still not being very intrusive
> to the original codebase.
>    

Have you considered writing a transform instead of adding more methods 
to the nodes? E.g. something like Cython/CodeWriter.py for the .NET 
backend? That would be even less intrusive...ideally, one would just 
configure the pipeline differently depending on what the backend is.

(I once suggested that the CPython generation was also moved into a 
seperate generator class like this as well; of course, that's a lot of 
unnecessary work)

I'm just not too sure about having "if dotnet:" all over the place 
(eventually). Of course, you should just do whatever gives results 
quickest at this point (and I very much trust your judgement), I'm just 
making sure the option is mentioned.

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

Reply via email to