Re: VB Compiler Warnings & other woes ...
From: guy (guy_at_discussions.microsoft.com)
Date: 07/05/04
- Next message: Cor Ligthert: "Re: Original Rows"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: Question on structures...."
- In reply to: Richard Myers: "Re: VB Compiler Warnings & other woes ..."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 4 Jul 2004 23:51:01 -0700
looks like MS thinks you are wrong Richard
>From vs2005 bv newsgroup post...
Subject: function return values
From: "[MS]John@data.vb" <anonymous@discussions.microsoft.com> Sent: 7/2/2004 12:56:27 PM
Yes, you will get this warning in vs 2005. Check this
feature out in the beta1.
Also you will get a green squiggle in the function with
nice tooltips to indicate what is going on.
John@data.vb
This posting is provided "AS IS" with no warranties, and
confers no rights.
.
sorry for the cross post (dotnet.general....)
It would be really nice if we could have an
Option VeryStrict (or similar)
that caused a compilation warning or error for function
calls that did not assign return values
eg
Split(MyString,",")
instead of
MyArray = Split(MyString,",")
The time overhead of having to type Bitbucket= ...
when i dont need the return value would be more than
recovered by having bugs trapped at compile time rather
than runtime.
cheers
gu
.
"Richard Myers" wrote:
>
> > I think I was unable to make myself clear.
>
> Yup!
>
> >
> > What I meant was that " By Default " the language should be as rigid as
> C# -
> > atleast at compiler level.
>
> You've completely overlooked the fact the C# is a new language. It doesn;t
> have a direct legacy language path of evolution to consider. VB.Net does. I
> suggest you step out from behind your own monitor and look at the big
> picture.... from Microsofts point of view...rather than just your own.
>
>
> > And you might be allowed to write as crappy code as possible to make it
> > flexible and to support VB6 code which I suppose is what you prefer under
> > the flag of FLEXIBILITY.
>
> Well again, that would be your connotation....your the one with the problem.
> If you want to rewrite the upgrade wizard for Microsoft so that it does a
> perfect conversion then im sure they would be willing to pay you.
>
> > Have you seen the writing on the wall, it clearly says that Microsoft is
> > trying to promote VB as an inferior language as compared to C# despite the
> > reality.
>
> Your contridicting yourself here. Despite what reality?
>
> > Why is it so that the recent Data Structures Articles on MSDN are made
> using
> > C# ONLY ???
> > Why most of the Controls and Class Libraries are written in C# ???
> > Why in the casestudies section of Microsoft site, its hard to find a
> > solution in VB.NET ???
>
> Perhaps because VB.Net has a natural audience, VB6 programmers. Whereas C#
> being a new langauge does not. In order to attract Java developers to the
> ..Net platform Microsoft overemphasises C#. Its good business sense.
> And as for controls and class libraries... who cares? Its all MSIL by the i
> use it anyway?
>
> > Thats what i was referring to - VB is made to look like a language that
> > makes toys. Everyone knows that the only diefference between VB and C# is
> that of syntax
> > and unsafe code. Even then this biased promotion is both frustating and
> uncomprehendable.
>
> Well i disagree with half of that and dont understand what you've said in
> the other half.
>
>
> > I am really sorry in advance but I beleive your first and last comments
> are
> > a direct attack on my credibility and competence ....
>
> Im sure the VB.Net could feel the same about your post.
>
> > Well I am not aware if you have ever worked on any large project
> comprising
> > of large number of developers and modules.
> > In such scenarios, you need a little help from the compiler - which is
> > priceless when you are debugging.
>
> And we get plenty. The size of the project is a misnomer. Any half wit
> systems architect is going to functionally decompose his project into
> managable chunks. To suggest that there is something wrong with the language
> because it doesn;t spoonfeed you your code is a classic case of the poor
> workman blaming his tools. If your projects are that unweildy, sack your SA.
>
> Lets say it did force a 'Return'. What happens if the variable your
> returning is nothing i.e it hasn;t been initialised. You've still got
> precisely the same problem, and this can only be detected at runtime. Its
> not the compilers fault the developer is sloppy. So what difference does it
> make? Thats why we unit test, right?
>
> > What are compiler warnings - they are clues that there might be something
> > wrong.
> > Every one can make a mistake. That mistake can result in frustation and
> time
> > spent debugging the code.
>
> No kidding.
>
> > Some of these mistakes can easily be tackled by compiler warnings.
>
> Well as above different error, same problem. You still have to test and i'd
> sack anybody who had trouble finding such a basic error. I mean really, a
> function that doesn't return a value, shouldn;t even make it to the testers,
> thats just piss poor coding and no one will convince me other wise.
>
> > In C++ , its is a recommended practice that you write your code to promote
> > compile time errors rather than runtime.
>
> But this is VB.Net? C++ might as well be from another planet.
>
> > And I hope you wont deny the fact that Runtime Errors are far more
> difficult
> > to catch and fix rather than simple Compile Time Errors.
>
> Generally speaking sure..... but you're talking about a very specific
> runtime error and for that Ive gotta say "C'mon"?
>
> > And I hope you understand that my idea of TOY was by no means based on
> what
> > I develop with VB.NET , rather what is promoted.
> >
>
> Well obviously i completely disagree. Your right I know nothing of you,
> wouldn;t know you from a bar of soap, but im always sceptical about anyone
> claiming to be pushing the boundaries of any language. Aren;t you just
> contridicting yourself.... on the one hand you say "All Microsoft is
> allowing us to build with such a *your beliefs* second rate language is TOYS
> and then in the same breath you go onto say "but i develop so much more than
> just TOYS".
>
> If so then whats your problem?
>
> Richard
>
>
>
>
- Next message: Cor Ligthert: "Re: Original Rows"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: Question on structures...."
- In reply to: Richard Myers: "Re: VB Compiler Warnings & other woes ..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|