最好的通用编程语言是哪一种 [英] Which is best general usage programming Language

查看:79
本文介绍了最好的通用编程语言是哪一种的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,最近我回到了编程世界.

以前,我曾经在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).

推荐答案

这实际上取决于您所了解的知识以及您打算如何处理. br/>
如果您了解V6或更高版本的VB,那么您将学到大量的知识以升级到更高版本(.NET下的VB),因为该框架非常庞大!易于使用,但功能强大...

适用于.NET框架的VB可以很好地工作,并且可以普遍使用,但是对此有很多偏见-C#的使用也很不错.

如果您想这样做是出于业余爱好,那么我建议您从Microsoft下载免费的Visual Studio 2010 for C#副本,并获得一本书并关注它.主要原因是,如果您要从Pre-net VB迁移到C#,则不要尝试随身携带非.NET VB的包包!
如果您想为此工作,那么您需要查看您当地的就业市场,看看正在招聘什么.比从那里做决定.


在您提出建议之后,我已经检查了C#代码.我觉得它更接近C ++代码.实际上,我已经用C ++做过一些编程,还用C做过很多.

话虽如此,我想问...,
1.您的意思是说VB DOT NET与VB 6有很大不同,以至于VB-6知识者应该选择一种新的语言,例如C#,而不是VB DOT NET. (实际上,您的这句话主要原因是,如果您从Pre-net VB迁移到C#,那么您就不要试图随身携带非.NET VB的包!!" ).
2.我还想知道您对VB DOT NET的偏见是什么,以及C#如何绕过它们(如果适用).
3.同样,如果您正在谈论使用点网框架的c#,那么您的stmt是否仍然认为您将要学习很多东西,因为框架非常庞大,或者与VB DOT相比,C#的情况有所缓解NET.
4.还请告诉我为DOT NET框架编写的程序在编译后是否具有所有相似的属性,而不管使用哪种编程语言,或者其某些属性仍取决于所使用的语言.
5.就可用性而言,C#DOT NET与VC ++相比有什么优势,两者之间的基本区别是什么,因为我看到两者均基于C ++,并且均为Microsoft版本?
谢谢和问候.



0)在许多方面,C#比VB更接近C ++,这通常被视为一件好事,因为它包括强类型化之类的东西.但是,这是一个简单得多的版本(大多数情况下),具有清晰的语法.我不会说它像C ++一样强大(不是),但是它容易记住(因为它少很多),并且(通常来说)不易出现内存问题.如果您知道C,那么您可以将其视为隐藏了所有指针的类固醇上的C! :laugh:

1)在VB6中几乎可以做的所有事情在VB .NET中仍然可以做-这是一件坏事,因为在很大程度上,.NET框架提供了更好的可靠性替代方案.如果您习惯使用VB6,则自动反应是使用较旧的构造.这意味着像ON ERROR这样的可怕内容仍然可以使用,但是忽略了.NET中内置的非常有用的异常处理.
2)有一种观点认为VB是一种孩子的语言",并且只有幼稚的程序员才能使用它.将其用于VB项目是公司惩罚的一种形式.并非完全正确-VB.NET被描述为不带花括号的C#"-但其中存在一个事实,因为VB.NET基于近50年的语言,并且具有经常被扭曲,以至于有点吱吱作响.相比之下,大约十年前,C#从零开始被设计为完全面向对象的语言,并且牢记.NET框架.

3)对不起,是的. C#和VB.NET都使用相同的框架,而且绝对庞大!您说您已经完成了一些C ++工作-您是否使用了Microsoft Foundation Classes?因为他们很大.但是相比之下很小!令人惊讶的是,这也是.NET的优势之一-有大量易于使用的代码库,可以处理所有无聊的工作.您需要Inked清单吗?
It really depends on what you know, and what you want to do with it.

If you know VB at or before V6, then you will have a large amount to learn to move to later versions (VB under .NET) as the framework is enormous! Easy to use, but enormous...

VB for the .NET framework works well, and it in common use, but there is a fair amount of prejudice against it - C# is also in good usage.

If you want to do this for a hobby, then I would suggest download a free copy of Visual Studio 2010 for C# from Microsoft, and get a book and follow it. The main reason is that if you are moving from a pre-net VB to C# then you don''t try to take the baggage of non-.NET VB with you!
If you want to do this for work, then you need to look at your local job market and see what is being recruited. Than make your decisions from there.


After your suggestion, I have checked for C# code. I feel it is nearer to C++ code. Actually, I have done some programming in C++, and much more in C.

Having said that, i want to ask...,
1. Do you mean that VB DOT NET is so much different from VB 6 that a VB-6-knower should go for a new language like C# rather than VB DOT NET. (Actually, your this sentence "The main reason is that if you are moving from a pre-net VB to C# then you don''t try to take the baggage of non-.NET VB with you!" was not clear to me).
2. I would also like to know what are prejudices against VB DOT NET as mentioned above by you, and how C# bypasses them, if applicable.
3. Also if you are talking about c# with dot net framework, then does your stmt still holds that you will have a large amount to learn since framework is enormous, OR there is some relief in C#''s case as compared to VB DOT NET.
4. Please also tell me whether a program written for DOT NET framework has all similar properties after compilation irrespective of which programming lang was used OR its some properties still depend upon language used.
5. What is the advantage of C# DOT NET over VC++ in terms of usability, and what is the basic difference between the two, since I see both are based on C++ and both are Microsoft''s versions?
Thanks and Regards.



0) C# is closer to C++ than to VB in many ways - and that is generally seen as a good thing, because it includes things like strong typing. However, it is a much simpler version (most of the time) with a clean syntax. I wouldn''t argue that it is as powerful as C++ (it isn''t) but it is a lot easier to remember (because there is a lot less of it) and (generally speaking) less prone to memory problems. If you know C, then you can think of it as C on steroids with all the pointers hidden! :laugh:

1) Pretty much all the things you could do in VB6 wyou can still do in VB .NET - which is a bad thing because largely the .NET framework provides alternatives which are better for reliability. If you are used to VB6, then the automatic reaction is to use the older constructs. Which means that horrible stuff like ON ERROR still work, but ignores the much, much more helpful exception handling that is built in to .NET

2) There is a view that VB is a "kids language" and that only childish programmers use it. That being made to work on VB projects is a form of corporate punishment. It''s not entirely correct - VB.NET has been described as "C# without the curly brackets" - but there is an element of truth there, because VB.NET is based on a language that is nearly 50 years old, and has been twisted so often that it does creak a bit. In comparison, C# was designed from scratch about ten years ago to be a fully object oriented language, with the .NET framework very solidly in mind.

3) Sorry, but yes. C# and VB.NET both use the same framework, and it is absolutely huge! You said you have done some C++ - did you use the Microsoft Foundation Classes? Because they were big. But tiny in comparison! Surprisingly, that is also one of .NETs strengths - there is a huge library of easily available code to handle all the boring stuff. You need a lnked list?
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.


一个允许您收集薪水的程序.

除了哲学和对古老信仰体系的坚持外,真的没有其他考虑...
The one that allows you to collect a paycheck.

Philosophy and adherence to archaic belief systems aside, there really are no other considerations...


这篇关于最好的通用编程语言是哪一种的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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