一个VB.NET批判 [英] A VB.NET Critique

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

问题描述

下页有一篇VB.NET评论:
http://www.vb7-critique.741.com/

感兴趣的人。请随意查看并分享您的
想法。


干杯,Eric。


Ps:for关于comp.programming的那些,这可能是偏离主题的,但我已经在那里张贴了
,因为批评是那个

组讨论的一部分。

There is a VB.NET critique on the following page:
http://www.vb7-critique.741.com/
for those who are interested. Feel free to take a look and share your
thoughts.

Cheers, Eric.

Ps: for those on comp.programming, this may be off topic, but I''ve
posted there because the critique was part of a discussion in that
group.

推荐答案

* 呃******** @ email.com (Eric)scripsit:
* er********@email.com (Eric) scripsit:
下一页有一个VB.NET评论:
http://www.vb7-critique.741.com/
对于有兴趣的人。请随意查看并分享您的想法。
There is a VB.NET critique on the following page:
http://www.vb7-critique.741.com/
for those who are interested. Feel free to take a look and share your
thoughts.




< http://www.vb7-critique.741.com/VB7_Semantics_Critique.htm> ;:


我不明白允许递归调用程序有什么不好。

问题适用于用户的每个功能。编程

语言可以写。离开那个 IMO是一个无用的例外。


< http://www.vb7-critique.741.com/VB7_OOP_Critique.htm>:


由于我不是母语为英语的人,所以我没有任何问题要理解''MustInherit'的含义。如果我使用编程

语言,我首先阅读它的语法定义,然后看看

代码。


< http://www.vb7-critique.741.com/VB7_Type_System_Critique.htm>:


阵列基础:是的,我同意,这是一个问题。但这不是一个问题。

VB.NET。在
..NET / VB.NET的早期测试阶段有很多讨论。我从不喜欢基于0的数组。我更喜欢VB6中的数组,比如

。对于数组的声明(指定上限

绑定而不是元素数)也是如此。这个问题可以通过

将数组的默认起始索引更改为1来解决。


字段初始化程序:确认。这是一个丑陋的限制。


< http://www.vb7-critique.741.com/VB7_Syntax_Critique.htm>:


由于分配给一个似乎没有类型的

变量,这段代码将是IMO真的很难看:


\ \\

Dim c = 1,d = 2,e As Integer = 3

///


I 我现在要去睡觉了......


-

Herfried K. Wagner [MVP]

< http ://www.mvps.org/dotnet>



<http://www.vb7-critique.741.com/VB7_Semantics_Critique.htm>:

I don''t understand what''s bad to allow to call a procedure recursively.
The "problem" applies to every function the "user" of the programming
language can write. Leaving "that out" is IMO a useless exception.

<http://www.vb7-critique.741.com/VB7_OOP_Critique.htm>:

As I am not a native English-speaker, I don''t have any problem to
understand the meaning of ''MustInherit''. If I use a programming
language, I read its syntax definition first and then have a look at the
code.

<http://www.vb7-critique.741.com/VB7_Type_System_Critique.htm>:

Array bases: Yes, I agree, that''s a problem. But it''s not a problem of
VB.NET. There was a lot of discussion in the early beta phase of
..NET/VB.NET. I never liked 0-based arrays. I would prefer arrays like
in VB6. The same for the declaration of arrays (specifying of the upper
bound and not the number of elements). This problem can be solved by
changing the default start index of arrays to 1.

Field Initializers: ACK. That''s an ugly limitation.

<http://www.vb7-critique.741.com/VB7_Syntax_Critique.htm>:

This code would be IMO really ugly because of the assignment to a
variable which doesn''t seem to have a type:

\\\
Dim c = 1, d = 2, e As Integer = 3
///

I''ll go to bed now...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


我应该修剪小组列表,但你的PS让我不确​​定

它。


2004-01-04,Eric< er ******** @ email.com>写道:
I should really trim the group list, but your PS made me unsure about
it.

On 2004-01-04, Eric <er********@email.com> wrote:
在下一页上有一个VB.NET评论:
http://www.vb7-critique.741.com/
随意看看并分享您的想法。


好​​的,一些想法,从语法部分开始。


关于多次初始化的长期咆哮有一定道理,但我是/>
亲自发现你所有的替代方案都要糟糕得多,而且要少得多。将varname之后的类型放在声明中会使得很多可用的语法变得不可能,但是这只是抱怨Basic

是Basic。


Is运算符测试两个引用是否相同,它使得

绝对没有意义允许它应用于值类型。真的,那是'b
只是不了解价值类型是什么。至于TypeOf,再次

应用于值类型绝对没有意义;有简单的

没有合理使用这样的功能。该语言是否仍然允许程序员为了完整性而做无意义的事情;

也许,但这正是你对* *的咆哮*你好

抱怨Sub Main可以递归。弥补你的想法。


如果你真的认为

Dim p为Point = {12,15}

简单易读,比

Dim p as New Point(12,15)

那么我很高兴你不要不做语言设计。

