简体   繁体   English

VB.NET开发人员不那么好奇吗?标准化VB.NET

[英]Are VB.NET Developers Less Curious? Standardizing on VB.NET

I'm asking this question as someone who works for a company with a 70% to 75% VB.NET developer community. 我问这个问题是为一家拥有70%到75%VB.NET开发者社区的公司工作的人。 I would say 80% of those developers do not know what an OOD pattern is. 我想说80%的开发人员不知道OOD模式是什么。 I'm wondering if this is the best thing for the health of my company's development efforts? 我想知道这对我公司的开发工作的健康状况是否最好?

I'm looking at the tag counts on: 我正在看标签计数:
https://stackoverflow.com/tags https://stackoverflow.com/tags
There are currently: 目前有:
12175 .NET questions 12175 .NET问题
18630 C# questions 18630 C#问题
2067 VB.NET questions 2067年VB.NET问题

Checking Amazon, it seems like there are: 检查亚马逊,似乎有:
51 C# Wrox books 51 C#Wrox书籍
21 VB.NET Wrox books 21 VB.NET Wrox书籍

On CodePlex there are: 在CodePlex上有:
979 Projects tagged C# 979项目标记为C#
136 Projects tagged VB.NET 136项目标记为VB.NET

There is definitely less materials to learn from if you wanted to be a VB.NET developer. 如果你想成为一名VB.NET开发人员,肯定会有更少的材料需要学习。 What would be a company's advantage to standardizing on VB.NET and hiring VB.NET developers? 什么是公司的标准化VB.NET和雇用VB.NET开发人员的优势? How does Microsoft answer this question? 微软如何回答这个问题?

Is the only two arguments: 只有两个论点:

  1. We had these VB6 programmers and lets make them comfortable 我们有这些VB6程序员,让他们感到舒服
  2. XML Literals XML文字

If you work for a company that has completely standardized on VB.NET, can you post an answer explaining the pragmatic or technical reasons why they made that choice? 如果您为一家完全标准化VB.NET的公司工作,您是否可以发布一个答案,解释他们为何做出这种选择的实际或技术原因?

UPDATE: 更新:
More stats - O'Reilly Radar 更多统计数据 - O'Reilly Radar
State of the Computer Book Market 2008, part 4 -- The Languages 2008年计算机图书市场状况,第4部分 - 语言

We're not standardized on VB.Net, and I often have to go back and forth between VB.Net adn C#. 我们在VB.Net上没有标准化,我经常不得不在VB.Net和C#之间来回走动。 I'm unusual, in that I come from a C/C++ background, know C#, but actually prefer VB.Net (I severely dislike vb6/vbscript). 我很不寻常,因为我来自C / C ++背景,知道C#,但实际上更喜欢VB.Net(我非常不喜欢vb6 / vbscript)。

I say all this because it's important to remember the VB6 is NOT VB.Net. 我说这一切都是因为记住VB6不是VB.Net很重要。 It's a whole new language and IMO does deserve to stand up next to C#. 这是一种全新的语言,IMO确实应该站在C#旁边。 I really hated vb6, but I fell in love with VB.Net almost instantly. 真的很讨厌 vb6,但我几乎立刻就爱上了VB.Net。 However, VB.Net did inherit some things from VB6, and not just a syntax style. 但是,VB.Net确实从VB6继承了一些东西,而不仅仅是语法风格。 I'm talking reputation, and that's not entirely deserved. 我说的是声誉,这不是完全应得的。 But I'm also talking about the developer base that helped create that reputation. 但我也在谈论帮助创造声誉的开发人员基础。 That seems to be part of what you're experiencing. 这似乎是你所经历的一部分。

With that in mind, it looks like you're judging the language based primarily on popularity. 考虑到这一点,看起来你主要是根据人气判断语言。 Not that there's anything wrong with this. 并不是说这有什么不妥。 There's plenty to be said for the ability to more-easily find samples and community support. 对于更容易找到样本和社区支持的能力,有很多话要说。 But let's at least call it what it is. 但至少我们称之为它是什么。 And if that's your measure, there's certainly enough support out there for VB.Net to make it viable, and it's not hard to take advantage of the C# samples. 如果这是你的衡量标准,那么VB.Net肯定有足够的支持使其可行,并且利用C#样本并不难。

