msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB language extensions wishlist
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
Pavel Minaev



Joined: 11 Feb 2008
Posts: 23

PostPosted: Thu Feb 14, 2008 1:11 pm    Post subject: VB language extensions wishlist Reply with quote

What features would you like to see in a next version of classic VB,
assuming such a thing would happen? Please restrict yourself to
language features and base libraries (such as e.g. Collection), not
IDE or task-specific libraries (UI, database access etc). A few
examples from my own list follow, in no particular order, but feel
free to add your own. Consider it an extensible request for comments.

- Ability to define interfaces and classes separately.

Interfaces are pretty obvious, .int files which cannot contain
bodies for methods, only signatures allowed. Classes would probably
need some property that allows to disable automatic generation of
interfaces.

- A 64-bit integer data type, and unsigned versions of all integer
types.

"Unsigned" could be a contextual keyword - e.g. "Unsigned = 1" is
handled the same way it is now for compatibility, but "Unsigned Long"
in combination always refers to a type. 64-bit integer - "Long Long"
or "LongLong", or maybe "Integer * 64"?

- Pointers to data and functions (mostly for interop with C APIs, but
also for occasional optimization).

Something like "Dim p As AddressOf Long" and "Dim f As AddressOf
Sub(x As Integer)", and a dereference operator - "ValueAt" or just
plain prefix "@". Existing "AddressOf" operator can be reused as is.

- Weak references (for cyclic data structures).

Not doable for arbitrary COM objects, but can be done for classes
defined in VB. Something like:

Dim x As Collection, y As Collection? ' one strong ref, one weak
ref
Set x = New Collection
Set y = x
Print y Is Nothing ' False
Set x = Nothing ' last strong ref to collection gone, all weak refs
auto-zeroed
Print y Is Nothing ' True

- Syntactic sugar to delegate calls to methods of implemented
interface to a wrapped object.

Implements IFooable Using foo ' all methods of IFooable now
delegate to Me.foo ...
Private foo As IFooable
Sub IFooable_Blah() ' ... except for those explicitly defined
End Sub

- Universally usable Set

That is, Set can be used to assign value to a non-object variable.
This makes it a universal way to say, "Yes, I really want to change
the variable, don't bother with default properties etc, whether there
are any or not":

Dim x As Object, y As Integer
Set x = New Collection
Set y = 123 ' why not?

....

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Ken Halter



Joined: 04 Oct 2007
Posts: 4150

PostPosted: Thu Feb 14, 2008 1:12 pm    Post subject: Re: VB language extensions wishlist Reply with quote

"Pavel Minaev" wrote in message @b74g2000hsg.googlegroups.com...
> What features would you like to see in a next version of classic VB,

#1) a next version of classic VB

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
Back to top
View user's profile Send private message
Robert Morley



Joined: 22 Dec 2007
Posts: 176

PostPosted: Thu Feb 14, 2008 4:26 pm    Post subject: Re: VB language extensions wishlist Reply with quote

Full-fledged inheritance...aka implementation inheritance.

Oh and I wouldn't use "LongLong" for a 64-bit integer, as that might be
confusing in its own right, and gods forbid you should ever add a 128-bit
integer ("LongLongLong"? LOL). What about just Long64?


Rob

