Microsoft C#是旧C ++语言的替代品 [英] Microsoft C# a replacement for old C++ language

查看:59
本文介绍了Microsoft C#是旧C ++语言的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从朋友那里听说C ++主要被替换为全球大多数C ++程序员的选择语言。我想这会让你感觉很好,因为这意味着当你学习的时候你不必乱用他妈的用像指针那样的低级别垃圾来b / b
。我打算学习

C ++,但如果时间在变,我想我只会学习C#,看起来好像是b $ b更现代。我也考虑过Java但它的方式太慢了。我认为

它应该很容易学习,因为我有很多经验使用所有版本的Visual Basic制作复杂的

程序。


任何比较吗?


谢谢

大师

I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?

Thanks
The Grand Master

推荐答案

Master Programmer写道:
Master Programmer wrote:

我从朋友那里听说C ++主要被替换为

选择的语言世界上大多数C ++程序员。我想这会让你感觉很好,因为这意味着当你学习的时候你不必乱用他妈的用像指针那样的低级别垃圾来b / b
。我打算学习

C ++,但如果时间在变,我想我只会学习C#,看起来好像是b $ b更现代。我也考虑过Java但它的方式太慢了。我认为

它应该很容易学习,因为我有很多经验使用所有版本的Visual Basic制作复杂的

程序。


任何比较吗?
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers. I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.

Any comparisons out there?



你把指针称为垃圾,但这取决于你放入它们的内容。


我我还没看到一款不崩溃的微软产品。我碰到了他们的每一个屁股。他们可能会雇用一堆猴子来编程

他们的软件


这取决于你的偏好和你想做什么。如果

你讨厌指针去找java,但我必须同意它的速度慢。我没有用b $ b尝试c#并且可能暂时不会看到它,但我看到有些人

很满意它。

尝试搜索forc ++ vs c# ?

You call pointers garbage, but it depends what you put in them.

I am yet to see a microsoft product that does not crash. I crashed every
their shit I touched. They probably hire bunch of monkeys to program
their software

It all depends what are your preferences, and what you want to do. If
you hate pointers go for java, but I have to agree its slow. I didnt
try c# and probably will not see it for a while, but I see some people
are happy with it.
Tried searching for "c++ vs c#" ?


Master Programmer写道:
Master Programmer wrote:

我从朋友那里听说C ++主要被替换为语言

全球大多数C ++程序员的选择。
I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world.



这主要是炒作。是的,对于某些任务,C#可以是一个很好的工具,如果你真的那么b $ b不需要所有的C ++马力。


除非java,C#有using语句提供了一些学位对象

生命周期控制,但仍然要原始依赖它来进行所有的资源管理。


当Java第一次出现时,对GC的热情如此之高,以至于我们读到的地方:需要程序员,做博客的消息已经消失了,

只是分配并忘记,GC会照顾。许多初学者就是这么做的,他们看到他们的软件锁定,挂起,崩溃或有意外的行为。好吧,内存不是在对象内使用

的单一关键资源。您经常打开一个文件,一个命名的信号量或管道,一个

套接字等等。这是资源,当他感觉如此时,你不能让GC按照自己的意愿照顾他们。


所以,经典的C ++范例:


x = new X(); .....在这里工作.....;删除x;


已成为Java:


x = new X(); .....在这里工作.....; x-> Dispose();


需要相同数量的簿记,而且任务要多一些,或者b
乏味。因为在C ++中你知道每个新的必须最终通过删除关闭

。在java和C#中,你实际上需要跟踪一次性

或非一次性物品。


如果你看到并且看到STL容器的密集使用,聪明的

指针和细致的设计可以帮助你不关心(太多)关于

删除对象,C ++似乎就像这里的范例。


我经常说:每当抱怨C ++中缺少GC时,实际上并不是很好理解编程。这个类别中包含了Java和C#的创建者


That is mostly hype. Yes, for some tasks C# can be a good tool if you really
don''t need all the horsepower of C++.

Unless java, C# has the using statement to provide some degree object
lifecycle control, but it is still to primitive to rely on it for all
resource management.

When Java first appeared, the enthusiasm for GC was so high that all over
the place we read: "The need for the programmer, to do bookeeping are gone,
just allocate and forget, GC will take care". Many beginners did just that,
and saw their software locking, hanging, crashing or having unexpected
behaviors. Well, the memory is not the single critical resource one use
inside an object. You often open a file, a named semaphore or pipe, a
socket and so on. This are resources that you can not allow the GC to take
care of them at his own will, when he feel so.

So, the classical C++ paradigm:

x=new X(); ..... do work here .....; delete x;

has become in Java:

x=new X(); ..... do work here .....; x->Dispose();

The same amount of bookkeeping is required, and the task is a bit more
tedious. Because in C++ you know that every new must eventually "be closed"
by a delete. In java and C# you actually need to keep track of disposable
or non disposable objects.

And if you look and see that the intensive use of STL containers, smart
pointers and a carefull design can help you not to care (too much) about
deleting objects, the C++ seems like the paradigm winer here.

I often use to say: whenever complain about lack of GC in C++ don''t really
understand programming to well. The creators of Java and C# being included
in this category too.


我想这会使

sence因为这意味着在学习的时候你不必像指针那样用低级别的垃圾来无所事事。
I guess this makes
sence as it means that when learning you dont have to fuck around
sencelessly with low level garbage like pointers.



我经常说:每当抱怨C ++中缺少GC时,实际上并不理解编程是好的。

I often use to say: whenever complain about lack of GC in C++ don''t really
understand programming to well.


我要学习

C ++但是如果时间在变,我想我只会学习C#,似乎