Also, we're still on .Net 2.0 where I work. 另外,我们还在工作的.Net 2.0。 For 2.0, I definitely prefer VB.Net. 对于2.0,我绝对更喜欢VB.Net。 I like the syntax better and I like the way it does a few other things over C#. 我更喜欢语法,我喜欢它在C#上做其他一些事情的方式。 But I play around with Visual Studio 2008 at home. 但我在家里玩Visual Studio 2008。 On 2008 I really prefer the C# lambda expression syntax. 在2008年,我真的更喜欢C#lambda表达式语法。

Regarding your two arguments: 关于你的两个论点:

  • For #1, that may not be such a good idea , though I suspect it's the primary reason for many shops. 对于#1来说, 这可能不是一个好主意 ,但我怀疑它是许多商店的主要原因。
  • For #2, I've never used Xml literals. 对于#2,我从未使用过Xml文字。 They looks nice, but just haven't been that practical. 它们看起来不错,但实际上并不那么实用。

Something I wanted to add: it seems like some of the recent C# features are actually intended to make C# work more like VB. 我想添加的东西:似乎最近的一些C#功能实际上是为了让C#更像VB。 Static classes fill the conceptual space of a vb module. 静态类填充vb模块的概念空间。 The var keyword makes variable declaration look more VB's dim. var关键字使变量声明看起来更像VB的暗淡。 The upcoming dynamic keyword will allow vb-style late binding. 即将推出的动态关键字将允许vb风格的后期绑定。 Even properties, which is something you could say was "added" to c# for 1.0, are something that vb has had since before .Net. 甚至属性,你可以说是“添加”到c#for 1.0,是vb之前已经拥有的东西.Net。

I'm sure most of the time the reason companies go forward with VB.NET is exactly as you mentioned - large amounts of VB6 in the organization, both in terms of codebase and developers. 我敢肯定大多数时候公司推出VB.NET的原因正如你所提到的那样 - 组织中的大量VB6,无论是代码库还是开发人员。 Keep in mind that ASP websites and VB6 applications can be migrated to VB.NET with little to no pain. 请记住,ASP网站和VB6应用程序可以很容易地迁移到VB.NET。 VB6 to C# is a different story. VB6到C#是一个不同的故事。

That being said, having worked at companies that have used VB.NET, there's really very little difference in how you do things and developers who are curious get used to reading examples, books, etc. in C#. 话虽这么说,在已经使用VB.NET公司工作过,有真的,你怎么做的事情和开发商谁好奇习惯阅读的例子,书籍等在C#中差别很小。 It's not like it's terrifically hard to translate C# code to VB.NET, especially if you're not copy-pasting. 将C#代码转换为VB.NET并不是很难,特别是如果你不是复制粘贴的话。

As a VB.NET developer, here's what I don't like about C#, granted my experience is from reading C#, not writing it so much: 作为一个VB.NET开发人员,这里是我不喜欢的C#,我的经验来自于阅读C#,而不是写得太多了:

1) No edit and continue. 1)没有编辑并继续。 I've seen arguments that Edit and Continue is a bad thing and that it encourages bad coding habits. 我已经看到了编辑和继续是一件坏事的论点,它鼓励了糟糕的编码习惯。 It reminds me of my project manager telling me 25 years ago that my love of my then-advanced debugger was a "crutch" and that it encouraged bad programming habits. 这让我想起25年前我的项目经理告诉我,我对当时先进的调试器的热爱是一个“拐杖”,它鼓励了糟糕的编程习惯。 Sorry, I didn't buy it then, I ain't buying it now. 对不起,我当时没买,我现在不买。 At the very least, the advantages outweigh the disadvantages 10:1. 至少,优点胜过10:1的缺点。 Once C# gets this feature, you'll appreciate it more and really appreciate it if you ever have to code without it again. 一旦C#获得此功能,您将会更加欣赏它,并且如果您不得不再次使用它,那么我将非常感激。

2) The language is case sensitive. 2)语言区分大小写。 IMHO, this is pure evil. 恕我直言,这是纯粹的邪恶。 Would people agree that it is bad to have two variables in the same scope that vary only by case? 人们是否同意在同一范围内有两个变量只是按案例变化是不好的? If so, why allow it? 如果是这样,为什么要允许呢? Yuck. 呸。

