Porting C# code
Steven Schveighoffer
schveiguy at yahoo.com
Thu Jan 7 06:41:40 PST 2010
On Thu, 07 Jan 2010 09:23:47 -0500, Brien <reply at tolist.com> wrote:
> Hi BCS,
>
> I'd really appreciate it. I'm looking to port over a network server
> application so the GUI stuff shouldn't be a problem. I've also kept my
> source code on C# 1.0 so hopefully that should make it easier.
>
> Did you write your own parser or base it on ANTLR or some other
> parsing/compiling library?
>
> I wonder if it is possible to fully automate the conversion process- if
> you limit yourself to a certain subset of C# and maybe do some tricks to
> decorate the C# source code with any additional D keywords you would
> need, e.g. in C#
>
> public class Foo {
> public /* @shared */ int bar;
> }
>
> which could get translated as a shared variable.
>
> I might want to continue to primarily write code in C# but create an
> optimized port to D where I would be able to use native techniques on
> critical areas of the code.
Note there is a D compiler for .NET, which may allow you to avoid porting
parts of it. I've never used it, but it has been announced here somewhere.
-Steve
More information about the Digitalmars-d
mailing list