更现代。
I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern.



我会将其命名为overhyped但这就是重点。营销销售。

I would name it "overhyped" but that is the whole point. Marketing sells.


我也考虑过Java,但它的方式太慢了。
I also thought about Java but its WAY too slow.



总是越来越好。是的,它有点慢,但绝对不是10年前的恐怖故事。


而且,现在它是开源的。这样可以保证没有公司能够搞砸java议程。 C#规格可以随时由MS进行更改。

此外,只有当他们准备好在市场上推出新的
版本时,他们才会推出新的规格。


这会在MS.NET和Mono项目之间产生约2年的差距。由于大多数b
程序员喜欢尝试使用最新的工具来利用新的

的东西,这会在Windows上运行的软件之间产生可移植性差距

和Mono。


大多数Windows程序员对

可移植性问题(或者不关心它们)也没有很好的教育,所以他们的代码乱丢了

使用PInvoke和硬编码的路径字符串,如C:\\Windows \\ ...。尽管在那里存在一个与b $ b兼容的.NET引擎,但这种愚蠢代码的
将无法在其他操作系统上运行。另一方面的Java程序员是

" evangelised"关于从摇篮和Java库的可移植性比.NET更完整,所以你不需要使用(通常)操作系统特定的调用。

因此,一般的java代码比C#

代码更便携。


因为我们不是生活在一个封闭的世界,而是因为技术迅速发展,因为聪明的人不喜欢被特定的供应商戴上手铐,如果你不喜欢,我强烈推荐Java而不是C# C ++。

Is getting better all the times. Yes, it is a bit slow but definitely not
the horror story it was 10 years ago.

And also, now it is open source. This will guarantee that no company will
mess up with java agenda. C# specs can be changes by MS at all any time.
Also, they launch the new specs only when they are ready to get with a new
version on the market.

That creates an about 2 year gap betwen MS.NET and Mono project. Since most
programmers like to try the newest tools to take advantage of the new
stuff, this create a portability gap betwen the software running on Windows
and on Mono.

Most Windows programmers are also not very well educated about the
portability issues (or don''t care about them) so their code is littered
with PInvoke and hardcoded path strings like "C:\\Windows\\...". This kind
of idiotic code will not run on other OS despite the existence of a
compatible .NET engine there. Java programmers on the other side are
"evangelised" about portability from cradle and java library is more
complete than .NET so you don''t need to use (that often) OS specific calls.
As a result, the average java code it is way way way more portable than C#
code.

Because we don''t live into a closed world, and because the technology evolve
rapidly, and because smart people don''t like to be handcuffed by a
particular vendor, I strongly recommend Java over C# if you don''t like C++.


我认为

它应该很容易学习,因为我有很多复杂的经验

程序使用所有版本的Visual Basic。
I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.



一个VB人实际上抱怨Java速度?

A VB guy actually complaining about Java speed ?


有什么比较吗?
Any comparisons out there?



是的。 C ++规则,Java很糟糕,但你应该总是喜欢Java而不是C#。

Yes. C++ rules, Java suck but you should always prefer Java instead of C#.


Master Programmer:
Master Programmer:

我从朋友那里听说C ++主要被替换为全球大多数C ++程序员的选择语言。我想这会让你感觉很有意思,因为这意味着当你学习的时候不必使用像指针这样的低级别垃圾来无条件地使用

I heard from a friend that C++ is mainly being replaced as language of
choice for most C++ programmers around the world. I guess this makes
sence as it means that when learning you dont have to f*** around
sencelessly with low level garbage like pointers.



(我们诅咒是有原因的。如果你通过每天的常规演讲混合它们,你会在实际需要时减少它们的功效使用它们。

这对未经训练的耳朵来说是不愉快的。)


这真的取决于你想要的程序员多么愚蠢。你在Java和Visual Basic之类的程序中编程,而没有公牛关于计算机实际工作情况的概念(例如CPU寄存器)。


如果你不知道重定向是如何工作的(即指针),那么你在我的书中你不是一个

程序员。


(We curse for a reason. If you blend them through your regular everyday
speech, you reduce their efficacy when actually feel a need to use them.
And it''s unpleasant to the untrained ear.)

It really depends how dumb a programmer you want to be. You program in the
likes of Java and Visual Basic without having a bull''s notion of how
computers actually work (e.g. CPU registers).

If you don''t know how redirection works (i.e. pointers), then you''re not a
programmer in my books.


我将要学习

C ++但如果时间在变,我想我只会学习C#,看起来更像是现代的b $ b。我也考虑过Java但它的方式太慢了。我认为

它应该很容易学习,因为我有很多经验使用所有版本的Visual Basic制作复杂的

程序。
I was going to learn
C++ but if times are changing I think I will just learn C#, it seems
more modern. I also thought about Java but its WAY too slow. I think
it should be easy to learn as I have heaps of experience making complex
programs using all versions of Visual Basic.



C#只是微软另一个半生不熟的暴行。如果要给初学者提供

编程建议,我会告诉他们保持远离

微软。


我为每个编程目的使用C ++。如果我找不到用于我的平台的b / b
的C ++编译器,那么我在C中编程。


除此之外,我会写奇怪的装配。


-


Frederick Gotham


C# is just another half-baked atrocity from Microsoft. If were to give
programming advice to a beginner, I''d tell them to stay WELL AWAY from
Microsoft.

I use C++ for every programming purpose. If I can''t find a C++ compiler for
my platform, then I program in C.

Other than that, I''d write the odd bit of assembly.

--

Frederick Gotham


这篇关于Microsoft C#是旧C ++语言的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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