用另一种语言编写现有代码 [英] write existing code in another language

查看:106
本文介绍了用另一种语言编写现有代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有旧的win32程序。

由于在win32 porgram的开发和维护方面存在困难,我决定用c#重写程序。

我正在寻找一种方法可视化当前的win32代码并将其分组到类,然后在c中重写类#

您建议使用什么解决方案和方法?

谢谢

解决方案

大多数时候,这样做并不是一个好主意:旧的Win32应用程序不太可能很容易转移到C# - 它很可能是基于指针的,它很可能不是面向对象的 - 而C#使得前者非常难,并且不能很好地处理非对象数据(如果它完全应对的话)。



相反,我可能会重新开始-write以满足相同的规范(使用现有代码作为业务逻辑的指南) - 任何其他方法几乎都会产生一个与现有应用程序具有相同开发和维护问题的应用程序,只会更糟!

i have old win32 program .
beacuse of difficulties in the development and maintenance of win32 porgram i decided to rewrite program in c#.
I am looking for a way to visualize current win32 code and grouping it to class and then rewrite class in c#
What solution and nethod do you suggestion?
thanks

解决方案

Most times, it's not a good idea to do this: and an old Win32 app is unlikely to be easy to transfer to C# - it's likely to be pointer based, it's likely to not be object oriented - and C# makes the former very hard, and doesn't cope well with non-object data (if it copes at all).

Instead, I'd probably re-write to meet the same specification (using the existing code as a guide for the business logic) - any other approach is pretty much going to produce an application with the same development and maintenance problems as the existing one, only worse!


这篇关于用另一种语言编写现有代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