3) Background compilation and hence better design-time feedback of errors. 3)背景编译,因此错误的设计时反馈更好。 A mixed blessing, as this slows down the IDE. 混合的祝福,因为这会降低IDE的速度。 But with 2008, performance is better and is probably a time saver. 但是在2008年,性能更好,可能节省时间。 Course, this is not a factor of the language itself, just the dev environment. 当然,这不是语言本身的因素,只是开发环境。

4) Braces {}{}. 4)大括号{} {}。 Reminds me of my LISP days where you can tell a LISP programmer from other programmers: They're the ones with their fingers on the screens trying to match up parens. 让我想起我的LISP时代,你可以告诉其他程序员的LISP程序员:他们是那些用手指在屏幕上试图匹配parens的人。

I find the following VB code easier to read and less likely to contain errors. 我发现以下VB代码更容易阅读,并且不太可能包含错误。

If condition1 then
  truestatement1
  truestatement2
else
  falsestatement1
  falsetatement2
end if

If (condition1) then {
  truestatement1;
  truestatement2;
  } //if (cond)
else
  {
  falsestatement1;
  falsetatement2;
  } //else (Condition)

All those braces with lack of auto-indent are just begging for compile time or run-time errors. 所有那些缺少自动缩进的大括号只是乞求编译时或运行时错误。 And as the nested ifs get complex, the braces just add to it. 并且随着嵌套ifs变得复杂,大括号只会添加它。 In place of the 4 braces in the C# example, the VB code has just one END IF statement, but C# programmers that comment like to add optional comments as to what block the brace is end bracket is terminating. 代替C#示例中的4个大括号,VB代码只有一个END IF语句,但C#程序员注释喜欢添加关于大括号是哪个块的可选注释终止。

The VB code is self documenting with less typing--the IDE even adds the END IF for you when you type in the IF condition line. VB代码是自我记录,输入较少 - 当您输入IF条件行时,IDE甚至会为您添加END IF。 So, in the end, I am missing the brevity simplicity/benefit here that C#-aficionados claim. 所以,最后,我错过了C#-aficionados声称的简洁/好处。 The } might be more terse than the End If , but I'm suggesting that the overall structure is unnecessarily complex. }可能比End If更简洁,但我建议整体结构不必要地复杂。

Granted, this all isn't that big of a deal, but as a novice C# coder I feel like it is a lot easier to mess up the nested conditions than it is to use VB. 当然,这一切并不是什么大不了的事,但作为新手C#编码器,我觉得乱用嵌套条件比使用VB要容易得多。

To learn to be good VB.NET programmer you don't need to learn it from a VB.NET resource learning from C# resource is perfectly fine. 要学会成为优秀的VB.NET程序员,你不需要从VB.NET资源中学习它从C#资源学习是完全没问题的。 If you can't even translate a C# code to VB.NET you got bigger problems anyway. 如果您甚至无法将C#代码转换为VB.NET,那么无论如何都会遇到更大的问题。

Almost all decent+ VB.NET programmers can read and decently write C# due to the things you just said, because otherwise you can't learn new stuff easily. 几乎所有体面的+ VB.NET程序员都可以阅读并正确地编写C#,因为你刚刚说过的话,因为否则你无法轻易学习新东西。

Finally, the people who are crap, are not crap because they are VB.NET programmers, that's just VB.NET is easy to code and it's not a bad thing! 最后,那些垃圾的人,不是垃圾,因为他们是VB.NET程序员,只是VB.NET很容易编码,这不是一件坏事! Also it's been said that most of these people coming from Classic ASP and VB6 background, which are again really low entrance threshold languages. 还有人说,这些人中的大多数来自经典ASP和VB6背景,这些都是真正的低门槛语言。 After a week any decent computer user can code in those languages. 一个星期后,任何体面的计算机用户都可以使用这些语言进 But most of the C# developers coming from Java and C/C++ background. 但是大多数C#开发人员都来自Java和C / C ++背景。 Especially Java side got lots OO in it. 特别是Java方面有很多OO。 After all especially C is not easy to learn, most of the people either learned in the school or in a long course, or from bunch of books. 毕竟特别是C不容易学习,大多数人要么在学校学习,要么在漫长的课程中学习,或者从一堆书中学习。

