Re: They created J#, why couldn't they do VB#?
"Ian R" <ianr@na.net> wrote in message news:3c19dd32@147.208.176.211...
>
> Joe, this issue has already been discussed to death.
> If the object contains scarce resources you dispose of it once you're
done.
> End of story.
> Whether you like it or not .NET uses NDF and your endless *****ing is
going
> to change anything.
>
That should read isn't.
Re: They created J#, why couldn't they do VB#?
"Phil Weber" <pweberonline@fawcette.com> wrote in message <news:3c183f72$1@147.208.176.211>...
> >
> http://www.devx.com/upload/free/feat...102/sidebar4.a
> sp
> > Oops, looks like it got yanked. Gee, I wonder why...?
>
> Joe "Conspiracy Theory" Foster: Moved, not yanked:
> http://www.devx.com/premier/mgznarch...2/sidebar4.asp
Wow, DevX did almost as good a job of that as they did moving the news
server!
I still like how Zane never claims we'd actually find a good solution
to the resource management problem, only that we'd eventually become
used to that strange burning sensation. However, I can casually fling
around thousands of objects right now, even in VB5 on a low-end machine,
thanks to factory classes like Pooler. I get most of the benefits of GC
with none of the drawbacks, such as the resource management problem, but
don't mind me... you all go ahead and drink the koolaid.
--
Joe Foster <mailto:jlfoster%40znet.com> Sacrament R2-45 <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
Re: They created J#, why couldn't they do VB#?
"Ian R" <ianr@na.net> wrote in message <news:3c19e58c@147.208.176.211>...
> "Ian R" <ianr@na.net> wrote in message news:3c19dd32@147.208.176.211...
> >
> > Joe, this issue has already been discussed to death.
> > If the object contains scarce resources you dispose of it once you're
> done.
> > End of story.
This is what we're supposed to use to develop mission-critical "enterprise"
applications? In order to get Inherits and structured exception handling,
we must give up exception safety? *** has Microsoft been smoking, anyway?
> > Whether you like it or not .NET uses NDF and your endless *****ing is
> going
> > to change anything.
> That should read isn't.
Yes yes yes, resistance is futile, right? With such persuasive endorsement
from the likes of you, it's hard to believe Microsoft even needs a marketing
department! No wonder they dropped their "where do you want to go today?"
and "making it all make sense" slogans...
--
Joe Foster <mailto:jlfoster%40znet.com> "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
Re: They created J#, why couldn't they do VB#?
"Joe "Nuke Me Xemu" Foster" <joe@bftsi0.UUCP> wrote in message
news:3c1a68ba@147.208.176.211...
>
> This is what we're supposed to use to develop mission-critical
"enterprise"
> applications? In order to get Inherits and structured exception handling,
> we must give up exception safety? ...
Huh ?
> ... *** has Microsoft been smoking, anyway?
>
Same thing as you perhaps ... :)
>
> Yes yes yes, resistance is futile, right? With such persuasive
endorsement
> from the likes of you, it's hard to believe Microsoft even needs a
marketing
> department! No wonder they dropped their "where do you want to go today?"
> and "making it all make sense" slogans...
>
It's at the RC stage. MS isn't going to make a major change at this point. A
decision was made. It works. Get over it.
Re: They created J#, why couldn't they do VB#?
"Ian R" <ianr@na.net> wrote in message <news:3c19e0ad$1@147.208.176.211>...
> "Joe "Nuke Me Xemu" Foster" <joe@bftsi0.UUCP> wrote in message
> news:3c19a429@147.208.176.211...
> > So something like Pooler is totally impossible, a mere med-fueled drug
> > dream, eh? I must be hallucinating the overall performance gains to be
> > had by doing my own object pooling for certain sets of objects, hmmmm?
> I haven't run a benchmark on your code and probally won't. Are you claiming
> that in VB6 erasing an array of value types is just as fast as erasing an
> array of COM object types ?
No -- erasing a dynamic array of value types is nearly too fast to measure.
However, I do claim that Pooler allows me to Erase an array of COM object
references in under ten milliseconds that previously would have taken over
ten seconds. A pretty "minute" performance gain, eh? Sure, the pooled
objects must eventually be cleaned up, but that can be deferred until after
the last form is unloaded. Here's the benchmark code. Try it out in a
native-code EXE optimized for speed. Try some "advanced optimizations" too.
Lest the Zealots.NET "forget", I'd use Pooler only with selected classes,
never with any class used for resource management.
Declare Function timeGetTime Lib "WinMM" () As Long
Declare Function timeBeginPeriod Lib "WinMM" (ByVal p As Long) As Long
Declare Function timeEndPeriod Lib "WinMM" (ByVal p As Long) As Long
Private Sub PoolTest_Click()
Const ObjCount = 20000
Dim OldPointer As MousePointerConstants
OldPointer = MousePointer
MousePointer = vbHourglass
Dim Start As Long, MSec As Long, i As Long
Dim A() As Pooled, Pool As Pooler
Set Pool = New Pooler
Print "Build", "Cleanup", "Pool size"
Refresh
timeBeginPeriod 1
Start = timeGetTime
ReDim A(1 To ObjCount)
For i = LBound(A) To UBound(A)
Set A(i) = New Pooled
A(i).Open_ vbNullString
Next
Print (timeGetTime - Start) / 1000@,
Start = timeGetTime
Erase A
MSec = timeGetTime - Start
Print MSec / 1000@, Pool.Count
Refresh
Start = timeGetTime
ReDim A(1 To ObjCount)
For i = LBound(A) To UBound(A)
Set A(i) = Pool.GetOne(vbNullString)
Next
Print (timeGetTime - Start) / 1000@,
Start = timeGetTime
Erase A
MSec = timeGetTime - Start
Print MSec / 1000@, Pool.Count
Refresh
Start = timeGetTime
ReDim A(1 To ObjCount)
For i = LBound(A) To UBound(A)
Set A(i) = Pool.GetOne(vbNullString)
Next
Print (timeGetTime - Start) / 1000@,
Start = timeGetTime
Erase A
MSec = timeGetTime - Start
Me.Print MSec / 1000@, Pool.Count
Refresh
i = Pool.Count
Start = timeGetTime
Set Pool = Nothing
MSec = timeGetTime - Start
Me.Print vbNullString, MSec / 1000@, i
timeEndPeriod 1
MousePointer = OldPointer
End Sub
--
Joe Foster <mailto:jlfoster%40znet.com> Wanna buy a Bridge? <http://xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
Re: They created J#, why couldn't they do VB#?
AFAIK you are still free to write only "modules" in VB.NET. As for VB6,
you'll have anyway to use classes but this is not really different in VB6
(forms, controls, data access....)
Patrice
"Mike Mitchell" <kylix_is@yahoo.co.uk> a écrit dans le message news:
3c151d36.20772896@news.devx.com...
> On Mon, 10 Dec 2001 11:28:01 -0600, "Larry Serflaten"
> <serflaten@usinternet.com> wrote:
>
> >I cannot believe anyone who has had any significant experience
> >with VB ever reaching that conclusion.... Classes serve an important
> >part in encapsulation, one of the pillars of OOD/OOP. But even for
> >'non-OOP' code, classes can offer a means of code-reuse, that is
> >very convenient.
>
> So how do you explain the vast number of VB programmers who have never
> written one? Remember the figure and emblazon it on your memory: 70%
> of VB apps don't use classes.
>
> [ ]
>
> "What are the brackets for, mother?"
>
> "Well, gee, son, they're there for the folks to fill in with 'VB forms
> are classes'. "
>
> "Gee, mom, surely there aren't so many clever dicks around?"
>
> "Huh, you'd be surprised, Bill"
>
> MM