Pavel Minaev wrote:
> What features would you like to see in a next version of classic VB,
> assuming such a thing would happen? Please restrict yourself to
> language features and base libraries (such as e.g. Collection), not
> IDE or task-specific libraries (UI, database access etc). A few
> examples from my own list follow, in no particular order, but feel
> free to add your own. Consider it an extensible request for comments.
>
> - Ability to define interfaces and classes separately.
>
> Interfaces are pretty obvious, .int files which cannot contain
> bodies for methods, only signatures allowed. Classes would probably
> need some property that allows to disable automatic generation of
> interfaces.
>
> - A 64-bit integer data type, and unsigned versions of all integer
> types.
>
> "Unsigned" could be a contextual keyword - e.g. "Unsigned = 1" is
> handled the same way it is now for compatibility, but "Unsigned Long"
> in combination always refers to a type. 64-bit integer - "Long Long"
> or "LongLong", or maybe "Integer * 64"?
>
> - Pointers to data and functions (mostly for interop with C APIs, but
> also for occasional optimization).
>
> Something like "Dim p As AddressOf Long" and "Dim f As AddressOf
> Sub(x As Integer)", and a dereference operator - "ValueAt" or just
> plain prefix "@". Existing "AddressOf" operator can be reused as is.
>
> - Weak references (for cyclic data structures).
>
> Not doable for arbitrary COM objects, but can be done for classes
> defined in VB. Something like:
>
> Dim x As Collection, y As Collection? ' one strong ref, one weak
> ref
> Set x = New Collection
> Set y = x
> Print y Is Nothing ' False
> Set x = Nothing ' last strong ref to collection gone, all weak refs
> auto-zeroed
> Print y Is Nothing ' True
>
> - Syntactic sugar to delegate calls to methods of implemented
> interface to a wrapped object.
>
> Implements IFooable Using foo ' all methods of IFooable now
> delegate to Me.foo ...
> Private foo As IFooable
> Sub IFooable_Blah() ' ... except for those explicitly defined
> End Sub
>
> - Universally usable Set
>
> That is, Set can be used to assign value to a non-object variable.
> This makes it a universal way to say, "Yes, I really want to change
> the variable, don't bother with default properties etc, whether there
> are any or not":
>
> Dim x As Object, y As Integer
> Set x = New Collection
> Set y = 123 ' why not?
>
> ....
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Thu Feb 14, 2008 1:40 pm    Post subject: Re: VB language extensions wishlist Reply with quote

"Pavel Minaev" wrote in message @b74g2000hsg.googlegroups.com...
> What features would you like to see in a next version of classic VB,
> assuming such a thing would happen? Please restrict yourself to
> language features and base libraries (such as e.g. Collection), not
> IDE or task-specific libraries (UI, database access etc). A few
> examples from my own list follow, in no particular order, but feel
> free to add your own. Consider it an extensible request for comments.
>
> - A 64-bit integer data type, and unsigned versions of all integer
> types.

Would be nice but I'd use names like they did in VB.Net: Int64, Int128,
UInt32, etc
Nicely self-documenting

> - Ability to define interfaces and classes separately.
> - Pointers to data and functions (mostly for interop with C APIs, but
> also for occasional optimization).
> - Weak references (for cyclic data structures).
> - Syntactic sugar to delegate calls to methods of implemented
> interface to a wrapped object.
> - Universally usable Set

No real interest here in any of those

As Ken noted, just having an updated VB that actually supported existing VB
code, at least for the most part, would be the main thing!

I'd add:
a form event to allow subclassing of all messages easily
real class constructors so arguments could be specified
(maybe) a unicode string type to undo the damage done in VB4
nested procedures

Not that there's much point in dreaming about something that will never
happen
Back to top
View user's profile Send private message
Robert Conley



Joined: 04 Oct 2007
Posts: 67

PostPosted: Thu Feb 14, 2008 2:00 pm    Post subject: Re: VB language extensions wishlist Reply with quote

Generics

probably through something like

Class AGenericClass 'Note this is not code but what you name the
class.

Generic (Sometype, AnotherType, AThirdType as IObjectType)

Public Sub Item (Index as )
End Sub


Implements Generic AGenericClass(Integer, MyPointClass,
AObjectImplementation)
---------------------------
Automated help for simulating inheritance under COM. I.e. instead of
writing the aggreation code yourself have VB6 handle it for you.

Instead of implements you go

Inherits AnotherClass

Behind the scene it would implement the interface of AnotherClass and
the write wrapper code so the new class has the same properties and
methods. You wouldn't see it this in code. You can do overrides which
would replace the autogen code with the code in the override.

-----------------------------------------

and while you said no IDE stuff, Refactoring tools would be a major
help in another version of VB Classics.

Implementing GDI+ as a option for graphics.

Making a Framework similar to the .NET framework and the Scripting
Object. Make sure it is logically divided into different ActiveX DLLs
so you only include what you need (or not at all).

Having a unit test framework built into the IDE.

Key worlds for setting up enumerators and default properties for
strongly typed collections.

New with parameters. This would be translated by the compiler into
something that COM can handle.
Back to top
View user's profile Send private message
Karl E. Peterson



Joined: 04 Oct 2007
Posts: 4836

PostPosted: Thu Feb 14, 2008 3:18 pm    Post subject: Re: VB language extensions wishlist Reply with quote

