By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,315 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,315 IT Pros & Developers. It's quick & easy.

"VB" without Microsoft.VisualBasic...?

P: n/a
Is anyone writing VB.Net (2003) code /without/ referencing the
Microsoft.VisualBasic namespace(?), regardless of whether its
Import'ed or not?

The Powers That Be here are trying to introduce a "standard" that
we should be writing our "VB" programs /without/ using this
namespace at all and relying instead solely on CLR functionality.

Comments and Opinions please...

TIA,
Phill W.
Nov 20 '05 #1
Share this Question
Share on Google+
15 Replies


P: n/a
Hi,

My only comment would be, "Why?"

IMO, one should use whatever namespaces are available that enhance
productivity. Tying a VB programmer's hand behind his/her back is not
likely to meet that goal. One could argue that he still has one hand
available, so... However, I don't type very well -- using only one hand
slows the process even more.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Nov 20 '05 #2

P: n/a
Really you can write without VB Namespace, just referencing the CLR i.e the
..NET Framework classes. But you will writing more code and re-writing a lot
of functions, classes defined in the VB Namespace. If you chose that you can
do it.

Vijay

"Phill. W" <P.******@open.ac.uk> wrote in message
news:bi**********@yarrow.open.ac.uk...
Is anyone writing VB.Net (2003) code /without/ referencing the
Microsoft.VisualBasic namespace(?), regardless of whether its
Import'ed or not?

The Powers That Be here are trying to introduce a "standard" that
we should be writing our "VB" programs /without/ using this
namespace at all and relying instead solely on CLR functionality.

Comments and Opinions please...

TIA,
Phill W.

Nov 20 '05 #3

P: n/a
Hi Phil,

