If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Speaking of strings...

<CLIP>
>What's the advantage now?
</CLIP>

Becuause then, like ALL objects, there are STANDARD ways to deal with strings.

Since a String-variable is an Object, it has properties, such as .Length,
and standard methods, such as .Compare, .EndsWith, and .ToLower. In addtiion,
since ALL strings derive from the Base Object class, then a String variable
can be passed to a more generic Function, which can accept and work on a
variable of TYPE Object, rather than a String alone. So for instance, it
becomes possible, with .NET, to write a GENERIC SORT routine, which can sort
OBJECTS, rather than having to write an Integer Sort, and a separate String
Sort.

Re: Speaking of strings...

¤ >
¤ >Nothing. They're still there if you want to use them as you have before. In, addition they've been
¤ >methods of a class since VBA has been around so this isn't new in VB.NET. The fact that they are
¤ >also know as functions is meaningless in this context.
¤
¤ But why is a VB.Net string an object now? What was wrong with
¤ traditional VB strings?

I think you're asking the wrong question. They weren't changed because something was wrong with them
(although the string manipulation implementation in Classic VB was inefficient), but were changed as
a result of the .NET architecture.

¤
¤ >¤ Or use a function. Again, why is a String now an object? Why?
¤ >
¤ >All data types are objects. Why is this a problem for you?
¤
¤ It's no good just telling me they're objects! I know that. My question
¤ is, why? Specifically, a string: - why does it need to be an object
¤ now? It never used to be. That is the problem. A VB/QuickBASIC string
¤ has been since like forever just a sequence of bytes with a string
¤ descriptor telling B.A.S.I.C. where it is and how long. Why change it?
¤ What's the advantage now?

The answer is the same...and since when is necessity born out of tradition?

If you're looking for an advantage, I would say the primary advantage would be usability. You may
not see it that way, but all string functions (or any other variable type functions) are right at my
fingertips.

You still haven't identified the problem with the implementation. To say, "It never used to be",
well, that's not really indicating what the problem is. It changed. If the problem is that you are
unable to overcome that change, then that is what you should say.

Re: Speaking of strings...

> I would say the primary advantage would be usability. You may
> not see it that way, but all string functions (or any other variable
> type functions) are right at my fingertips.

Paul: Excellent point. In VB "Classic," programmers had to memorize function
names: Asc, CInt, Val, Left, Mid, Right, LTrim, RTrim, Trim, UCase, LCase, etc.
Because Strings are implemented as objects in .NET, programmers can simply type
the variable name followed by a period (.), and IntelliSense presents them with
a list of the available properties and methods, with popup descriptions of their
usage and parameters. Saves typing, and makes learning much faster!
--
Phil Weber

Re: Speaking of strings...

On Tue, 8 Oct 2002 08:47:11 -0400, Patrick Steele [MVP]
<patrick@mvps.org> wrote:
>In article <2en3qu8iqdlrvcfad6k697h8ff2j8sila3@4ax.com> (from Mike
>Mitchell <kylix_is@yahoo.co.uk>),
>> I'm still waiting for the .Netizens to define and quantify their
>> so-called improved productivity.
>
>IIRC, Zane Thomas pointed out a number of times (directly to you, I
>believe) about the increased productivity he found when developing .NET
>versions of his components.

Re: Speaking of strings...

On Mon, 7 Oct 2002 19:30:15 -0500, "Jay Glynn" <jlsglynn@hotmail.com>
wrote:
>I'm sure you would like OOP to disappear into the sunset for whatever
>reasons you may have, but it is only one of many methods to develop
>software. Sometimes it is the best method, other times other methods are
>better suited.

Better suited, aka what classic VB programmers did, most of the time.
Yet if they move to VB.Net, knowledge of and practice in OOP are
absolute givens, especially if they wish to continue finding work! No
programmer using an exclusively OOP language is going to earn much
kudos by ignoring every aspect of OOP.

However, for those who wanted to continue writing software in VB
without OOP, VB6 has been discontinued. The message thus from
Microsoft is, if it ain't OOP, it don't compute.

Re: Speaking of strings...

On Tue, 8 Oct 2002 07:45:35 -0700, "Phil Weber"
<pweber@nospam.fawcette.com> wrote:
> > I would say the primary advantage would be usability. You may
> > not see it that way, but all string functions (or any other variable
> > type functions) are right at my fingertips.
>
>Paul: Excellent point. In VB "Classic," programmers had to memorize function
>names: Asc, CInt, Val, Left, Mid, Right, LTrim, RTrim, Trim, UCase, LCase, etc.