Bob Butler wrote:
> "Pavel Minaev" wrote in message
> @b74g2000hsg.googlegroups.com...
>> What features would you like to see in a next version of classic VB,
>> assuming such a thing would happen? Please restrict yourself to
>> language features and base libraries (such as e.g. Collection), not
>> IDE or task-specific libraries (UI, database access etc). A few
>> examples from my own list follow, in no particular order, but feel
>> free to add your own. Consider it an extensible request for comments.
>>
>> - A 64-bit integer data type, and unsigned versions of all integer
>> types.
>
> Would be nice but I'd use names like they did in VB.Net: Int64, Int128,
> UInt32, etc
> Nicely self-documenting

Seconded! But the old synonyms would have to remain.

>> - Ability to define interfaces and classes separately.
>> - Pointers to data and functions (mostly for interop with C APIs, but
>> also for occasional optimization).
>> - Weak references (for cyclic data structures).
>> - Syntactic sugar to delegate calls to methods of implemented
>> interface to a wrapped object.
>> - Universally usable Set
>
> No real interest here in any of those

I'd like to see default properties removed, if someone were trying to "clone a
better VB". That'd address that Set issue rather nicely by removing the need for it
altogether.

> As Ken noted, just having an updated VB that actually supported existing VB
> code, at least for the most part, would be the main thing!
>
> I'd add:
> a form event to allow subclassing of all messages easily
> real class constructors so arguments could be specified
> (maybe) a unicode string type to undo the damage done in VB4
> nested procedures
>
> Not that there's much point in dreaming about something that will never
> happen

I'd love to see thread safety, and exposable entry points. But, as you say... Smile
--
..NET: It's About Trust!
http://vfred.mvps.org
Back to top
View user's profile Send private message
Mike Williams



Joined: 04 Oct 2007
Posts: 1309

PostPosted: Thu Feb 14, 2008 11:22 pm    Post subject: Re: VB language extensions wishlist Reply with quote

"Pavel Minaev" wrote in message @b74g2000hsg.googlegroups.com...

> What features would you like to see in a next version
> of classic VB, assuming such a thing would happen?

I can tell you what feature I would like to see left out . . .

.. . . Microsoft Wink

Mike
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Thu Feb 14, 2008 3:23 pm    Post subject: Re: VB language extensions wishlist Reply with quote

"Karl E. Peterson" wrote in message $IYzbIHA.5160@TK2MSFTNGP05.phx.gbl...
> I'd like to see default properties removed, if someone were trying to
> "clone a better VB". That'd address that Set issue rather nicely by
> removing the need for it > altogether.

It's such a shame because a lot of the additions made in VB.Net are really
nice. If they'd just started with VB instead of starting with C# when they
added them!
Back to top
View user's profile Send private message
Lorin



Joined: 04 Oct 2007
Posts: 312

PostPosted: Thu Feb 14, 2008 3:30 pm    Post subject: RE: VB language extensions wishlist Reply with quote

1) A Help that helps. Too much Example grayed out and poor and too few
examples. This is why they quit VB. The effort to fix this would be
monumental.
2) A packager. (with nicer ribbons)
3) More contol access. do away with hooks etc.
4) Consistancy (and a spell cheker).
5) Multiple CPU support. Threads.

lol

"Pavel Minaev" wrote:

> What features would you like to see in a next version of classic VB,
> assuming such a thing would happen? Please restrict yourself to
> language features and base libraries (such as e.g. Collection), not
> IDE or task-specific libraries (UI, database access etc). A few
> examples from my own list follow, in no particular order, but feel
> free to add your own. Consider it an extensible request for comments.
>
> - Ability to define interfaces and classes separately.
>
> Interfaces are pretty obvious, .int files which cannot contain
> bodies for methods, only signatures allowed. Classes would probably
> need some property that allows to disable automatic generation of
> interfaces.
>
> - A 64-bit integer data type, and unsigned versions of all integer
> types.
>
> "Unsigned" could be a contextual keyword - e.g. "Unsigned = 1" is
> handled the same way it is now for compatibility, but "Unsigned Long"
> in combination always refers to a type. 64-bit integer - "Long Long"
> or "LongLong", or maybe "Integer * 64"?
>
> - Pointers to data and functions (mostly for interop with C APIs, but
> also for occasional optimization).
>
> Something like "Dim p As AddressOf Long" and "Dim f As AddressOf
> Sub(x As Integer)", and a dereference operator - "ValueAt" or just
> plain prefix "@". Existing "AddressOf" operator can be reused as is.
>
> - Weak references (for cyclic data structures).
>
> Not doable for arbitrary COM objects, but can be done for classes
> defined in VB. Something like:
>
> Dim x As Collection, y As Collection? ' one strong ref, one weak
> ref
> Set x = New Collection
> Set y = x
> Print y Is Nothing ' False
> Set x = Nothing ' last strong ref to collection gone, all weak refs
> auto-zeroed
> Print y Is Nothing ' True
>
> - Syntactic sugar to delegate calls to methods of implemented
> interface to a wrapped object.
>
> Implements IFooable Using foo ' all methods of IFooable now
> delegate to Me.foo ...
> Private foo As IFooable
> Sub IFooable_Blah() ' ... except for those explicitly defined
> End Sub
>
> - Universally usable Set
>
> That is, Set can be used to assign value to a non-object variable.
> This makes it a universal way to say, "Yes, I really want to change
> the variable, don't bother with default properties etc, whether there
> are any or not":
>
> Dim x As Object, y As Integer
> Set x = New Collection
> Set y = 123 ' why not?
>
> ....
>
Back to top
View user's profile Send private message
Karl E. Peterson