When it comes to a why company uses VB.NET it's mostly because of legacy reasons. 当谈到为什么公司使用VB.NET时,主要是因为遗留原因。 Also some companies who jumped .NET 1.0 from VB6 thought that VB.NET will be the major language, which turned out to be a big mistake after couple of years. 另外一些从VB6跳过.NET 1.0的公司认为VB.NET将成为主要语言,经过几年的发展,这是一个很大的错误。

Not looking for argument but as an old VB.NET fan: 不是寻找参数,而是作为一个旧的VB.NET粉丝:

3 . 3。 With statement, Handles statement, Module statement, XML literals, case-insensitivity... With语句, Handles语句, Module语句,XML文字,不区分大小写......
4 . 4。 My namespace, Microsoft.VisualBasic namespace, all the "sugar-coating" My命名空间, Microsoft.VisualBasic命名空间,所有“糖衣”
5 . 5。 Late-binding support and COM components interoperability 后期绑定支持和COM组件的互操作性
6 . 6。 Ermmmm..... (finger-crossed) readability? 嗯......(指头交叉)可读性?

As said, I'm not trying to be argumentative and I'm a big fan of C# but just that there is more to having VB6 programmers in a company to standardize on VB. 如上所述,我不是要争论,而且我是C#的忠实粉丝,但只是在公司中有VB6程序员可以在VB上进行标准化。

For example, COM interoperability could easily be a "show stopper" if you standardize in C# and your business depends on a lot of COM components... 例如,如果您在C#中进行标准化,并且您的业务依赖于许多COM组件,则COM互操作性可能很容易成为“显示阻塞”......