Big deal! How many words do you imagine you know in the English
language? Quite a few thousand, I expect! I know German in some depth,
so I have roughly your vocabulary in English, plus a good 60% of the
same words in German. I know others who could speak and write four
languages fluently. How many words would they have command over? Just
a dozen or so keywords for string functions in VB presents no great
challenge at all.
>Because Strings are implemented as objects in .NET, programmers can simply type
>the variable name followed by a period (.), and IntelliSense presents them with
>a list of the available properties and methods, with popup descriptions of their
>usage and parameters. Saves typing, and makes learning much faster!

I think (as I already pointed out once) that Intellisense is often a
pain in the rear. If I have already (in VB.Net, say) typed
MyString.Left umpteen times and each time when I get to the dot it
pops up a menu of all the methods available, I should think this can
get very irritating after a while and not a help at all, especially
because I'd need to scroll down the menu, then select the keyword I
want, and so on.

What would be nice is a configurable feature to Intellisense popups,
so that I could switch it off for words I already know. Also, I
dispute your claim about saving typing. When I am typing code with
some fluency and the code is just falling on to the page, I can type,
for example, MyString = Left$(MyString,10) without thinking about it,
just like we hardly think about the individual letters when we're
typing a report or writing a novel. It's practically an unconscious
act. But the way Intellisense pops up (or mouse-over popups, or other
popups), one's train of thought is interrupted. Yes, it certainly does
aid learning, that's true. But afterwards? And again, is that *all*
there is about the transition to objects? I could understand the
option for objects, as in VB6, but a mandatory requirement?

Re: Speaking of strings...

¤ On Tue, 8 Oct 2002 07:45:35 -0700, "Phil Weber"
¤ <pweber@nospam.fawcette.com> wrote:
¤
¤ > > I would say the primary advantage would be usability. You may
¤ > > not see it that way, but all string functions (or any other variable
¤ > > type functions) are right at my fingertips.
¤ >
¤ >Paul: Excellent point. In VB "Classic," programmers had to memorize function
¤ >names: Asc, CInt, Val, Left, Mid, Right, LTrim, RTrim, Trim, UCase, LCase, etc.
¤
¤ Big deal! How many words do you imagine you know in the English
¤ language? Quite a few thousand, I expect! I know German in some depth,
¤ so I have roughly your vocabulary in English, plus a good 60% of the
¤ same words in German. I know others who could speak and write four
¤ languages fluently. How many words would they have command over? Just
¤ a dozen or so keywords for string functions in VB presents no great
¤ challenge at all.

If you're admitting that you have never consulted the documentation, then I guess you're simply
better than the rest of us. It refreshing to know that there's actually someone out there who has
memorized all the string functions and associated syntax.

BTW, since you apparently haven't really done any work with VB.NET then I guess you're really not
aware of the rather extensive list of String class operations, several of which accept several
different sets of parameters. But I guess that wouldn't concern you because I'm sure you could
remember every one of them. ;-)

¤
¤ >Because Strings are implemented as objects in .NET, programmers can simply type
¤ >the variable name followed by a period (.), and IntelliSense presents them with
¤ >a list of the available properties and methods, with popup descriptions of their
¤ >usage and parameters. Saves typing, and makes learning much faster!
¤
¤ I think (as I already pointed out once) that Intellisense is often a
¤ pain in the rear. If I have already (in VB.Net, say) typed
¤ MyString.Left umpteen times and each time when I get to the dot it
¤ pops up a menu of all the methods available, I should think this can
¤ get very irritating after a while and not a help at all, especially
¤ because I'd need to scroll down the menu, then select the keyword I
¤ want, and so on.

Well I know you're just a tad bit brighter than that Mike. If you can remember all those functions
and syntax as you imply, you just keep on typing. The Intellisense dropdown is only there if you
actually need to look through the list.

Are you really trying to convince me that you get confused so easily or is this just a bunch of B.S.
I would for your sake that it's the latter.

