问题描述
您好,最近我回到了编程世界.
以前,我曾经在Visual Basic中编程,我对此有很好的命令.后来,我开始忙于非开发工作,并且与开发领域的发展保持联系.现在我看到VB并没有达到这种程度.现在,我觉得有必要选择另一种语言,但是问题是哪个?
仅供参考,我是在谈论一般活动的编程,例如音译工具;通用图形程序;常规文件处理等,具有良好的用户界面. (使用VB可以实现所有这些功能,请使用类似的语言.)
Hello there, I am back to programming world lately.
Previously I used to program in Visual Basic of which I have good command. Later I became busy with non-development work and was not in touch with developments in development field. Now I see that VB is not used to that extent. Now I feel there is a need to choose another lang, but which one is the question?
FYI, I am talking about programing for general activities e.g. transliteration tools; general graphics programs; general file handling and so on, with good user interface. (all this is possible with VB, plz suggest a similar language).
推荐答案
List<string> myList = new List<string>();
Dim myList As New List(Of String)()
完成-现在继续使用它,而不用担心设置指针和测试链接的机制.现在需要堆栈吗?同样,只是使用Stack而不是List.队列?按钮?串行端口?进度条?数据库? (实际上,最后一个谎言-您至少需要三行代码才能对数据库做任何有用的事情,而不仅仅是一行)
它非常大-但它也非常非常方便-而且Visual Studio内置的Intellisense可以帮助您实现这一目标,因此实际上您要记住的内容比使用MFC时要少.而且(差不多)是一致的.相同的操作在不同的对象上相同.
4)所有.NET语言都编译为相同的代码.甚至COBOL.NET都存在(为什么我不能说),并且用任何.NET语言编写的所有模块都可以在任何其他.NET语言中无缝使用.这意味着您可以在VB中编写Presentation层,在C ++中编写Business层以及在COBOL中编写数据访问层,它们将一起工作.在编译之前,您无法确定使用了哪种语言.
5)C#不基于C ++.或C.看起来很像,但根本不一样.在C#中,一切(我的意思是一切)都是具有属性,方法和事件等的对象.这包括整数,字符和Sql数据库! C#使得使用真正的指针变得很困难-您必须先声明使用它们的代码块为不安全",然后才能让您使用.与负载其他差异不大. C#是.NET-C ++可以是.NET或本机代码.后者执行起来更快,但是您丢失了.NET库.
Done - now move on to use it, rather than worry about the mechanics of setting up the pointers and testing the links. Need a stack now? Same thing, but with Stack instead of List. Queue? Button? Serial Port? Progress bar? Database? (Actually that last one is a lie - you need at least three lines to do anything useful with a database, not just one)
It''s is huge - but it'';s also very, very handy - and the Intellisense built into Visual Studio helps you with it, so you actually have to remember less than you did with MFC. And (pretty much) it''s consistent. The same operations work the same on different objects.
4) All .NET languages compile to the same code. Even COBOL.NET exists (why, I cannot say) and all modules written with any .NET language can be used seamlessly within any other .NET language. That means that you can write the Presentation layer in VB, the Business layer in C++ and the Data access layer in COBOL and it will all work together. You cannot tell which language was used before compilation.
5) C# is not based on C++. Or C. It looks like it, a lot, but it isn''t at all the same. In C# everything (and I mean everything) is an object, with properties, and methods and events, and so forth. This includes integers, characters, and Sql Databases! C# makes it difficult to use true pointers - you have to declare the block of code that uses them as "unsafe" before it will let you. And load of other little differences. C# is .NET - C++ can be .NET or Native code. The later is faster to execute, but you lose the .NET libraries.
这篇关于最好的通用编程语言是哪一种的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!