Joined: 04 Oct 2007
Posts: 4836

PostPosted: Thu Feb 14, 2008 3:42 pm    Post subject: Re: VB language extensions wishlist Reply with quote

Lorin wrote:
> 3) More contol access. do away with hooks etc.

I was on them from VB4 onward to add a Message event for every form and (windowed)
control. Coulda been *sooo* cool...
--
..NET: It's About Trust!
http://vfred.mvps.org
Back to top
View user's profile Send private message
Ralph



Joined: 04 Oct 2007
Posts: 4148

PostPosted: Thu Feb 14, 2008 5:47 pm    Post subject: Re: VB language extensions wishlist Reply with quote

"Pavel Minaev" wrote in message@b74g2000hsg.googlegroups.com...
> What features would you like to see in a next version of classic VB,
> assuming such a thing would happen? Please restrict yourself to
> language features and base libraries (such as e.g. Collection), not
> IDE or task-specific libraries (UI, database access etc). A few
> examples from my own list follow, in no particular order, but feel
> free to add your own. Consider it an extensible request for comments.
>
> - Ability to define interfaces and classes separately.
>
> Interfaces are pretty obvious, .int files which cannot contain
> bodies for methods, only signatures allowed. Classes would probably
> need some property that allows to disable automatic generation of
> interfaces.
>

You need to explain what you mean by this. A class is a programming
construct (template?) to deliver an 'interface'. Why would defining them
separately bring anything to the table except confusion?

>
> - A 64-bit integer data type, and unsigned versions of all integer
> types.
>
> "Unsigned" could be a contextual keyword - e.g. "Unsigned = 1" is
> handled the same way it is now for compatibility, but "Unsigned Long"
> in combination always refers to a type. 64-bit integer - "Long Long"
> or "LongLong", or maybe "Integer * 64"?
>

I go along with Bob's suggestion

>
> - Pointers to data and functions (mostly for interop with C APIs, but
> also for occasional optimization).
>
> Something like "Dim p As AddressOf Long" and "Dim f As AddressOf
> Sub(x As Integer)", and a dereference operator - "ValueAt" or just
> plain prefix "@". Existing "AddressOf" operator can be reused as is.
>

Not needed. Would more likely lead to non-VBness.

>
> - Weak references (for cyclic data structures).
>
> Not doable for arbitrary COM objects, but can be done for classes
> defined in VB. Something like:
>
> Dim x As Collection, y As Collection? ' one strong ref, one weak
> ref
> Set x = New Collection
> Set y = x
> Print y Is Nothing ' False
> Set x = Nothing ' last strong ref to collection gone, all weak refs
> auto-zeroed
> Print y Is Nothing ' True
>

Not convinced that it would add anything except sloppy programming and
subtle errors.


>
> - Syntactic sugar to delegate calls to methods of implemented
> interface to a wrapped object.
>
> Implements IFooable Using foo ' all methods of IFooable now
> delegate to Me.foo ...
> Private foo As IFooable
> Sub IFooable_Blah() ' ... except for those explicitly defined
> End Sub
>

Got to think a while on that one. I can see constructs where it is useful
for defined "hierarchies", but ...

>
> - Universally usable Set
>
> That is, Set can be used to assign value to a non-object variable.
> This makes it a universal way to say, "Yes, I really want to change
> the variable, don't bother with default properties etc, whether there
> are any or not":
>
> Dim x As Object, y As Integer
> Set x = New Collection
> Set y = 123 ' why not?
>