As a programmer who prefers C#, I try writing my VB code without
using old-style VB stuff (ha, it's not <that > old, yet). I like to
use the System namespace.

One advantage of this is that if at any stage I decide to port the
VB to C# it takes less editing.

However, that's purism not pragmatism - fine for your own
projects, not so effective at work. I'll echo Dick's view - If it
works, and you need it, and finding a 'pure' way is going to be
costly, - Use it.

Regards,
Fergus
Nov 20 '05 #4

P: n/a
> The Powers That Be here are trying to introduce a "standard" that
we should be writing our "VB" programs /without/ using this
namespace at all and relying instead solely on CLR functionality.


Who told you that?
(please post references)

~
Jeremy

"Success is as dangerous as failure.
Hope is as hollow as fear."
-Lao Tzu
Nov 20 '05 #5

P: n/a
Phill,
I minimize my use of Microsoft.VisualBasic, For reason's similar to why
Fergus lists.

Being an OOP programmer, why would I want to rely on a Procedural library?

Why call a function "Format(obj)", when the object has the ability to format
itself "obj.ToString("c")"? Considering that I can add ToString to my
objects, to further the self formatting pattern. I cannot call the VB.Format
function with one of my objects.

A number of the functions return Object, IIf for example, which makes for
all sorts of nasty casting when you use Option Strict On. You are using
Option Strict On! aren't you?

However I don't see a real need to 100% eliminate the assembly, As Vijay
stated, there are useful functions in there that you may wind up
rewriting... Some of the string functions are useful, unfortunately most
have a "off by one" problem when compared the String Methods.
(Microsoft.VisualBasic is largely one based, while the framework is largely
zero based).

Microsoft.VisualBasic.ControlChars are handy constants.

There are certain constructs in Microsoft.VisualBasic that I avoid
(including but not limited to):
Microsoft.VisualBasic.Collection
Microsoft.VisualBasic.FileSystem
Microsoft.VisualBasic.ErrObject
Microsoft.VisualBasic.Interaction
Microsoft.VisualBasic.DateAndTime
Microsoft.VisualBasic.VBMath

As most of them have cleaner more efficient implementations in the Framework
itself.

Microsoft.VisualBasic.Strings is not my first choice, however I will use it
if the Framework makes what I want to do awkward...
The Powers That Be here are trying to introduce a "standard" that
we should be writing our "VB" programs /without/ using this
namespace at all and relying instead solely on CLR functionality. IMHO rather than say yes or no on the entire assembly, go through Type by
Type and say yes or no. On Types where it has some good & some bad, state
where its appropriate to use the some good in that Type. Even on the ones
that you say don't use, consider stating where it may be appropriate to use
it.

By Type I mean Class, Module, Enum.

Just a thought
Jay

Most of my code I rarely directly use the namespace, VB itself will use it
for some of its constructs.
"Phill. W" <P.******@open.ac.uk> wrote in message
news:bi**********@yarrow.open.ac.uk... Is anyone writing VB.Net (2003) code /without/ referencing the
Microsoft.VisualBasic namespace(?), regardless of whether its
Import'ed or not?

The Powers That Be here are trying to introduce a "standard" that
we should be writing our "VB" programs /without/ using this
namespace at all and relying instead solely on CLR functionality.

Comments and Opinions please...

TIA,
Phill W.

Nov 20 '05 #6

P: n/a
Cor
Maybe we can in future let the Vatican make the rules for programming
languages.
Nov 20 '05 #7

P: n/a
me
what a good idea!
perhaps yopur bosses could consider eliminate the use of
the System namespace too, there wouldnt be too much extra
code for you to write!

-----Original Message-----
Is anyone writing VB.Net (2003) code /without/ referencing theMicrosoft.VisualBasic namespace(?), regardless of whether itsImport'ed or not?

The Powers That Be here are trying to introduce a "standard" thatwe should be writing our "VB" programs /without/ using thisnamespace at all and relying instead solely on CLR functionality.
Comments and Opinions please...

TIA,
Phill W.
.

Nov 20 '05 #8

P: n/a
guy
check out this link, MS would appear to differ from your
bosses! (watch for wordwrap in url)

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dv_vstechart/html/vbtchMicrosoftVisualBasicNETInternals.
asp

cheers

guy
-----Original Message-----
Is anyone writing VB.Net (2003) code /without/ referencing theMicrosoft.VisualBasic namespace(?), regardless of whether itsImport'ed or not?

The Powers That Be here are trying to introduce a "standard" thatwe should be writing our "VB" programs /without/ using thisnamespace at all and relying instead solely on CLR functionality.
Comments and Opinions please...

TIA,
Phill W.
.

Nov 20 '05 #9

P: n/a
Cor
Maybe we get Gates on the Vatican when it becomes vacant
Nov 20 '05 #10

P: n/a
??
Nov 20 '05 #11

P: n/a
Cor
The meaning is something the same as this

However, that's purism not pragmatism - fine for your own
projects, not so effective at work. I'll echo Dick's view - If it
works, and you need it, and finding a 'pure' way is going to be
costly, - Use it.

Nov 20 '05 #12

P: n/a
Hi Guy,

Very interesting and informative the article is, too. My compass
begins to swing slightly the other way.*

Regards,
Fergus

*Nick, Chris, I know there's plenty of opportunity in that one. Don't
you dare!
Nov 20 '05 #13

P: n/a
Hi Cor,

Which means that the Gates of Heaven will be here on Earth.

Regards,
Fergus
Nov 20 '05 #14

P: n/a
"Cor" <no*@non.com> wrote in news:3f4dac02$0$31330$48b97d01
@reader20.wxs.nl:
Maybe we can in future let the Vatican make the rules for programming
languages.


I don't know, I think programming in Latin would be a real pain!! :)

Chris
Nov 20 '05 #15

P: n/a
"Cor" <no*@non.com> wrote in news:3f4dc486$0$31348$48b97d01
@reader20.wxs.nl:
Maybe we get Gates on the Vatican when it becomes vacant


If that happened, then using a Mac or Linix or any OS not from MS would
become a mortal sin!

Would the message be "Use Windows or go to hell?"

:)

Chris
Nov 20 '05 #16

This discussion thread is closed

Replies have been disabled for this discussion.