你不能声明一个结构类型的可选参数。
Public Sub Foo(可选Arg As SomeStructure = Nothing)
''这不会编译
为什么限制,当上述内容完全合理时?
There is a VB.NET critique on the following page:
http://www.vb7-critique.741.com/
for those who are interested. Feel free to take a look and share your
thoughts.
OK, a few thoughts, starting with the Syntax section.

The long rant about multiple initializations makes some sense, but I
personally find all of your alternatives to be much worse and much less
readable. Putting the type after the varname in declarations makes a
lot of usable syntax impossible, but that''s just complaining about Basic
being Basic.

The Is operator tests whether two references are identical, it makes
absolutely no sense to allow it to apply to value types. Really, that''s
just not understanding what a value type is. And as for TypeOf, again
it makes absolutely no sense to apply to a value type; there is simply
no possible reasonable use of such a feature. Should the language still
allow programmers to do nonsensical things for the sake of completeness;
maybe, but that''s exactly what you''re ranting *against* when you
complain about the fact that Sub Main can be recursive. Make up your
mind.

And if you really think
Dim p as Point = {12,15}
is much simpler and easier to read than
Dim p as New Point(12, 15)
then I''m kinda glad you don''t do language design.
You cannot declare an optional parameter which is of a structure type. Public Sub Foo(Optional Arg As SomeStructure = Nothing) ''this wont compile
Why the limitation, when the above makes perfect sense?



因为上面的内容并没有完全合理,事实上它完全没有意义




我会的放大一些其他的东西。首先,数组中的.Length和收藏中的
..Count没有测量相同的东西,如果有两个不同的属性,它会更加令人困惑意思是

同名。不断抱怨对象必须初始化

(比如数组和字符串)只是让我有些不自然;老实说,这个行为完全符合逻辑和简单。而且,基于零基础的数组更容易出错的想法只不过是个人的意见,而且面对大量的comp sci时会出现这种情况。 br $> b $ b文学作品。


我觉得你有一些不错的分数,但看起来这篇文章的一半来自于一篇文章来自a b $ b完全误解.NET类型和

坚持使用Option Strict Off。我同意你的一些
点,结构语义是乱七八糟的,数组声明是错误的b / b很容易发生,但不幸的是我也认为好点埋没在

a长期咆哮,要么表现出对b / b
语言的误解,要么只是愚蠢地挑剔(例如,

" MustInherit"例如,心怀不好的员工有不好的变量名称

('AAAAAAA'这样的名字会更具可读性吗?)。


总而言之,我认为如果你可以将这篇论文分开,这是一个有问题的结构,这就是为什么,这篇论文会更有用。问题

来自我会以这种方式完成问题。


嘿,你要求评论......


-

David

dfoster at

hotpop dot com



Because the above doesn''t make perfect sense, in fact it makes
absolutely no sense at all.

I''ll zoom through a few other things. First, .Length in arrays and
..Count in collections aren''t measuring the same thing, and it would be
much more confusing if two properties with such different meanings had
the same name. The constant complaints that objects must be initialized
(such as arrays and strings) just eludes me somewhat; I honestly find
the behavior to be perfectly logical and simple. And the idea that
zero-based arrays are more error prone is little more than personal
opinion, and one that flys in the face of an awful lot of comp sci
literature.

I think you have some decent points to make, but it seems like half of
the essay stems from a total misunderstanding of .NET types and an
insistence on working with Option Strict Off. I agree with some of your
points, structure semantics are a mess, array declarations are error
prone, but unfortunately I also think that the good points are buried in
a morass of long rants that either exhibit misunderstanding of the
language or are simply nit-picking at silly thing (e.g, the
"MustInherit" example, the disgruntled employee with bad variables names
(would names like ''AAAAAAA'' be any more readable?)).

All in all, I think the essay would be much more useful if you could
separate the "this is a problematic construction and here''s why" issues
from the "I would have done it this way" issues.

Hey, you asked for comments...

--
David
dfoster at
hotpop dot com


嗨Eric,


它看起来非常从个人观点来看很多。


虽然其中有一些元素可以考虑是否还有

元素,这里也讨论过并且有在这里受到批评,

但是实例数组和集合有一个可以理解的原因。

您可以将您的意见发送给VB.net开发组。

有很多聊天你可以参加。严肃的事情(甚至是愚蠢的事情)通常都会受到严重威胁。


这就是个人观点的一个例子。您正在谈论关于英国日期格式的
,您是否在谈论美国测量系统

(英里)和英国测量系统(米)?


只是我的想法


Cor
Hi Eric,

It looks very much written from a personal view.

Although there are elements in it that can be thought about are there also
elements that has been discussed here also and have been criticized here,
but have an understandable reason by instance arrays and collections.

You are able to give your comments to the VB.net development group. There
are many chats in with you can participate. Serious things (and even stupid
things) are there normally threaten seriously.

An example of that what it makes a personal view is this. You are talking
about UK date format, are you talking in future about the US measure system
(miles) and the UK measure system (meters)?

Just my thoughts

Cor


这篇关于一个VB.NET批判的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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