Unfortunately, the spector of "default properties" hangs over any assignment
no matter what direction it is going. VB actually uses Let and Set. Let is
assumed if Set is missing.

You either dump default properties, in which case there is no need for 'Set'
at all and there would likely break a ton of existing code, or you introduce
yet another possible opportunity for VB's ETC to surprise you.

For something else for your list...

True ".bas" Libraries.
(Bring back the real meaning of Global, and reduce the scope of Public. And
perhaps add 'namespaces'.
eg
Say I created a bas module that included
' JunkStuff (junkstuff.bas)
Global gA As Long
Public Function funA() As Long
End Function
Private Sub subJunk()
End Sub

Elsewhere in the project.
gA is always in scope
One could access Public items in JunkStuff by using ...
JunkStuff.funA()
subJunk() can only be 'seen' within JunkStuff.

Then also have the ability to compile JunkStuff and other bas modules into a
free-standing Dll/Lib that could be included within any project.

Include JunkStuff As JS
Include MoreStuff As MS

JS.funA()

gA would be global to the Lib but not visible outside of it. ????

-ralph
Back to top
View user's profile Send private message
christery



Joined: 11 Jan 2008
Posts: 71

PostPosted: Thu Feb 14, 2008 7:44 pm    Post subject: Re: VB language extensions wishlist Reply with quote

On 14 Feb, 19:30, Lorin wrote:
> 1) A Help that helps.  Too much Example grayed out and poor and too few
> examples.  This is why they quit VB.  The effort to fix this would be
> monumental.
> 2) A packager.  (with nicer ribbons)
1 worked up to vb4 then *goodbye*
2 is there but u have to be nice to it... its like a plant, has to be
handeld carefully.. PADW is delicate...
5. yeah threads and mutex suport

Got one of my own, real error mess if running *not* in debug mode...
that indicates what happend

//CY
Back to top
View user's profile Send private message
Karl E. Peterson



Joined: 04 Oct 2007
Posts: 4836

PostPosted: Thu Feb 14, 2008 7:54 pm    Post subject: Re: VB language extensions wishlist Reply with quote

christery@gmail.com wrote:
> Got one of my own,

One what? A cow pasture full of mushrooms?
--
..NET: It's About Trust!
http://vfred.mvps.org
Back to top
View user's profile Send private message
BeastFish



Joined: 04 Oct 2007
Posts: 231

PostPosted: Thu Feb 14, 2008 11:12 pm    Post subject: Re: VB language extensions wishlist Reply with quote

> I'd add:
> a form event to allow subclassing of all messages easily

Heck, I'd settle for a form LostFocus event that actually fires when the app
itself loses focus Actually, a message event would be sweet.

I had a few more ideas, but my cat just jumped up onto the keyboard, typing
"defop"... and I forgot what I was thinking. Hey, maybe "defop" can be a
new keyword for something
Back to top
View user's profile Send private message
BeastFish



Joined: 04 Oct 2007
Posts: 231

PostPosted: Thu Feb 14, 2008 11:21 pm    Post subject: Re: VB language extensions wishlist Reply with quote

> > 1) A Help that helps. Too much Example grayed out and poor and too few
> > examples. This is why they quit VB. The effort to fix this would be
> > monumental.
>
> 1 worked up to vb4 then *goodbye*

??? VB5's help was/is rather good.

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Code to change filename extensions? What I want to do is, in a specific directory, change all files with one extension, to a different instance.... Directory is C:\Dir Rename all *.abc to *.dav Any ideas on the code to do this?

How to know OS Language? Hello, I'am developing an App with international capability. I need the App to know what is the host computer's OS language, i.e. the language determined during installing Windows, and is used to show button names in Message Box, NOT the "Language Setting

Which language used most? VB vs C? Are there any authorative studies on relative language usage? I am trying to defend our college's choice of VB as a course subject. My belief is that VB is the choice for business - as in heavy data processing, or table handling. Any opinions or reference

Learning the language I would like to know what book can I get on vb6 that will teach me how to master the language. I know one book may not do the job, so expecting someone to list more than one book. Also when it come to learning vb6 what categories would you include like

Localization language I am looking for the name of the API call to determine the language (i.e. French, German, etc.) of the user who is runing my code? Thanks
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group