Git Product home page Git Product logo

cs2hx's Introduction

Cs2hx

CS2HX converts your C# 4.0 code into haXe code. haXe is a multi-target language, so the resulting haXe code can be converted to many other languages.

This means CS2HX can be a:

  • C# to ActionScript converter
  • C# to JavaScript converter
  • C# to Java converter
  • C# to PHP converter
  • C# to C++ converter

Project Goals

CS2HX is designed for situations where you need to share code/logic between C# and another platform, such as a Flash/Flex application or an iPhone application.

The program will parse your raw C# source files and output raw haXe source files. As C# and haXe are very similar languages in many ways, the code that comes out looks remarkably similar to the code going in. This makes debugging and profling easy.

CS2HX is great if you have an existing C# codebase you wish to port over, either as a one-time conversion or for an on-going basis for sharing logic. It is not designed to replace haXe, nor is it designed as a reason to avoid learning haXe. Rather, it eases the transition to haXe for those with existing C# codebases.

Limitations

C# supports a lot of features that haXe does not, so there are some things that won't be supported at all such as: yield, unsafe code, operator overloads, etc.

CS2HX aims to support 90% of an average C# codebase. You should expect to have to re-factor some of your code to avoid features that CS2HX does not support.

However, even with the limitations it's still very possible to write quality C# code that can be shared across both environments. Linq, lambda, generics and OOP are supported.

Further, CS2HX will transform your code to support some C# features that haXe does not support, such as partial classes, extension methods, field initializers, and using blocks.

Please see the limitations page for a detailed analysis of what is and is not supported.

cs2hx's People

Contributors

fizzerwl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.