Re: [Ikvm-developers] How to refer to identifiers containing a $ from C#
Brought to you by:
jfrijters
From: Volker B. <vol...@go...> - 2013-02-01 21:18:00
|
Hi, Do you want rename classes or do you want only access an inner class from C#? For renaming we use an obfuscator before compiling. For accessing a class with a $ you can prefix it with a @ character. Volker Am 01.02.2013 17:35, schrieb Rüdiger Klaehn: > Any idea on this? > > I noticed that there seems to be a way to rename individual methods > using the -remap option of ikvmc. But I could not find a documentation > for the format of that file. Is there a way to rename identifiers > using regex patterns, or do you have to refer to each identifier > individually? > > thanks a lot, > > Rüdiger > > On Tue, May 8, 2012 at 10:17 AM, Rüdiger Klaehn > <rk...@go... <mailto:rk...@go...>> wrote: > > Hi all, > > I am trying to use IKVM to allow us a gradual migration of a large > project from .NET to the JVM. Our plan is to start writing a numerical > library in scala and to use IKVM to allow usage of this library from > .NET for the transition time. > > We have no illusions about this: you will not be able to write the > library in straight scala and use it seamlessly from C#. Instead there > will have to be some boilerplate on the scala side to make usage from > C# easier. So the interface between scala and C# has to be very > minimal. > > The compilation and calling complex methods works surprisingly well. > Even the performance is reasonable. But there is one problem that I > could not solve so far: scala frequently uses $ in identifiers, e.g. > for the names of companion objects. But I can not see any way to use $ > from C#. But obviously $ is a valid identifier at CLR level, otherwise > it would not be possible to translate scala or java programs _at all_. > > So is there a way to refer to an identifier like a method name "$plus" > or a type name "MyObject$" from C#? Or do we have to write proxy > objects with friendly names for every single type we want to use from > C#? > > cheers, > > Rüdiger > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > > > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |