VB - 微不足道的改进 [英] VB - trivial improvements

查看:81
本文介绍了VB - 微不足道的改进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在VB中看到一个虽然但有三个微不足道的变化: -

1-让Null成为Nothing的同义词,逐步分阶段没什么,你

必须知道null,所以为什么不在VB中使用它?

2-使用Dec或Declare声明非数组变量,目前我们

将使用Dim。 Dim是一个软糖,因为我们没有标注任何东西。

3-允许''++''/'' - ''样式语法来递增/递减

数。这是一个简单简洁的简写。


有什么想法吗?


Guy

解决方案

盖伊,


你知道Null的意思吗,这是一个非常古老的用途,而不是基本的内存中字节实例化全零位。不是全部,在其他人身上使用

allF字节。


这个legancy用于C类语言,告诉我没有引用任何
,对我而言,它与调用引擎的燃料相同仍然是煤炭。


这对于增量器来说是相同的,你可以说VB的简单形式


对于i = 0到X


在我看来更容易


for(int i = 0; i< X; i ++);

但是如果你想要更换Dim(我不想要的东西,我想要它/ b $ b可选),为什么不使用var?因为它是在C#中暂时引入的,因此
与C#中的Dim具有(不完全)相同的行为。


如果你想使用legancy行为来自C语言,然后使用那些。


只是我的意见。


Cor


" ;人" < gu*@discussions.microsoft.comschreef在bericht

新闻:EB *************************** ******* @ microsof t.com ...


我想在VB中看到一个虽然但有三个微不足道的变化: -

1-让Null成为Nothing的同义词,逐步分阶段没什么,



无论如何必须知道null所以为什么不在VB中使用它?

2-使用Dec或Declare声明非数组变量,其中当前我们使用Dim的
。 Dim是一个软糖,因为我们没有标注任何东西。

3-允许''++''/'' - ''样式语法来递增/递减

数。这是一个简单简洁的简写。


有什么想法吗?


Guy






" Cor Ligthert [MVP]"写道:


Guy,


你知道Null的意思吗,



是的我

..


>

这对增量器来说是一样的,VB的简单形式你可以说


对于i = 0到X


在我看来更容易然后


for(int i = 0; i< X; i ++);



完全同意


>

但是如果你想要更换昏暗(我不想要的,我想要它

可选),为什么不使用var因为它是在C#中最终引入的,所以
与C#中的Dim具有(不完全)相同的行为。



是Var会好的


如果你想使用C类语言的legancy行为,那么使用那些。


只是我的意见。


Cor



Snip


Guy


" guy" < gu*@discussions.microsoft.comschrieb:


我想在VB中看到一个虽然但有三个微不足道的变化: -

1-让Null成为Nothing的同义词,逐步分阶段没什么,



无论如何必须知道null所以为什么不在VB中使用它?



这个改变会解决哪个问题?


2-使用Dec或声明声明非数组变量当前我们将使用Dim。
将使用Dim。昏暗是一种软糖,因为我们没有标注任何东西。



这个改变会解决哪个问题?


3-允许''++' '/'' - ''用于递增/递减

数字的样式语法。这是一个简单简洁的速记。



阅读:


为什么不用++和 - ?

< URL: http://www.panopticoncentral.net/archive/2003/12/02/251.aspx>


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs />


Just a though but three trivial changes which I would like to see in VB:-
1- Make Null a synonym for Nothing, progressively phasing Nothing out, you
have to know null anyway so why not use it in VB?
2- Use Dec or Declare to declare non array variables where currently we
would use Dim. Dim is a fudge, as we are not ''dimensioning'' anything.
3- Allow the ''++'' / ''--'' style syntax for incrementing / decrementing a
number. It is a simple concise shorthand.

any thoughts?

Guy

解决方案

Guy,

Do you know what Null means, it is an very ancient use for not the basic
instancing of bytes in memory with all zero bits. Not all, on others is used
all "F" bytes.

This legancy is used in C type languages to tell that there is Nothing
referenced, for me it is the same as calling fuel for an engine still coals.

This the same for the incrementer, the simple form of VB were you can say

For i = 0 to X

seems to me more easy then

for(int i = 0;i < X;i++);
However if you want to replace the Dim (what I don''t want, I want it
optional), why than not use the "var" as it is recentely introduced in C# to
have the (not complete) same behaviour as the Dim in C#.

If you want to use legancy behaviour from C type languages, then use those.

Just my opinion.

Cor

"guy" <gu*@discussions.microsoft.comschreef in bericht
news:EB**********************************@microsof t.com...

Just a though but three trivial changes which I would like to see in VB:-
1- Make Null a synonym for Nothing, progressively phasing Nothing out,
you
have to know null anyway so why not use it in VB?
2- Use Dec or Declare to declare non array variables where currently we
would use Dim. Dim is a fudge, as we are not ''dimensioning'' anything.
3- Allow the ''++'' / ''--'' style syntax for incrementing / decrementing a
number. It is a simple concise shorthand.

any thoughts?

Guy





"Cor Ligthert [MVP]" wrote:

Guy,

Do you know what Null means,

yes I do
..

>
This the same for the incrementer, the simple form of VB were you can say

For i = 0 to X

seems to me more easy then

for(int i = 0;i < X;i++);

totally agree

>
However if you want to replace the Dim (what I don''t want, I want it
optional), why than not use the "var" as it is recentely introduced in C# to
have the (not complete) same behaviour as the Dim in C#.

yes Var would be fine

If you want to use legancy behaviour from C type languages, then use those.

Just my opinion.

Cor

Snip

Guy


"guy" <gu*@discussions.microsoft.comschrieb:

Just a though but three trivial changes which I would like to see in VB:-
1- Make Null a synonym for Nothing, progressively phasing Nothing out,
you
have to know null anyway so why not use it in VB?

Which problem would be solved by this change?

2- Use Dec or Declare to declare non array variables where currently we
would use Dim. Dim is a fudge, as we are not ''dimensioning'' anything.

Which problem would be solved by this change?

3- Allow the ''++'' / ''--'' style syntax for incrementing / decrementing a
number. It is a simple concise shorthand.

Read:

Why not ++ and --?
<URL:http://www.panopticoncentral.net/archive/2003/12/02/251.aspx>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


这篇关于VB - 微不足道的改进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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