And the sugar-coating support mentioned is rather huge (I miss them all the time writing C# code). 并且提到的糖衣支持相当大(我一直都很想写C#代码)。 I feels like there are more tooling support from the VB.NET team than the C# team while the C# team focus their efforts on more language features. 我觉得VB.NET团队提供的工具支持比C#团队更多,而C#团队则专注于更多的语言功能。

I'm currently working with a customer who is in the process of standardizing on VB.NET. 我目前正在与正在进行VB.NET标准化的客户合作。
The main reason is, as you mentioned, the fact that the majority of the employees have 10+ years of experience with VB and COM. 主要原因是,正如您所提到的,大多数员工拥有10年以上的VB和COM经验。
They feel that going to VB.NET makes the most sense as a career path, even though they're well aware that very little of their existing knowledge base can be leveraged going forward. 他们觉得转向VB.NET最有意义的是作为职业道路,尽管他们很清楚他们现有的知识库很少能够在未来得到充分利用。
Given this fact, they also considered moving to C#, which indeed seems to be the most used language on the .NET platform today. 鉴于这一事实,他们还考虑转向C#,这实际上似乎是当今.NET平台上使用最多的语言。 However, given the great amount of new knowledge they already have to learn in order to start using .NET, they preferred to go for a language with a familiar synthax. 然而,鉴于他们为了开始使用.NET而必须学习的大量新知识,他们更喜欢使用熟悉的synthax语言。

In my opinion this proves exactly the purpose of VB.NET. 在我看来,这证明了VB.NET的目的。 That is to help bring the large base of VB developers in the world over to .NET, giving them the ability to use a language that "feels" familiar to them. 这是为了帮助将世界上大量的VB开发人员带到.NET中,使他们能够使用“感觉”熟悉的语言。
Also, the backwards compatibility layer built in VB.NET makes it possible to port existing (large) applications written in VB to new platform one piece at a time, while keeping them running. 此外,VB.NET内置的向后兼容层使得可以将用VB编写的现有(大型)应用程序一次一个地移植到新平台,同时保持它们运行。

The only argument I have to keep using VB.net is: 我必须继续使用VB.net的唯一参数是:

  1. I hate case-sensitive languages (like C#) 我讨厌区分大小写的语言(比如C#)

It is dumb, the first thing after creating a case sensitive language is creating a best-practice "Do not use the same variable name with different case ever" 它是愚蠢的,创建一个区分大小写的语言之后的第一件事是创建一个最佳实践“不要使用相同的变量名称与不同的情况下”

I know they want to copy Java case-sensitivity, but was really a dumb decision. 我知道他们想要复制Java区分大小写,但实际上是一个愚蠢的决定。

Re point 1: 重点1:

Well, my shop was a VB6 house - with lots of VB6 code to support, and we moved straight to C# with no problems. 好吧,我的商店是一个VB6的房子 - 有很多 VB6代码支持,我们直接转向C#没有问题。 We did have to think about the decision, but I am 100% (or more) confident that we made the right choice. 我们确实需要考虑这个决定,但我100%(或更多)确信我们做出了正确的选择。

Re point 2: 重点2:

You'd be amazed at how much I don't need this day to day ;-p 你会惊讶于我这天不需要多少钱;-p

I have nothing against VB.NET - I simply feel that C# allows me to do my job more elegantly. 我没有反对 VB.NET - 我只是觉得C#允许我更优雅地完成我的工作。

Re the books etc - I wonder if there isn't a contingent of ex-VB6 developers who are still writing VB6 in VS2008. 重新阅读书籍 - 我想知道是否还没有一批前VB6开发人员仍然在VS2008中编写VB6。 Making the switch to C# really helped me appreciate the new (at the time) .NET architecture. 切换到C# 真的帮助我欣赏新的(当时).NET架构。 If I had moved to VB.NET I don't think I would have made that mental leap - at least for some time. 如果我转移到VB.NET,我认为我不会做出那种精神上的飞跃 - 至少在一段时间内。

This doesn't pertain to the question but to the comments being made to the questions 这不是问题,而是与问题的评论有关

Reading this comments reminds me of back in the 70s and 80s when I read about people using any high level programming versus assembly. 阅读这些评论让我想起了70年代和80年代,当我读到人们使用任何高级编程与汇编时。 The assembly programmer had an 'elite' status compared to those who used high level languages like ... C! 与那些使用高级语言的人相比,汇编程序员具有“精英”地位。

And it was baloney then and it still baloney now that it is C# vs VB.NET. 然后它就是baloney,现在它仍然是B#,它是C#vs VB.NET。

Experienced programmers like using C# because it terse. 有经验的程序员喜欢使用C#因为它简洁。 There less damn typing involved. 所涉及的打字较少。 I rarely see new languages where they to try expand the amount of typing you have to do. 我很少看到他们尝试扩展你必须做的打字量的新语言。 C# is no exception. C#也不例外。

But... there a problem with this. 但是......这有问题。 The problem of maintainability. 可维护性问题。 The more terse a language is the harder it is to go back 5 years, 10 years later and read what you were doing. 语言越简洁就越难回溯5年,10年后再读你正在做的事情。 Which is why I use VB.NET in preference to C# or other C style language. 这就是我使用VB.NET而不是C#或其他C风格语言的原因。 And before you bust my chops about being a VB programmer I maintain software simulations of various historical spacecrafts in C++. 在你成为一名VB程序员之前,我会在C ++中维护各种历史航天器的软件模拟。 I use both styles extensively. 我广泛使用这两种风格。

Now it not a dramatic difference. 现在它没有戏剧性的差异。 But combine experienced programmers with the religious attachment many have to their favorite language it no wonder question like Tyndall comes up. 但是,将经验丰富的程序员与他们最喜欢的语言结合起来,很多人都不会怀疑像廷德尔这样的问题。

QuickBASC/PDS/Visual Basic family of languages continue to sell for Microsoft because they are not terse. QuickBASC / PDS / Visual Basic系列语言继续为Microsoft销售,因为它们并不简洁。 Because they are more readable. 因为它们更具可读性。 While this feature doesn't appeal to many experienced programmers it does appeal to many starting out. 虽然这个功能对许多有经验的程序员没有吸引力,但它确实吸引了许多初学者。 Combined with the religious attachment many develop toward their tools they stick with it throughout their careers. 结合许多人对他们的工具发展的宗教依恋,他们在整个职业生涯中坚持使用它。 Plus the Visual BASIC has a populist aura about it that is appealing to many. 此外,Visual BASIC有一个关于它的民粹主义光环,吸引了许多人。

Like most things with populist appeal is looked down on by the elites. 像大多数具有民粹主义吸引力的事情被精英们所瞧不起。 Conversely it gives the language a lot of users. 相反,它为语言提供了很多用户。 So it not likely that it will be axed by Microsoft any time soon. 所以它不太可能很快被微软削减。

I'm sure there are a lot more VB.NET developers buying books to learn C# than vice versa. 我确信有更多的VB.NET开发人员购买书籍来学习C#,反之亦然。 They know they'll get more respect (reasonably or not) if they switch. 他们知道,如果他们转换,他们会得到更多尊重(合理与否)。

Paul Vick , who was the language architect for VB.NET at the time, wrote this in 2008. Paul Vick当时是VB.NET的语言架构师,他在2008年写道。

Our users [VB developers] run the gamut from people who are picking up a programming tool for the first time to industry veterans building large-scale commercial applications. 我们的用户[VB开发人员]从首次购买编程工具的人员到构建大规模商业应用程序的行业资深人士那里运行。 The key to designing a framework that appeals to Visual Basic developers is to focus on allowing them to get the job done with the minimum of fuss and bother... A framework that uses the minimum number of concepts is a good idea [for VB.NET developers] not because VB developers can't handle concepts, but because having to stop and think about concepts extraneous to the task at hand interrupts workflow. 设计一个吸引Visual Basic开发人员的框架的关键是专注于允许他们以最少的麻烦和麻烦完成工作......使用最少数量的概念的框架是一个好主意[对于VB。 .NET开发人员]不是因为VB开发人员无法处理概念,而是因为必须停下来思考与手头任务无关的概念会中断工作流程。 The goal of a Visual Basic developer usually is not to learn some interesting or exciting new concept... but to get the job done and move on. Visual Basic开发人员的目标通常不是学习一些有趣或令人兴奋的新概念......而是要完成工作并继续前进。

From the . 来自 。 NET Framework Design Guidelines 2nd Edition page 10. NET Framework设计指南第2版​​第10页。

Yes, there are more C# books, and the C# community is more active, but at the same time both languages use the same framework, and have mostly the same features, which means a VB.NET programmer can pick up a C# book and understand it with no problem if he knows the C# syntax (which is close to many other languages' syntax). 是的,有更多的C#书籍,C#社区更活跃,但同时两种语言都使用相同的框架,并且具有大部分相同的功能,这意味着VB.NET程序员可以拿起C#书并理解如果他知道C#语法(它接近许多其他语言的语法)就没问题了。

At the end of the day there is no BIG advantage of choosing one language over the other. 在一天结束时,选择一种语言而不是另一种语言没有大的优势。 Because of the reasons you mentioned, I'd choose C# if your team had no preference, but if most came from a VB6 background, I'd see no problem choosing the VB language. 由于你提到的原因,我选择C#,如果你的团队没有偏好,但如果大多数来自VB6背景,我会发现选择VB语言没有问题。

That's what happened in my organization. 这就是我组织中发生的事情。 Most of our software was written in VB6 before so they decided to go with the syntax that the team was already familiar with, and I don't have a problem with that. 我们的大多数软件都是用VB6编写的,所以他们决定采用团队已经熟悉的语法,我没有遇到任何问题。

I worked for a small company with an existing ASP/VB6 codebase, built by several different devs, each with their own "stamp" to put on it. 我曾在一家拥有现有ASP / VB6代码库的小公司工作,该代码库由几个不同的开发人员构建,每个开发人员都有自己的“印章”。

Like many, BASIC was my first language in the early 80's, but I "graduated" to assembly (6502 and x86), and have wandered through many languages to what I hope is strength in C/C++ (tho' I always have more to learn). 像许多人一样,BASIC是80年代早期的第一语言,但是我“毕业”到汇编(6502和x86),并且已经在许多语言中徘徊到我希望的C / C ++中的优势(我总是有更多的东西)学习)。 I'm very much a "right tool for the job" kind of guy, so I even learned (and learned to hate) VB, from 3 up through 6 and VBScript. 我非常喜欢“工作的正确工具”,所以我甚至学会了(并且学会了讨厌)VB,从3到6和VBScript。

