VB - trivial improvements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Z3V5?=

    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
  • Cor Ligthert [MVP]

    #2
    Re: VB - trivial improvements

    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" <guy@discussion s.microsoft.com schreef in bericht
    news:EB626D6D-D925-4A3F-845C-8B92494A87A4@mi crosoft.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

    Comment

    • =?Utf-8?B?Z3V5?=

      #3
      Re: VB - trivial improvements



      "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

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: VB - trivial improvements

        "guy" <guy@discussion s.microsoft.com schrieb:
        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.panopticonc entral.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/>

        Comment

        • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

          #5
          RE: VB - trivial improvements



          "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.

          Comment

          • Andrew Morton

            #6
            Re: VB - trivial improvements

            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


            Comment

            • =?Utf-8?B?QU1lcmNlcg==?=

              #7
              RE: VB - trivial improvements

              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.

              Comment

              • Spam Catcher

                #8
                Re: VB - trivial improvements

                "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in
                news:OAlTI4IdIH A.1208@TK2MSFTN GP03.phx.gbl:
                "guy" <guy@discussion s.microsoft.com schrieb:
                >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.



                --
                spamhoneypot@ro gers.com (Do not e-mail)

                Comment

                • Tom Shelton

                  #9
                  Re: VB - trivial improvements

                  On 2008-02-21, Cor Ligthert [MVP] <notmyfirstname @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

                  Comment

                  • Patrice

                    #10
                    Re: VB - trivial improvements

                    I would rather favor adding new keywords to support new features rather than
                    changing existing keywords IMO doing more arm than anything else...



                    "guy" <guy@discussion s.microsoft.com a écrit dans le message de news:
                    EB626D6D-D925-4A3F-845C-8B92494A87A4@mi crosoft.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

                    Comment

                    • Mark Lincoln

                      #11
                      Re: VB - trivial improvements

                      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.inv alid>
                      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

                      Comment

                      • Cor Ligthert[MVP]

                        #12
                        Re: VB - trivial improvements

                        >
                        Christmas promotions already - and it's only February!!!!!!! !!!!
                        >
                        >
                        You see kids thinks forever that Santa Claus has to do with Chritsmas gifts.



                        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

                        Comment

                        Working...