¤
¤ What would be nice is a configurable feature to Intellisense popups,
¤ so that I could switch it off for words I already know. Also, I
¤ dispute your claim about saving typing. When I am typing code with
¤ some fluency and the code is just falling on to the page, I can type,
¤ for example, MyString = Left$(MyString,10) without thinking about it,
¤ just like we hardly think about the individual letters when we're
¤ typing a report or writing a novel. It's practically an unconscious
¤ act. But the way Intellisense pops up (or mouse-over popups, or other
¤ popups), one's train of thought is interrupted.

Doesn't bother me. Even if I know the syntax I just keep on typing. The tool is there when I need it
and I can ignore it if I don't need it.

¤ Yes, it certainly does
¤ aid learning, that's true. But afterwards? And again, is that *all*
¤ there is about the transition to objects? I could understand the
¤ option for objects, as in VB6, but a mandatory requirement?

Well, that's the architecture. I guess I'm still stumped as to why you find this so challenging and
Intellisense so intrusive.

Re: Speaking of strings...

Larry Serflaten <serflaten@usinternet.com> wrote:
> Thanks for the challenge, I misunderstood the statements I read to the
> effect:
>
> "Boxing and unboxing allow any type to be treated as an object." I've seen
> that in many places, one such example is found on a page about value types.
>
(http://msdn.microsoft.com/library/de...s/cpref/html/f
rlrfSystemValueTypeClassTopic.asp)
>
> After looking for documentation to specifically mention the boxing or
> unboxing, I find that it only applies when accessing the methods available
> to all objects (those implemented for the Object interface):
>http://msdn.microsoft.com/library/de.../vcmex/html/vc
lrf__box.asp
>
> LFS

Re: Speaking of strings...

In article <nis5qu8t03n56068m61ir9qj7skl1i7obc@4ax.com> (from Mike
Mitchell <kylix_is@yahoo.co.uk>),
> >IIRC, Zane Thomas pointed out a number of times (directly to you, I
> >believe) about the increased productivity he found when developing .NET
> >versions of his components.
>
> Subjective.

Um, yeah... What did you expect when you asked someone to quantify
"productivity"? It varies from person to person -- company to company.

Re: Speaking of strings...

<yawn>

"Mike Mitchell" <kylix_is@yahoo.co.uk> wrote in message
news:brs5qu0ee7s1faehq0dcatricroegn5men@4ax.com...
> On Mon, 7 Oct 2002 19:30:15 -0500, "Jay Glynn" <jlsglynn@hotmail.com>
> wrote:
>
> >I'm sure you would like OOP to disappear into the sunset for whatever
> >reasons you may have, but it is only one of many methods to develop
> >software. Sometimes it is the best method, other times other methods are
> >better suited.
>
> Better suited, aka what classic VB programmers did, most of the time.
> Yet if they move to VB.Net, knowledge of and practice in OOP are
> absolute givens, especially if they wish to continue finding work! No
> programmer using an exclusively OOP language is going to earn much
> kudos by ignoring every aspect of OOP.
>
> However, for those who wanted to continue writing software in VB
> without OOP, VB6 has been discontinued. The message thus from
> Microsoft is, if it ain't OOP, it don't compute.
>
> MM

Re: Speaking of strings...

Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
>You still haven't identified the problem with the implementation. To say,
"It never
>used to be",
>well, that's not really indicating what the problem is. It changed. If the
problem is
>that you are
>unable to overcome that change, then that is what you should say.
>
>Paul ~~~ pclement@ameritech.net
>Microsoft MVP (Visual Basic)

You miss the point of MM's arguments. It doesn't matter if it makes sense,
or if it is better, or cleaner. His sole argument is that it is changed,
and change is bad because it breaks his code.

MM does not understand why things need to change, and he does not want to
understand. By his own admission, he has yet to try .NET, does not want
to learn .NET, and hates .NET. The reason he hates it is simply because
it will not run his VB6 code. No other reason.

He also hates Notepad because it will not run his VB6 code, but that is for
another post.

Because it is different. It requires MM to learn something new and think
in a slightly different way, and he does not want to. And you can't make
him because you are not the boss of him. Nyah!

Really, Mike, it is getting really old. It was funny for the first 6 months
or so. If you don't like VB.NET, that is okay. Just stick to VB6. It isn't
going to go away any time soon.

Try to think of VB.NET as a different product. You wouldn't expect your
VB6 code to run in Java, now, would you? Don't worry, you don't have to
learn anything new. VB6 will continue to work as before. Your old code
will still run. It's okay.

Hey, if you hate VB.NET so much, and you have never even tried it, why do
you post to this group all the time?