I picked up C# fairly easily, and was slowly working on converting my ratty old codebase to C#, when the company was purchased. 我很容易拿起C#,当公司被购买时,我正在慢慢地将我的旧代码库转换为C#。 $corporate_owner has standardized on VB.Net. $ corporate_owner已经在VB.Net上进行了标准化。 The things that drive me nuts about VB are some of the same things that others love, namely all the syntactic sugar (excess verbosity). 让我对VB感到疯狂的事情是其他人喜欢的一些东西,即所有语法糖(过多的冗长)。

There's also the dislike of VB among "real" programmers that Jeff has written about before. 在Jeff之前写过的“真实”程序员中也不喜欢VB。

All in all, VB.net just isn't "cool". 总而言之,VB.net并不“酷”。 However, it does have many advantages (syntactic sugar, familiarity, ease of learning); 然而,它确实有许多优点(语法糖,熟悉,易学); I know of at least one college that has a VB.net course as part of their required CS and CIS curricula. 我知道至少有一所大学有VB.net课程作为他们所需的CS和CIS课程的一部分。

Anyway, because of its ease-of-use, and the relatively straightforward upgrade path, I don't see it going away any time soon. 无论如何,由于它的易用性和相对简单的升级路径,我不认为它会很快消失。 At least it's not as brain-damaged as it used to be. 至少它不像过去那样受到脑损伤。

