学习什么? [英] Learning what ?

查看:50
本文介绍了学习什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是10年程序员.
我最初的编程语言是visual foxpro(旧版本),现在是基本语言.
它们不是面向对象的,而是过程语言.

我想学习一种新的编程语言,在研究了c#和java的网络之后,我终于了解了c#.

我对C#和C ++非常困惑(再次...请原谅).
让我缩小我的问题:

一个.如果我学习c#,我以后至少可以使用c ++还是至少学习难度不高? (作为一种度量,如果我可以用C#编写计算器程序,是否也可以用C ++编写它?)

b. c#是否独立于c ++? (通过独立方式,我可以开发甚至可以(甚至)创建纯c#的编译器或运行时?)

C.我可以在记事本中编写c#并在外部ms环境中进行编译吗? (为此,请跳过单声道).

d.是否可以在任何平台上为c#编写运行时(假设我在该平台上有丰富的知识)?

目前为止就这样了.谢谢.

Hi,

I am a 10 years programmer.
My programming language in the beginning was visual foxpro (old version) and now is basic.
They are not object oriented and are procedural language.

I would like to learn a new programming language and after surveying the net of c# and java I finally come up to c#.

I am quite confused (again...please forgive me) between c# and c++.
let me narrow my questions:

a. If I learn c# will I be able at least use c++ later or at least the learning curve is not steep? (As a measurement, if I can write a calculator program in c# will I be able to write it also in c++?)

b. Is c# independent of c++? (Independent by means that I can develop and even (maybe) create compiler or runtime pure of c#?)

c. Can I write c# in notepad and compile it in outside ms environment? (please skip mono for this).

d. Is it possible to write a runtime for c# on any platform (assumed I have good knowledge on the platform) ?

That''s all for now. thank you.

推荐答案

我不是专家,但是无论如何我还是会接受一些破解.

C#派生自并简化了C ++.两者都是面向对象的,都支持大多数相同的概念.我发现C#更容易学习-就我而言,因为语法更有意义. C ++很大程度上依赖于用于访问内存的指针,而C#向程序员隐藏了其中的大部分复杂性.指针仍然可以使用,但是编译器认为它是不安全的",使用指针需要花费大量的精力.从好的方面来说,指针错误是常见的,并且很容易造成,并导致程序出错和内存泄漏. C#通过跟踪内存分配并在应用程序中没有更多引用后进行清理来提供帮助.纯粹主义者会认为这是一种懒惰的编程方式,但是对于我们的非专家来说,这是一个重大的祝福.

我认为对于C ++程序员来说,学习C#比通过其他方法要容易得多,但是花了很多年尝试成功地掌握C ++的努力之后,我确信在使用C#几年之后,我会发现学习起来要容易得多C ++,如果我应该决定这样做的话.目前,我什么都没有说服我相信有任何理由可以学习C ++.它提供了我在C#中无法做的任何事情.一个更高级的学生可能对此有不同的看法,但是我的需求很简单.如果要将C#计算器转换为C ++,可能会发现很难做到.

您当然可以在记事本中编写C#程序,然后使用csc.exe从命令行对其进行编译,但是为什么要这么做呢? Visual C#Express IDE是免费的,如果您不想使用Visual元素,则不必使用它.代码编辑器运行良好.为什么要剥夺自己在Intellisense系统上的地位? .NET Framework的巨大复杂性是无法记住的,在键入时Intellisense会为您提供有用的提示,以帮助您开发程序,而无需经常参考帮助参考或教科书.即使您更愿意在没有向导和固定例程的帮助"的情况下自己键入代码,Visual C#包也可以节省时间.

据我所知,C#是.Net特定的语言,仅在Windows平台上受支持,但事实并非如此.我没有寻找任何其他实现,很可能有人正在将该语言移植到其他平台.如果不是这样,那么可能只有一个时间问题,然后有人这样做.

仅使用C#可能会产生创建编译器的麻烦.我不知道.我相信C#程序会被编译为一种中间语言MSIL,然后在运行时由JIT编译器进一步编译为与机器相关的本地代码.您可能会强制离线生成机器代码,但是我不知道答案是什么...对不起!

我确实认为您会很有趣地学习C#,并且不会以任何方式浪费您的时间. C#是强制执行OOP原则的强类型语言.这将帮助您养成良好的习惯,以备将来使用.那不是一件坏事...享受! :-D
I''m no expert, but I''ll take a hack at this anyway.

C# is derived from, and simplifies C++. Both are object-oriented, both support most of the same concepts. I''ve found that C# is much easier to learn - in my case because the syntax makes more sense. C++ depends a great deal on pointers for memory access, while C# hides much of that complexity from the programmer. Pointers can still be used, but it is considered "unsafe" by the compiler and it takes special effort to use them. On the bright side, pointer errors are common and easy to make, and lead to buggy programs and memory leaks. C# helps with this by keeping track of memory allocations and cleaning up after there are no more references to them in the application. Purists will argue that this is a lazy way to program, but for us non-experts, it''s a major blessing.

I think that it is easier for a C++ programmer to learn C# than the other way around, but having spent many years trying unsuccessfully to master C++ I am sure that after a few years of using C# I''ll find it much easier to learn C++, if I should decide to do so. For the moment, I''ve found nothing that convinces me that there''s any reason ever to learn C++, however. It offers me nothing that I can''t do in C#. A more advanced student might have a different opinion on that, but my needs are simple. If you want to translate a C# calculator to C++, you probably will not find that hard to do.

You can certainly write C# programs in Notepad and compile them from a command line using csc.exe, but why would you want to? The Visual C# Express IDE is free, and you don''t have to use the Visual elements if you don''t want to; the code editor works nicely. Why deprive yourself on the Intellisense system? The vast complexity of the .Net Framework is impossible to memorize, and Intellisense will provide you with helpful hints as you type to aid you in developing programs without constantly having to refer to the Help references or textbooks. The Visual C# package can be a timesaver, even if you prefer to type the code yourself without the "help" of Wizards and canned routines.

As far as I know, C# is a .Net-specific language, and is only supported on the Windows platform, but that may not be true. I haven''t looked for any other implementation, and it''s possible that someone is working on a port of the language to other platforms. If not, it''s probably only a matter of time before someone does so.

Creating a compiler might be chancy using only C#; I don''t know. I believe that C# programs are compiled to an intermediate language - MSIL - then further compiled to machine-dependent native code by the JIT compiler at runtime. That may be something you can force offline to produce machine code, but I just don''t know the answer to that... sorry!

I do think that you''ll have fun learning C#, and it won''t be a waste of your time in any way. C# is a strongly typed language that enforces the principles of OOP; that will help you to develop good habits for future use. That can''t be a bad thing... Enjoy! :-D


很简短的答案:与C#一起使用.

简短答案:
一个.如果您学习C#,那么您就不会免费获得C++.
b.是C#独立于C++.
C.编号
d.实际上,没有(移植整个.NET Framework会很困难).

:)
Very short answer: go with C#.

Short answers:
a. If you learn C# then you didn''t get C++ for free.
b. Yes C# is independent of C++.
c. No.
d. Practically, no (porting the whole .NET Framework would be hard).

:)


最短的答案:除了类似的语法外,C ++与C#的语言非常不同.
The shortest possible answer: C++ is very different language than C# except for the similar syntax.


这篇关于学习什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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