473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

VB - trivial improvements

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
Feb 21 '08 #1
11 1111
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

Feb 21 '08 #2


"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
Feb 21 '08 #3
"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/>

Feb 21 '08 #4


"guy" wrote:
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
I don't see how this benefits someone learning VB. It may help someone
coming from C# but picking up these going C# -VB.Net is not difficult by
any means. I think giving choices hurts those migrating VB6 -VB.Net, which
seems to be the more common migration path.

Feb 21 '08 #5
guy wrote:
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?
How about Void? A void is a nothingness...
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'
Or Var... seeing as that's what ECMAScript uses. Or just drop it and program
the compiler to use whatever comes before As as a New variable name.
anything. 3- Allow the '++' / '--' style syntax for incrementing /
decrementing a number. It is a simple concise shorthand.
Well, as has been pointed out, due to the multiplicity of the symbols, it
might appear that you want to increment/decrement by two rather than one.
Also, it might confuse people who are used to seeing ** mean ^. How about
just a single + or -?
>:-)
Andrew
Feb 21 '08 #6
Just a though but three trivial changes which I would like to see in VB:-

The thing I miss the most in VB is macros (#define) including the
stringizing operator (#) and the token pasting operator (##). Macros are
easily abused and overused, but I like them.

Feb 21 '08 #7
"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in
news:OA**************@TK2MSFTNGP03.phx.gbl:
"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?
It brings it inline with other .NET languages.

I would prefer Null over Nothing as well.

--
sp**********@rogers.com (Do not e-mail)
Feb 21 '08 #8
On 2008-02-21, Cor Ligthert [MVP] <no************@planet.nlwrote:

<snip>
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#.
What do you mean by this comment? var was introduced to preserve the C#
style of declaration and support anonymous types. var is more of a type
place holder, like T in a generic declaration than a synonym to the dim
keyword.

--
Tom Shelton
Feb 21 '08 #9
I would rather favor adding new keywords to support new features rather than
changing existing keywords IMO doing more arm than anything else...

"guy" <gu*@discussions.microsoft.coma écrit dans le message de news:
EB**********************************@microsoft.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

Feb 21 '08 #10
No, let's not drop it. I like something at the beginning of the line
that immediately tells me there's a variable being declared instead of
my having to interpret it--as if I don't have enough trouble
interpreting my own code. I could live with Var (eventually) were it
to come to that, but there should be some clear indication of variable
declaration.

And no, let's not use "Dec" to declare variables. "Dec" is too easily
interpreted as meaning "Decrement."

Mark Lincoln

On Feb 21, 10:15*am, "Andrew Morton" <a...@in-press.co.uk.invalid>
wrote:
guy wrote:
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'

Or Var... seeing as that's what ECMAScript uses. Or just drop it and program
the compiler to use whatever comes before As as a New variable name.
-snip-
Andrew
Feb 22 '08 #11
>
Christmas promotions already - and it's only February!!!!!!!!!!!

You see kids thinks forever that Santa Claus has to do with Chritsmas gifts.

http://en.wikipedia.org/wiki/Saint_Nicholas

By the way, did you know that Dutch kids use Santa Claus in the Dutch
tradition and in the USA tradition.

(And get twice gifts, maybe something for you)

Cor

Feb 24 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Zurab Davitiani | last post by:
Just want to note few improvements I saw, beyond obvious, while porting my packages to PHP5 (in case anyone is interested): - garbage collection seems to have much improved compared to PHP4; and...
3
by: Terry Reedy | last post by:
In Friday's occasional newsletter to registerees, SourceForge announced that it has deployed SpamAssassin (written in Python) and ClamAV to have curb the inundation. It also announced Boa...
1
by: bml | last post by:
Is "Trivial constructor" either a default constructor generated by compiler or the one you write but it does nothing (empty inside method definition)? Is it required by C++ standard to bypass...
23
by: Rotem | last post by:
Hi, while working on something in my current project I have made several improvements to the logging package in Python, two of them are worth mentioning: 1. addition of a logging record field...
2
by: Bennett Smith | last post by:
Could anyone within Microsoft comment on the status of the XmlResolver class in upcoming versions of the .NET framework? I am particularly interested in hearing about any improvements in how...
3
by: baibaichen | last post by:
hi, i am reading a C++ book, it mentions a term non-trivial object. what i understand is: if a object has: a) trivial constructor b) trivial assignment operator c) trivial destructor then it...
4
by: Edward Diener | last post by:
When I try to find out if a trivial event has handlers, by comparing the event to nullptr, I get compiler error C3918. So my natural question is how does one test a trivial event for handlers ?
1
by: Frank Rizzo | last post by:
According to ScottGu, Winforms will experience some cold startup improvements following the installation of .net 3.5 sp1. That's due the way pages are loaded from disk. Does anyone know whether...
18
by: maxhugen | last post by:
I have an Access app (split into FE and BE) running for some years, that is now also being used in a second office, connected by a WAN. This office has network problems, as it's over-utilized (97%...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.