I think you will find its not the language but the people that use it. 我想你会发现它不是语言而是使用它的人。 Forcing these people to use C# wont solve the core problem. 强迫这些人使用C#不会解决核心问题。

However if you do program in C# chances are you are more likely to get a better class of programmer next time you hire if they have this as an existing skill. 但是,如果您使用C#进行编程,那么如果您将此作为一项现有技能,那么下次您聘用时,您更有可能获得更好的程序员。 (This is not to say there are no good VB.net programmers, as i have known some great VB.Net programmers. Or even that all C# programmers are great.) (这并不是说没有好的VB.net程序员,因为我认识一些优秀的VB.Net程序员。或者甚至所有C#程序员都很棒。)

However in my experience the poorer skilled programmers tend to stick with VB and VB.Net and don't even want to look at C# or any other language outsite VB/VB.Net 但是根据我的经验,较差的熟练程序员倾向于坚持使用VB和VB.Net,甚至不想看看C#或任何其他语言的外部VB / VB.Net

There are lots of good answers here already, but my take on the original question is that what really needs to be answered is not why people stick with VB.NET, but rather what makes C#.NET the language of choice for .NET books, samples and toolsets? 这里有很多好的答案,但我对原始问题的看法是,真正需要回答的不是为什么人们坚持使用VB.NET,而是为什么使C#.NET成为.NET书籍的首选语言,样品和工具集?

I think there are three things operating here: 我认为这里有三件事:

1. The first people into C#.NET were curious by nature - that's why they went for the new language rather than sticking with something interesting. 1.第一批进入C#.NET的人本质上很好奇 - 这就是为什么他们选择新语言而不是坚持一些有趣的东西。 So yes, it did get more curious people at first ;D 所以,是的,一开始它确实让人感到好奇; D

2. C#.NET was Microsoft's way of attracting Java programmers into the .NET world, and it worked pretty well. 2. C#.NET是微软吸引Java程序员进入.NET世界的方式,而且效果很好。 Many of the best ideas in .NET have been ported from Java, and hence get ported into C#.NET first. .NET中的许多最佳创意都是从Java移植过来的,因此首先将其移植到C#.NET中。 They only end up in VB.NET after they go mainstream. 他们进入主流后才最终进入VB.NET。 See this article for an example of how C#.NET was seen as a reaction to the failure of Microsoft to have their own Java version. 有关C#.NET如何被视为对Microsoft无法拥有自己的Java版本的反应的示例,请参阅此文章

One reaction to it is telling: 对它的一个反应是:

"I'm not a MS programmer, but if I'm ever forced to move there from Java, I know I won't be totally lost and useless now that they have C#." “我不是一名MS程序员,但如果我被迫从Java迁移到那里,我知道我不会因为他们拥有C#而完全迷失和无用。”

3. VB.NET programmers are as smart and curious as any other programmer, so when they see a C#.NET book that deals with a topic they find interesting they buy it and convert what they need to know to VB.NET - or even just implement it in a separate C#.NET DLL in their VB.NET projects. 3. VB.NET程序员和任何其他程序员一样聪明和好奇,所以当他们看到一本处理他们感兴趣的主题的C#.NET书籍时,他们会购买它并将他们需要知道的内容转换为VB.NET - 甚至只需在他们的VB.NET项目中的单独C#.NET DLL中实现它。

It sounds to me like the programming language isn't your company's main problem. 听起来像编程语言不是你公司的主要问题。 If I worked in your company I would set the priority on bringing the 80% who don't know what an OOD pattern is up to snuff. 如果我在贵公司工作,我会优先考虑让80%的人不知道OOD模式是什么样的。

Good code is good code, whether it's written in C# or VB.NET. 好的代码是好的代码,无论是用C#还是VB.NET编写的。

I think its more to do with the potential target audiences that VB.NET and C# would have appealed to when they started out. 我认为它更多地与VB.NET和C#在他们开始时所吸引的潜在目标受众有关。

Under the hood, its all the same (well mostly) but .NET Winforms/Websites etc... what you can do in VB.NET you can do in C# and vice-versa. 在引擎盖下,它完全相同(主要是)但是.NET Winforms / Websites等......你可以在VB.NET中做什么,你可以在C#中做,反之亦然。 So the question isn't really relevant in terms of functionality 所以问题在功能方面并不真正相关

Completely subjective opinion, but I'd say anyone who jumped on the VB.NET Bandwagon would have come from a background in VB6/Classic ASP. 完全主观的意见,但我会说任何跳过VB.NET Bandwagon的人都会来自VB6 / Classic ASP的背景。 However the ability to jump on the C# bandwagon extends to people with Java/C++/Other OO Backgrounds. 然而,跳过C#潮流的能力扩展到了具有Java / C ++ /其他OO背景的人。

So from the outset, you have a larger community of people taking up C#, it makes sense that there are more educators/contributors/Open Source projects under that language 因此,从一开始,您就拥有了一个更大的人群来接受C#,因此在该语言下有更多的教育者/贡献者/开源项目是有道理的

At my workplace, VB.NET was the standard up until recently as several of the previous developers came from a classic ASP background and were familiar with VB syntax. 在我的工作场所,VB.NET是最近的标准,因为之前的几个开发人员来自经典的ASP背景并且熟悉VB语法。 As our development team has matured, and we've adopted more sophisticated design methodologies (DDD, good OOD), there has been a natural shift towards using C#. 由于我们的开发团队已经成熟,并且我们采用了更复杂的设计方法(DDD,良好的OOD),因此自然转向使用C#。

In most instances I would guess that shops using VB.Net is a pragmatic choice, rather than a technical one. 在大多数情况下,我猜想使用VB.Net的商店是一个实用的选择,而不是技术选择。 That being said, VB.Net really is a much more capable language than it's predecessors - it just lacks some of the elegance of C#, and as you've discovered there's much more material related to development in C# on the web. 话虽这么说,VB.Net确实是一种比它的前辈更有能力的语言 - 它只是缺乏一些C#的优雅,而且你已经发现在网络上有更多与C#开发相关的资料。

I'm only now making the switch to .NET, after having maintained existing VB6 code for a number of years following the advent of .NET. 在.NET出现后,我在维护现有的VB6代码数年之后才开始转向.NET。 I believe I'm justified in considering myself a VB6 expert. 我相信我认为自己是VB6专家是合理的。 My current employer is standardized on VB.NET. 我目前的雇主在VB.NET上标准化。

For a number of reasons I find that I have some slack time in which to learn the new language. 出于多种原因,我发现我有一些闲暇时间学习新语言。 I'm using an ASP.NET book that has all code in both, and while I'm typing in the VB I'm making a point of reading the C# as I go.. There are a few things I've seen that one language does "better" than the other (a subjective call...), going both directions. 我正在使用一本包含所有代码的ASP.NET书籍,当我在VB中输入时,我正在阅读C#,因为我去了...有一些我见过的东西一种语言比另一种语言“更好”(一种主观的呼唤......),朝两个方向发展。

My sense so far is that by the time I finish this process I'll be able to go back & forth with a reasonable degree of comfort. 到目前为止,我的感觉是,当我完成这个过程时,我将能够以合理的舒适度来回走动。 I'm certainly not incurious--if I were, would I be here are SO? 我当然不是无礼 - 如果我是,我会在这里吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM