Page 6 of 18 FirstFirst ... 345678916 ... LastLast
Results 201 to 240 of 695

Thread: Vb6 , the Future, and what I have discovered

  1. #201
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Vb6 , the Future, and what I have discovered

    Don't overlook the possibility of Chromepads either:

    Why Chromepads could be better than Android tablets

    That could be another thing to help business move off Windows. You'd have desktops, netbooks, 2-in-1s, and tablets all in the same software ecosystem.

    Sort of like UWP, but successful.

  2. #202
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,207

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by baka View Post
    The thread is about "the future", not about COM this, C here, Linux that, its the future of VB6 that im interested with.
    That's a contradiction in itself, baka.

    You will *have* to realize, that a new VB6-compiler cannot be written without talking about *exactly* the things you mentioned above.
    - how to produce COM-compatible classes with a plain C-Compiler is a required topic, which the community *should* discuss (when you want a "future for VB6")
    - how to ensure, that these compiled Classes (later on) also work on Linux, or your SmartPhone, is a required topic as well (when you want a "future for VB6")

    Quote Originally Posted by baka View Post
    This neverending "I Know Best" is not interesting to read, its out of topic.
    I'm quite tired by addressing that as well, but correcting things (shining more light on things how they really are) is necessary,
    when there's so much disagreement (or plain "not knowing") involved.

    If I leave Niyas statements "stand as they are", many of you might think, that Inheritance in a new VB6-compatible compiler
    might be impossible to accomplish (when in fact it is quite easy to support).

    Olaf

  3. #203
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by dilettante View Post
    Don't overlook the possibility of Chromepads either:

    Why Chromepads could be better than Android tablets

    That could be another thing to help business move off Windows. You'd have desktops, netbooks, 2-in-1s, and tablets all in the same software ecosystem.

    Sort of like UWP, but successful.
    I don't agree. Having coded against both, Android is nowhere near as nice as Windows. For one thing, it's a moving target. Various constants will change between versions. At one point, an external SD card was external storage, then it became inaccessible, then indirectly accessible. Every new version of the OS tends to break something fairly fundamental. Partly, this may be due to increased security, though some of the decisions are pretty baffling. However, I never feel that I have the same understanding with Android that I do with Windows. To me, it feels like it is an also ran, and is likely to remain that way. I've always felt that one of the reasons that Windows dominated and Apple never made it out of certain niches was due to the greater control you had over Windows machines back in the DOS era. The same feeling is there with Android. You just can't do quite as much because the OS simply stops you. That has some obvious security advantages, but may end up alienating.

    Of course, it doesn't matter right now. Windows can't compete on the same platforms. What I feel could change it all is if Intel or AMD can produce a competitive chip that runs full x86 instruction set (or close enough to run Windows programs). We've already gotten screen resolutions good enough and memory is cheap and plentiful. Hard drives aren't an obstacle, nor is graphics. Add in just a competitive CPU and it may all change. People will stick with Android because people always stick with 'other', but the mainstream may move back to Windows.
    My usual boring signature: Nothing

  4. #204
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,720

    Re: Vb6 , the Future, and what I have discovered

    I agree Olaf, but I leave that to the experts, the majority, like 99%, we just want VB6 to be better and smarter and more compatible.
    But I also understand that if any of you leave the argument the other would definitely believe he won and a lot of us would think the same.

    The reason of my post is to try to get on topic on the future, not on the technicalities, Im sure 90% of us don't even understand half of it.

    So, I suggested that RC5 and the new IDE would get its own section, as I think, as you also mentioned, if you want to community to support you it need to be organized better and that RC5 is not just a solution when you are stuck, but a new way to use VB6. Otherwise there would not be any "start", until you are done with the IDE, except from the few the uses you DLL. I would like a thread about that and about the future of RC5, how it will be integrated, how the code will look like, what kind of issues will we expect etc. If we are moving toward the "judgement day of VB6" I think its time to prepare. Thats what I want to read, the future of VB6, not whats going on under the hood, as I will never touch any of that anyway, like most of us.

  5. #205
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,207

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by baka View Post
    I agree Olaf, but I leave that to the experts, the majority, like 99%, we just want VB6 to be better and smarter and more compatible.
    I understand that "wish" (because I want the same thing), but I'm trying to "do something about it" (investing time) to move closer towards reaching that goal.
    Given that, is it unreasonable of me, to expect that others invest a tiny bit of their time as well?

    Quote Originally Posted by baka View Post
    But I also understand that if any of you leave the argument the other would definitely believe he won and a lot of us would think the same.
    From my side, it is not as much about "winning" - it is more about "correct(ed), reliable information".
    It's definitely not "fun" for me, having to write "extra-code", just to correct Niya - it's "wasted time" on my end, time I could invest better elsewhere.

    Quote Originally Posted by baka View Post
    The reason of my post is to try to get on topic on the future, not on the technicalities, Im sure 90% of us don't even understand half of it.
    I'm aware that the technical details are not as "easy" for some - as they might be for others.
    But the facts are, that - when we have to write this new stuff (IDE and compiler) ourselves (forget about help from MS once and for all),
    then we will have to discuss at least these "rough details", which describe how such a project needs to be structured and designed
    (including platform-independency and stuff).

    So, even when it "makes your brain hurt", please force yourself to "plow through" what was written, at least roughly -
    that's the least you can do with regards to "investing a tiny bit of your time, to help the project" (by understanding at least its raw structure).

    Quote Originally Posted by baka View Post
    I would like a thread about that and about the future of RC5, how it will be integrated, how the code will look like, ...
    I'm doing that with examples already today (in the normal forum, when difficult questions arise - and also in the codebank)...
    Meaning that code which is using the RC5-Classes today (in "old VB6"), will run without changes also in the new compiler,
    which will support the same Class-interfaces in its "extended-runtime-lib".

    As for "something concrete to look at", I will post the code for the new IDEs Form-designer into the codebank soon.

    Quote Originally Posted by baka View Post
    If we are moving toward the "judgement day of VB6" I think its time to prepare. Thats what I want to read, the future of VB6, not whats going on under the hood...
    As said already - there will be no future without a new IDE and compiler which is written by community-members.

    But writing that stuff will cost a lot of spare-time on the side of those who will finally implement it.
    Supporting these guys "who do it" with at least "good-will" not by "actively hindering the project" would already mean a lot -
    support also means, broader usage of the RC5 - it's nothing to be "scared off" - in a year or so, you might give tips to other
    "young game-developers" already (how to use this or that class to accomplish certain effects) - this for example would already
    ensure some more free time on the side of those, who implement the "more complicated things" you can not (yet!) help with...

    Olaf
    Last edited by Schmidt; Jan 29th, 2018 at 12:35 AM.

  6. #206
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,034

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    Even if we did we couldn't tell you, because the first rule of fight club is: You do not talk about Fight Club!

    That would be a forum dedicated solely to a pointless, soul-sucking, fight. The soundtrack could be a whine reminiscent of a thousand mosquitoes. It would be like mana for trolls.

    Nobody does comparisons like that unless they have an outcome they want to be true. There wouldn't be any academic curiosity, there'd be nothing but people trying to gather sufficient supporters to shout down any other opinions.

    I once wrote a program in VB6, then re-wrote it in .NET. That's the closest I've come to a head-to-head comparison, but it wasn't even close. I did this because somebody broke into my house and stole the computer that had the VB6 code. I only had a much older copy. The program would have been fairly ideal for a head-to-head comparison of performance, but I no longer had the good VB6 version, and when I re-wrote, I greatly improved the program in terms of features, so it wasn't much of a comparison anyways. The performance was essentially the same. Perhaps the .NET was a bit faster, but the comparison couldn't really be made for a few reasons. The VB6 program would take around 3 days to run, the .NET might have gotten down to 2 days, but that could be due entirely to algorithm improvements due to re-visiting a problem.

    Why would I ever bother doing such a thing again? Why would anybody bother doing such a thing if they didn't have an outcome they wanted?
    Hi,

    well I didn't really have a -FightClub- in mind, more like ...you are now entering -Switzerland-, but you are
    probably right with...
    There wouldn't be any academic curiosity, there'd be nothing but people trying to gather sufficient supporters to shout down any other opinions.
    .. which is a shame .

    I just started Easter of last year with .Net and can second this ....
    I once wrote a program in VB6, then re-wrote it in .NET. That's the closest I've come to a head-to-head comparison, but it wasn't even close.
    I found out also that it is better to rewrite!

    well anway I thought it would have been great to have a SubForum, where objectiv and constructive Talk could
    take place.

    regards
    Chris
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  7. #207
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: Vb6 , the Future, and what I have discovered

    My 2 cents:

    I don't need platform independency, Windows is enough.

    Also I don't need a new IDE - there is one.
    It is not super duper, but the IDE bugs are well known and easy to live with.
    Convenient enough.

    What I do really miss is 64bit.
    While it is not needed for many apps, I could really use it.

    In all other respects, in can do whatever I want with VB6.

    Sometimes there are obstacles (slow class destroying etc.).
    But I don't expect perfection in another language.
    There will be obstacles as well, and the bad thing is, I don't know them.

    ---

    When VB.NET came out, I started to port my VB6 apps to it.
    In the beginning I was impressed how easy things can be.
    I was disappointed soon.

    It turned out that it would have been a total rewrite.
    As I'm not 2 or more persons, I had to stop it.

    Karl

  8. #208
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Schmidt View Post
    Niya, I'm in the process of writing a compiler for it - and thought that I've had COM-inheritance already explained to you in a recent thread.

    It is (as Carlos has already mentioned) indeed quite easy to remain COM-compatible - and at the same time still to offer
    true Inheritance over a new VB6-Compiler which hides the details of the VTable-arrangements when it tackles VB.Next-Classes.

    I've now made a Demo-Project especially for you, which shows (in a plain, straight-forward implementation of VB-Code),
    how this stuff works under the covers.

    Let's assume we have two Classes:
    - one base-class which is based on IMyClass (defining two Public Methods)
    - and one "derived Class", based on IMyInhClass (which inherits interface.wise from IMyClass, and then adds a single Method)

    A new compiler would then e.g. produce the following simple COM-interface-def, expressed in IDL:
    Code:
    [
      uuid(EF8B4155-A9B5-4008-8FDB-57D373B3C48A), version(1.0)
    ]
    library MyClassTypeLib
    {
        // TLib :     // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
        importlib("stdole2.tlb");
    
        // Forward declare all types defined in this typelib
        interface IMyClass;
        interface IMyInhClass;
    
        [
          odl, uuid(4BA4C1B8-EE48-4BE2-BB63-2648605BDB8E)
        ]
        interface IMyClass : IUnknown {
            HRESULT _stdcall AddTwoLongs([in] long L1, [in] long L2, [out, retval] long* retVal);
            HRESULT _stdcall SayHello([in] BSTR MsgPrefix);
        };
    
        [
          odl, uuid(BB2DECE9-1C2F-4409-9141-23D81E70FA8B)
        ]
        interface IMyInhClass : IMyClass {
            HRESULT _stdcall MulTwoLongs([in] long L1, [in] long L2, [out, retval] long* retVal);
        };
    };
    Note the Interface-Inheritance, which IDL (unsurprisingly) understands already
    - (especially as it is expressed at the end - and marked in magenta)
    - and of course another Interface-inheriting part is contained (marked in blue, but that "inheriting from IUnknown" is "required business as usual" with COM-interfaces)

    Now take a look at, what a new compiler would have to produce in addition (expressed in normal *.bas-modules, to underline the fact, that only equivalent C-Code is needed, not C++).

    Each (later compiler-generated) Class-Code comes in two parts (a Class-Definition-part for the VTable-def, and a ClassFactory-part for the Implementation (and later Creation).

    Code for the BaseClass-Def (conforming to the above IMyClass)
    Code:
    Option Explicit
    
    Public Type tMyClassVTable
      IUnk As tUnkVTable 'Space for the 3 Methods of IUnknown
     
      AddTwoLongs    As Long 'followed by Space for the two Function-Pointers of our two concrete Methods
      SayHello       As Long
    End Type
    
    Private mVTable As tMyClassVTable 'preallocated (static, non-Heap) Space for the VTable
    
    Private Sub InitVTable() 'this method will be called only once
      mVTable.IUnk = modIUnknownDef.VTableInherit
      mVTable.AddTwoLongs = FuncPtr(AddressOf modMyClassFactory.AddTwoLongs)
      mVTable.SayHello = FuncPtr(AddressOf modMyClassFactory.SayHello)
    End Sub
    
    Public Function VTablePtr() As Long 'the only Public Function here (later called from modMyClassFactory)
      If mVTable.AddTwoLongs = 0 Then InitVTable 'initializes only, when not already done
      VTablePtr = VarPtr(mVTable) 'just hand out the Pointer to the statically defined mVTable-Variable
    End Function
    
    Public Function VTableInherit() As tMyClassVTable
      If mVTable.AddTwoLongs = 0 Then InitVTable 'initializes only, when not already done
      VTableInherit = mVTable 'return a copy of the filled VTable-Struct
    End Function
    Code for the BaseClass-Factory (the true implementation of the stuff, we currently write into a VB6-*.cls Module):
    Code:
    Option Explicit
     
    Public Type tMyObject 'an Instances of this Object will occupy...
      oUnk As tUnkObject '<- 8Bytes needed for the VTable and the RefCounter (that's half the size of a Variant-Type)
      
      mSomeClassPrivateVariable As Double 'and by defining this (currently unused) dummy, 8Bytes more for the Double (total of 16Bytes)
    End Type
    
    'Constructor-Function to create and return a new Class-Instance of interface-type IMyClass
    Function CreateInstance(Optional ByVal SomeInitValue As Double) As IMyClass
      Dim This As tMyObject 'we use our UDT-based Object-Type in a Stack-Variable ...
          This.mSomeClassPrivateVariable = SomeInitValue 'for more convenience here, whilst "filling it"
          
      'assign a new initialized Object-Reference to the Constructor-Function-Result
      Assign CreateInstance, AllocateInstanceMemory(modMyClassDef.VTablePtr, This.oUnk, LenB(This))
    End Function
    
    'IMyClass-implementation (IMyClass only contains the following two methods)
    Function AddTwoLongs(This As tMyObject, ByVal L1 As Long, ByVal L2 As Long, Result As Long) As Long '<- HResult
      Result = L1 + L2 'note, that we set the Result ByRef-Parameter - not the Function-Result (which would be used for Error-Transport)
    End Function
    Function SayHello(This As tMyObject, ByVal MsgPrefix As String) As Long '<- HResult necessary here as well, although "Interface-wise" this is "a VB-Sub() which does not return anything"
      Debug.Print MsgPrefix & " from the implementation of MyClass"
    End Function

    Code for the DerivedClass-Def (conforming to the above IMyInhClass - and due to inheriting, a bit shorter than the above two Files)
    Code:
    Option Explicit
     
    Public Type tMyInhClassVTable
      MyClassVTable As tMyClassVTable 'this is the inheriting member
      MulTwoLongs As Long 'and this the only addition on top of the inherited class
    End Type
    
    Private mVTable As tMyInhClassVTable 'preallocated (static, non-Heap) Space for the VTable
    
    Private Sub InitVTable() 'this method will be called only once
      mVTable.MyClassVTable = modMyClassDef.VTableInherit
     
      mVTable.MulTwoLongs = FuncPtr(AddressOf modMyInhClassFactory.MulTwoLongs)
    End Sub
    
    Public Function VTablePtr() As Long 'the only Public Function here (later called from modMyClassFactory)
      If mVTable.MulTwoLongs = 0 Then InitVTable 'initializes only, when not already done
      VTablePtr = VarPtr(mVTable) 'just hand out the Pointer to the statically defined mVTable-Variable
    End Function
    
    Public Function VTableInherit() As tMyInhClassVTable
      If mVTable.MulTwoLongs = 0 Then InitVTable 'initializes only, when not already done
      VTableInherit = mVTable 'return a copy of the filled VTable-Struct
    End Function
    Code for the DerivedClass-Factory (the true implementation of the stuff, we later (with the new compiler) would have to write into a VB.NEXT-*.cls Module):
    Code:
    Option Explicit
     
    Public Type tMyInhObject 'an Instances of this Object will occupy...
      oMyObject As tMyObject 'the 8+8 = 16Bytes from the "Instance-Allocation" of the Object we inherit from
      
      mSomeOtherPrivateVar As Long '+ additional 4 Bytes for this (also currently not used) Private-Variable
    End Type
    
    'Constructor-Function to create and return a new Class-Instance of interface-type IMyInhClass
    Function CreateInstance(Optional ByVal SomeOtherInitParam As Long) As IMyInhClass
      Dim This As tMyInhObject 'we use our UDT-based Object-Type in a Stack-Variable ...
          This.mSomeOtherPrivateVar = SomeOtherInitParam 'for more convenience here, whilst "filling it"
          
      'assign a new initialized Object-Reference to the Constructor-Function-Result
      Assign CreateInstance, AllocateInstanceMemory(modMyInhClassDef.VTablePtr, This.oMyObject.oUnk, LenB(This))
    End Function
    
    'IMyInhClass-implementation (IMyInhClass only defines the following method - on top of what IMyClass defines)
    Function MulTwoLongs(This As tMyInhObject, ByVal L1 As Long, ByVal L2 As Long, Result As Long) As Long '<- HResult
      Result = L1 * L2 'note, that we set the Result ByRef-Parameter - not the Function-Result (which would be used for Error-Transport)
    End Function
    And that's it already, with regards to a short demo, how the new compiler will support COM-based inheritance.
    (overriding of inherited Methods, if so desired, is currently left out in the above snippets, but could easily be added as well into that VB6-based demo).

    Here a Demo.zip which includes the above as a working VB6-Project - as well as the needed *.tlb:
    Attachment 155757

    Here the Debug-Output the Demo will produce, after clicking the form:
    Code:
    AddTwoLongs-Result: 3
    Hello from the implementation of MyClass
    ObjPtr of MyObj:  3607304 
    
    Output of the inheriting Class starts here:
    AddTwoLongs-Result: 5
    Hello from the implementation of MyClass
    MulTwoLongs-Result: 6
    ObjPtr of MyInhObj:  3627920
    Intellisense is doing as it should, too (showing the inherited Methods of IMyClass also in IMyInhClass).

    HTH

    Olaf
    Woke up this morning and found this post. I examined the code you posted and yes, it's clever what you did with the VTABLE to support inheritance.

    After examining your code for the past hour or so in between doing other stuff, I've decided to table any debate for over this for now and experiment. I'm going to attempt to map the type library you created onto a true inheritance hierarchy in, yes you guessed it, VB.Net. I don't know if I'll succeed or how long it will take. It's been a while since I did anything this technical but I find it interesting enough to spend time on it. I expect to encounter hurdles which I expect will take a lot of time to overcome....or I might just succeed within a couple hours....I don't know. But, I'm not going to respond until I either succeed or give up. Whichever happens, I'll let you know what my conclusions were on this COM debate.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #209
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Schmidt View Post
    You have the whole COM-story entirely backwards Niya...
    COM was (and is) getting into nobodys way - instead COM is the building-block(s) (always was) for all modern WinOS-functionality.

    The old article you posted about "Indigo" was horribly bad in its "speculations" (and old - from 2005).
    Here a few facts:
    - Indigo (is no more - it existed only for a short time at the era of .NET 2.0 - but since it was hyped as always - code had to be thrown away in the end)
    - next was WCF (Windows-Communication-Foundation) into which parts of the Indigo-stuff were merged, but IIRC in an incompatible manner)
    - well, WCF is deprecated now too (absolved by "ASP.NET Core 1 and MVC 6"): https://blog.tonysneed.com/2016/01/0...ng-live-mvc-6/
    - well, although the linked article a line above was from 2016 - it's "old news" now, please welcome .NET-Core 2.0: https://weblog.west-wind.com/posts/2...e-finally-here

    Well, I'm sure we didn't hear the end of it - but guess who was "always there, all the time"?
    COM+ (along with normal COM-basedness and -support in MS-Office, Explorer/Shell, modern CoreAudio, Direct2D, DirectWrite, DirectX12, etc. pp.)


    Given your misinformedness about COM - what exactly do you mean with "needed to be done"?

    Olaf
    A lot of mis-info (or just really outdated info) about COM in this thread.
    Glad someone is trying to correct the record.
    Fact is COM is going nowhere without a complete rewrite of the core OS the shell and graphics / audio components etc.

  10. #210
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Vb6 , the Future, and what I have discovered

    I don't care to get into a 1-for-1 comparison, I think Shaggy Hiker covered my objections to that nicely. The things I want to show off aren't "things VB6 can't do", they're "syntax sugars that make certain tasks more intuitive or faster to write correctly".

    Our comparisons will spin around in circles because I think we're looking at different worlds when imagining, "What do I want to write?" You're thinking of Windows clients and worrying about executable size, memory footprint, etc. I'm thinking of multi-platform clients or scalable server architectures in environments where the customer is willing to buy bigger hardware in return for an aggressive schedule. That means we value two completely different things, and we'll waste a lot of time comparing each others' code when most sensible observers would say, "Aren't those just two good solutions with different tradeoffs?"

    I'd rather not distract you longer from the project. Argument isn't doing. People without dirty hands are wrong. Go make your IDE with whatever the heck syntax you want, it's a great project no matter how you design the language. I strongly agree that, "Does VB have a future?" has a more positive answer if the community accepts, "Perhaps that future won't come from Microsoft."

    You did ask something interesting worth commenting on:
    Not sure, how you meant the above - would you *prefer* a "first-class GUI" (with tighter integration) -
    or do you think that a language with a more "loosely coupled GUI" would be more favourable in a "potential VB6-successor"?
    I don't know the answer to that question, I think there are enough tradeoffs you have to pick your favorite and run with it.

    A system tightly integrated to the GUI is easier for less skilled developers to understand, and tends to be easier to use for the things the integration predicted. Making it flexible is harder, so it risks making "advanced" tasks harder. A system highly decoupled from the UI is easier to imagine for multiple platforms, displays, etc. But it's harder to get simple things done. (I feel this in modern UI: writing trivial apps is a drag if you're forced into an MVC architecture.)

    I want both tools, really. Sometimes I'm writing a teeny one-off program and I wish it was easier to put a GUI on it. Other times I'm writing a sprawling application and I need decoupling. I think "the future" has a place for both tools. Right now most development tools favor decoupling, I think it's because our hardware is changing so rapidly no one imagines they can finish an integrated tool before the world turns on them. I think the first really good IDE that makes something like Cordova/Electron apps with an environment like VB6 is going to make bank.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  11. #211
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Vb6 , the Future, and what I have discovered

    Cordova (the rebranded PhoneGap) isn't a lot different in most ways from HTML Applications which we've had since the late 1990s.

    There is at least one GUI IDE for HTAs, but it was never very polished since it was really aimed at admin scripters. There doesn't seem to be any GUI user interface designer but it does have a debugger.

    Electron and NS.js are interesting twists on the concept.

  12. #212
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: Vb6 , the Future, and what I have discovered

    Although VB6 is best at Windows desktop development, I think the future of VB6 lies in the following aspects:
    (1) Server-side development
    (2) Web development
    (3) Mobile development

    Due to the above reasons, platform-independency is very important.

    In addition, reducing the dependencies on Windows Core-Libs should greatly improve the stability, flexibility and performance of our future software products.

  13. #213
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by dreammanor View Post
    Although VB6 is best at Windows desktop development, I think the future of VB6 lies in the following aspects:
    (1) Server-side development
    (2) Web development
    (3) Mobile development

    Due to the above reasons, platform-independency is very important.

    In addition, reducing the dependencies on Windows Core-Libs should greatly improve the stability, flexibility and performance of our future software products.
    Olaf and I agree that the future of VB6 depends on a class based Core Runtime, that can be re-done per platform like .NET Core.
    We also agree that it needs to be C translator (and COM) based, with an edit and continue IDE / Debugger.

    (FYI FireFox uses it's own platform independent COM implementation)

  14. #214
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by DEXWERX View Post
    Olaf and I agree that the future of VB6 depends on a class based Core Runtime, that can be re-done per platform like .NET Core.
    Come on, at that point there is no "VB" about this, much less "VB6." If you want to retain language syntax in a dialect of Basic similar to VB's then that's another story, but it isn't "VB" or "VB6" even if the procedural code is easily ported. VB6 is far more than the code however.

    If you want a dark world Basic where you cobble together your GUI in code at runtime calling add-on widget libraries you may as well be writing in C. An IDE is a lot more than a text editor with Intellisense and the ability to run "make" scripts, the best you typically get for dark world languages. You may as well be using MS-DOS instead of Windows.

    But that's exactly the problem VB was invented to get around, and why it was so successful. VB6 "turned on the lights."

    You are regressing to QBasic-level toolsets. Just move to FreeBasic if you want that.

  15. #215
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by dreammanor View Post
    Although VB6 is best at Windows desktop development, I think the future of VB6 lies in the following aspects:
    (1) Server-side development
    (2) Web development
    (3) Mobile development
    I seriously doubt that the future of VB6 is either in web or mobile. There are already better options out there. I'm not thrilled with JS, but JS/Cordova seems more likely to win out than however VB6 would work in the mobile world, and web isn't really a language. Ultimately, that's HTML, and whatever language that modifies it. That area just seems to be moving faster than anywhere else, and where is VB6 in any of that?
    My usual boring signature: Nothing

  16. #216
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    Ultimately, that's HTML, and whatever language that modifies it. That area just seems to be moving faster than anywhere else, and where is VB6 in any of that?
    Well we used to have WebClasses (IIS Applications) and DHTML Applications, but we still have Classic ASP where a thin wrapper script can invoke a DLL written in VB6. And then you have CGI, FastCGI, and other web server server-side APIs that VB6 programs can use.

    But I agree that only a masochist would bother. There are too many other alternatives out there, especially if you want the option of cheap LAMP hosting.

  17. #217
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    I seriously doubt that the future of VB6 is either in web or mobile. There are already better options out there. I'm not thrilled with JS, but JS/Cordova seems more likely to win out than however VB6 would work in the mobile world, and web isn't really a language. Ultimately, that's HTML, and whatever language that modifies it. That area just seems to be moving faster than anywhere else, and where is VB6 in any of that?
    Yes, you could design pages in and human friendly and intuitive language as VB is, with things like:

    Code:
    Text1.Left = Me.ScaleWidth - 1000
    Then, the server running the interpreter would transform that to HTML.

    Of course that language will win over the others (that are full of braces, curly braces and semicolons), as VB did in regard to desktop software.

  18. #218
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Vb6 , the Future, and what I have discovered

    The past dozen or so posts are more or less the points I was trying to make but I clearly fail at compression. It feels like people are independently arriving at, "If you want to make a relevant modern VB, it feels like the best way to go about it is to implement something that looks a lot like the .NET Framework." There's nothing specific about why that can't be "like COM" other than "no one ever bothered to make COM cross-platform so there's nothing to build on".

    I think the opinion dilettante holds has been a problem in the VB community for ages. VB .NET sacrificed some of its Windows integration so it could be applicable to other modes of development. To them, that makes it "not VB".

    So dilettante (forgive me for presuming some words from your mouth) would probably be happier if we had a "VB7" that focused on Windows clients like VB6 did. He'd probably be fine with a different tool being "VB for web apps" or "VB for mobile". But he doesn't want to see an attempt at a Swiss Army Knife language because he asserts it will require compromises that damage the effectiveness of VB on all three platforms.

    If that's what he's meaning to say under all the jabs, I think it's an effective argument. I can "not agree" with it, but I can't dismantle it.

    I think the other side of the coin feels VB is a language, not a philosophy, and until we know which of the three main segments of the market are most important it has to try to serve all three as best as it can. Since so many aspects of each segment are in flux right now, we're hesitant to tightly couple ourselves to any one methodology. This is why C# is evolving to a very functional language: OOP works best when your domain is well-understood, FP is more flexible to changing domains. This is why I think VB is hurt when it can't adopt new features quickly. Modern development is chaos because half of all projects find the frameworks they chose are replaced before they finish. I sort of can't blame dilettante for looking at it and clicking his tongue, even if I think it's explainable by having weird products appear every 2 years to change our opinion about "what makes money". Consumers are really bad customers, when compared to enterprise.

    But I think whoever works on implementing this project should decide where on that philosophical line they fall and execute on the vision they think is best. You don't work with passion on ideas you don't believe in. No matter what decision you make, plenty of people are going to tell you how wrong it was. People without dirty hands are wrong.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  19. #219
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by dilettante View Post
    But I agree that only a masochist would bother. There are too many other alternatives out there, especially if you want the option of cheap LAMP hosting.
    Not necessarily...I think there is value for VB6 on the webserver for 2 reasons - you can use your existing programming knowledge, and you can use a lot of your existing code. Using Wine you can use cheap Linux VPS hosting, but I've recently found a few fairly cheap Windows VPS hosts recently if you want to stick with Windows.

    In my case, I could either rewirite a few hundred thousand lines of code as a new web application, or I could build a FastCGI application in front of my existing code that serves up a web front-end in a fraction of the time (couple of weeks). With the FCGI app written in VB6, I can reference all the same objects as my desktop front end, and then just perform transformations to JSON, HTML, etc... and serve those downstream. Nothing masochistic about that in my opinion.

  20. #220
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Vb6 , the Future, and what I have discovered

    (Also personally I hate HTML and CSS as UI languages, I think XAML gets the concept a little better. For a language initially designed to display and markup text, HTML is shockingly ignorant of issues like, "Can I display this text within these boundaries with no clipping?", and can't even tell you where on the page some element might display without potentially rendering the entire thing. The biggest stumbling block for the HTML/JS model of application design, in my opinion, is we need a markup language more appropriate for application design.)
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  21. #221
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Sitten Spynne View Post
    I think the other side of the coin feels VB is a language, not a philosophy, and until we know which of the three main segments of the market are most important it has to try to serve all three as best as it can. Since so many aspects of each segment are in flux right now, we're hesitant to tightly couple ourselves to any one methodology.
    I think that when you start a new project, you should set the domain for the project:
    1) For Windows
    2) Cross platform
    3) Web development
    4) Mobile App.

    Then, the available things that will be available to use within the program will vary.

  22. #222
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,720

    Re: Vb6 , the Future, and what I have discovered

    not sure whats the problem with some of you, if you don't like the idea of a new IDE, well, stay with legacy vb6, nobody is forcing you.
    me, I would love a new IDE, also, for me, i don't use the components anyway, but I enjoy programming in vb6, adding custom gui and such.
    so for me the IDE gui and the components are minor, the language itself is major, I want to be able to add modules, classes, sub/functions and all the syntax vb6 has and all the new built-in stuff, so I dont need to call any API at all. that would be awesome. and if I can build it to work in linux/mac, that would allow me to share my tools to more people.

  23. #223
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,447

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Eduardo- View Post
    Yes, you could design pages in and human friendly and intuitive language as VB is, with things like:

    Code:
    Text1.Left = Me.ScaleWidth - 1000
    Then, the server running the interpreter would transform that to HTML.

    Of course that language will win over the others (that are full of braces, curly braces and semicolons), as VB did in regard to desktop software.
    Trying to bring that kind of syntax to the web resulted in aspx webforms and they were hardly an outstanding success, the syntax tried to hide how http works (GET, POST etc) and involved a confusing event driven model that was a very leaky abstraction as soon as you tried to do anything complex. It also very tightly coupled the UI and code together making clean separation and the ability to unit test both a challenge and always seemed to be going against the environments wishes.

    The other issue is that code running on a server, generating html will not have access to a lot of the client-side html information, such as screen size or dpi to be able to make that kind of decision about layout and positioning anyway.

  24. #224
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by PlausiblyDamp View Post
    Trying to bring that kind of syntax to the web resulted in aspx webforms and they were hardly an outstanding success, the syntax tried to hide how http works (GET, POST etc) and involved a confusing event driven model that was a very leaky abstraction as soon as you tried to do anything complex. It also very tightly coupled the UI and code together making clean separation and the ability to unit test both a challenge and always seemed to be going against the environments wishes.
    I meant something well done.
    There are many tools and libraries out there to produce something like that, but none in VB code, at least not like our VB (AFAIK).

    Quote Originally Posted by PlausiblyDamp View Post
    The other issue is that code running on a server, generating html will not have access to a lot of the client-side html information, such as screen size or dpi to be able to make that kind of decision about layout and positioning anyway.
    I said HTML simplifying, but it would have to add also the needed JavaScripts, CSS, Etc.

  25. #225
    Member
    Join Date
    Dec 2017
    Posts
    32

    Re: Vb6 , the Future, and what I have discovered

    Well, I always thought that a noob's opinion on any subject, can sometimes be less "muddy" than the ones from experts, so here is one:

    While I'm not completely new to vb6, all I ever did was a couple of small apps in the early 2000's and I then completely abandoned programming.
    The last couple of months my interest in programming revived and I was expecting to discover all the fancy new languages/tools after 15+ years of absence...
    To my surprise, I found a horrible situation where things are actually harder for beginners than back then! Is the idea of an IDE the new VS 2017? Because it's completely cluttered and unresponsive on a mid-powered machine. Are there no snappy, tightly integrated language/compiler/debugger/designer which doesn't look so incredibly inhuman? What the heck is a "toolchain" and why should I spend a whole day to setup one, just to try and run Hello World? Why are there a gazillion frameworks for each language, that gets one confused about which one to invest time for?
    And then I got back to familiar territory when I learned that I could actually run vb6 on Windows 10! Not only that, I also discovered that the vb community is THAT much alive!
    So, with my limited understanding, what I would love to have is:
    1. A modernized IDE. Meaning one that installs and runs without any kind of hack. Good looking would be a plus.
    2. Independence of as much dependencies as possible, or a straightforward way to ensure "clients" won't get problems running your application.
    3. Have the ability to design a modern GUI, for the new world of multiple form factor devices, again without any hacks.
    4. Target mostly Windows desktop, but having the ability to export to other platforms, even with compromises.
    5. Be 100% compatible with vb6, unless there's a sane way to port previous projects.
    6. Most important of all, keep the fast, easy (but not limiting) and humanly understandable spirit of vb6.

    If I'm not mistaken, Olaf's proposal has addressed all of these points but I can't seem to understand why some people fail to see one other important thing:
    Why did vb got so much bad-mouthing over the years? IMHO it's because it was a tightly-integrated system (thus not a "pure" language), closed source and controlled by a single individual (a corporation), not because they were evil, but because that's how sometimes good products are born: By an individual doing something (even if it is controversial), instead of continuously arguing what to do.
    I can only speak for my self, but it's for the above reasons in bold that I first liked vb6 and for the same reasons I find this new idea so attractive, so very well presented and, coming from a true expert in this field, so doable.

  26. #226
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,522

    Re: Vb6 , the Future, and what I have discovered

    And punch cards. IT's also got to be able to read punch cards. I've got stacks and stacks of punch cards. Unless there's an easy way to port that code over as well.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  27. #227
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    A few replies to those points:

    1) I've always felt the peak was VS2010. After that, VS got more features, but the result was just that it slowed down. I like a lot of those features, I'm just not sure that the IDE performance hit is worth it.

    2)That would be nice. Doesn't exist, though, and never has unless you define your set of clients as "those who can run my application without anything else being required." Web, Android, Apple, Windows, Mobile, disconnected web, and so on. There just isn't anything that has ever crossed all the boundaries well.

    3)That would be nice, too. Bootstrap on web is the best I currently know of....but, that's web. Nothing like that on Windows.

    5) Why would you care? You said you haven't done anything since 2000, and then not much. What's the point of backward compatibility in your case?

    6) I've never really thought that VB6 was all that readable. Sure, If statements are pretty readable, but other than that....not so much. It's not a book. Sentence structure is non-existent. If methods and variables are poorly named, they sure aren't clear. Not much is readable unless you understand it. That seems true of pretty nearly any language. Furthermore, since so many are in the C-family of syntax, if you know that syntax it gives you access to most of the main languages in use today. C, C++, Java, JavaScript, along with others all share the same syntax. So, if knowing something about the syntax is necessary to really be able to 'read' the code, then that would be the obvious syntax to learn, as it would give the broadest applicability.
    My usual boring signature: Nothing

  28. #228
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    6) I've never really thought that VB6 was all that readable. Sure, If statements are pretty readable, but other than that....not so much. It's not a book. Sentence structure is non-existent. If methods and variables are poorly named, they sure aren't clear. Not much is readable unless you understand it. That seems true of pretty nearly any language. Furthermore, since so many are in the C-family of syntax, if you know that syntax it gives you access to most of the main languages in use today. C, C++, Java, JavaScript, along with others all share the same syntax. So, if knowing something about the syntax is necessary to really be able to 'read' the code, then that would be the obvious syntax to learn, as it would give the broadest applicability.
    I think you are very wrong.
    VB6 is close to English, with some abbreviations.
    I don't think other language is so close.

    There aren't strange things like curly braces everywhere or semicolons, or full of labels enclosed in braces.
    Only people that like to think as a machines could like that. (*)

    And it is not needed to qualify everything (as other languages require), because it is smart enough to figure in what domain to look for a certain member.

    Is it too difficult to understand that?

    If you are gone to other language, good. But then don't come back saying that it is better or deprecating the old language that you left just to justify the decision that you made.

    This reminds me of people who quit smoking and start pestering everyone else to stop smoking.

    Edit: (*) "Normal" people prefer something more human friendly.
    That's why there were about 6,000,000 VB6 developers at a time.
    How many developers does VB.NET have now?

  29. #229
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Eduardo- View Post
    I think you are very wrong.
    VB6 is close to English, with some abbreviations.
    I don't think other language is so close.
    Not any English I've ever spoken. I don't see any English speaker coming to VB of any sort and simply understanding it. I think that if you are a programmer, then the syntax follows the way we might speak about a coding problem more closely than a more symbolic language, but I don't see it doing much of anything for a non-programmer.
    There aren't strange things like curly braces everywhere or semicolons, or full of labels enclosed in braces.
    Only people that like to think as a machines could like that. (*)
    I'm no fan of semicolons, and have repeatedly pointed out that they aren't needed (except in JS, and then for a reason specific and peculiar to that language). I've never really thought about curly braces, because nobody ever types them just like nobody ever writes End If in VB (except that I just did, but ignore that). Any good IDE provides those, so they are meaningless. Not sure what you are referring to when you talk about labels enclosed in braces. Are you talking about casts? Cause casting is opaque in every language that I know of, including VB.
    And it is not needed to qualify everything (as other languages require), because it is smart enough to figure in what domain to look for a certain member.
    That's an IDE feature rather than a language feature, as has been made abundantly clear in the latest VS. Prior to that, VB did better, C# did not. So, MS decided to converge the two in that area....by breaking the way it worked in VB. Nice. Still, it made it clear that this was just an IDE thing.

    If you are gone to other language, good. But then don't come back saying that it is better or deprecating the old language that you left just to justify the decision that you made.
    I'm not doing either, and rather resent the implication. I still work in VB primarily. I also work in other languages, and see the weaknesses in all of them. I know why I have worked in each language I have ever worked in. I don't need to make up any justifications. Each move was made based on a full understanding of the situation, and I always revisit those decisions to see whether or not they still hold.


    "Normal" people prefer something more human friendly.
    We are not normal people.

    That's why there were about 6,000,000 VB6 developers at a time.
    How many developers does VB.NET have now?
    I have no idea, nor do I have any idea why I should care? Is this a popularity contest? If so, I think JS would likely win these days, but nobody is likely to love THAT language. Personally, I've been pushed more into mobile, which didn't exist when I worked in VB6, so the landscape has changed and the population of programmers likely reflects the landscape more than the language.
    My usual boring signature: Nothing

  30. #230
    Member
    Join Date
    Dec 2017
    Posts
    32

    Re: Vb6 , the Future, and what I have discovered

    Thanks for the replies Shaggy

    Quote Originally Posted by Shaggy Hiker View Post
    A few replies to those points:

    5) Why would you care? You said you haven't done anything since 2000, and then not much. What's the point of backward compatibility in your case?
    Because I feel the power of this language is in the thousands of snippets and example projects posted in this and other forums. IMO it's the best "kind" of documentation. I guess no one would mind putting some effort to tweak a user-posted example, as long as it requires minimal changes. In my case, as you said, it wouldn't be such a problem since I haven't done much, but I think the majority would support anything that could modernize an old project of theirs.

  31. #231
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: Vb6 , the Future, and what I have discovered

    Despite being more fluent in C/C++/C#/PHP/Javascript, I'm actually a huge fan of the Basic language as culminated in VB6 (vs PowerBASIC etc)
    It's just so close to pseudo code - that's why I prefer it.
    If we could push it onto all platforms, that would be my goal.

  32. #232
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by immortalx View Post
    Thanks for the replies Shaggy



    Because I feel the power of this language is in the thousands of snippets and example projects posted in this and other forums. IMO it's the best "kind" of documentation. I guess no one would mind putting some effort to tweak a user-posted example, as long as it requires minimal changes. In my case, as you said, it wouldn't be such a problem since I haven't done much, but I think the majority would support anything that could modernize an old project of theirs.
    Yeah, I totally agree with that. There are things out there, like Xamarin, which have a certain amount of promise, but they are SERIOUSLY lacking in documentation and support. Xamarin is buggy as can be, so documentation and examples are even more valuable, yet they don't exist in much quantity or quality.
    My usual boring signature: Nothing

  33. #233
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    Not any English I've ever spoken. I don't see any English speaker coming to VB of any sort and simply understanding it. I think that if you are a programmer, then the syntax follows the way we might speak about a coding problem more closely than a more symbolic language, but I don't see it doing much of anything for a non-programmer.
    Well, I don't share your thoughs at all.

    Code:
    Print "hello"
    Seems to me that it is almost English.
    Much better than

    Code:
    System.Main.TextFunctions.Prn ("hello", DefaultPrn, AddCr, AddLF)
    or

    Code:
    {
    [begin_print] /#;@'hello'; [/end_print]
    }
    Also

    Code:
    Do Until a > 5
        a = a +1
    Loop
    It is just English.

    Or

    Code:
    If a < 6 Then
        a = 6
    End If
    It is very easy to figure what that does. Or course, the person also need to study programming, at least read a book, but it is easy to learn in such a language.

    Quote Originally Posted by Shaggy Hiker View Post
    I've never really thought about curly braces, because nobody ever types them just like nobody ever writes End If in VB (except that I just did, but ignore that). Any good IDE provides those, so they are meaningless
    The If blocs must be diferentiated in some way, even in any IDE. So it can a with a color, or with an identation.
    Still, they are in the code.

    Quote Originally Posted by Shaggy Hiker View Post
    Not sure what you are referring to when you talk about labels enclosed in braces.
    HTML, XML.

    Quote Originally Posted by Shaggy Hiker View Post
    That's an IDE feature rather than a language feature, as has been made abundantly clear in the latest VS. Prior to that, VB did better, C# did not. So, MS decided to converge the two in that area....by breaking the way it worked in VB. Nice. Still, it made it clear that this was just an IDE thing.
    If the IDE helps you to hide some of the language annoying things, fine, but they are language things, even if you don't want to recognize it.

    Quote Originally Posted by Shaggy Hiker View Post
    We are not normal people.
    May be I am, or try to be.

    Quote Originally Posted by Shaggy Hiker View Post
    I have no idea, nor do I have any idea why I should care? Is this a popularity contest? If so, I think JS would likely win these days, but nobody is likely to love THAT language. Personally, I've been pushed more into mobile, which didn't exist when I worked in VB6, so the landscape has changed and the population of programmers likely reflects the landscape more than the language.
    People now is using JS, PHP or whatever because they don't have better options.
    My point is that when a language is easy enough, many more people start using it.

  34. #234
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    What languages did you draw those other print statements from? The second one doesn't make any sense in any language, and the third, I sure don't recognize.

    The Do and If statements would be about the same as what you wrote in any C syntax language, as they would also use Do and If. You would have made a better example had you used either For, And, or Or, since all of those are less clear in the C syntax family.

    Now that I understand what you were referring to with labels in braces, I agree that it's hard to read, but it's also HTML. It's nothing more than text with formatting tags. It's not a language, just a storage mechanism. You use it as well. The form design in VB6 used a markup language that wasn't any better. While it's painful for us to read, it's particularly easy for a computer to read, which is why it is what it is. I don't consider that a programming thing, and has nothing to do with any language.

    If the IDE helps you to hide some of the language annoying things, fine, but they are language things, even if you don't want to recognize it.
    That response makes me think that I didn't understand what you were referring to with your original statement. I certainly don't know what you are referring to in this case, or see how it relates to my response, so maybe you could explain that more.

    We are not normal people.
    May be I am, or try to be.
    I'm currently sitting in a meeting with about 100 highly educated professionals (and barely paying attention, obviously), yet of this entire group, there are exactly two people who do any programming or even want to know anything about it. There might also be one or two others I could lure into it, but that's it. That's what I meant by not normal.

    People now is using JS, PHP or whatever because they don't have better options.
    My point is that when a language is easy enough, many more people start using it.
    I kind of agree. Better languages could be written there, and are coming out. Still, I doubt the number of programmers has dropped over the last two decades. If anything, I'd say it has gone up. The number of 'commonly used' languages seems to have increased in the last two decades. Perhaps I'm wrong about this, and if I'm right, then perhaps it has to do with the proliferation of platforms. I doubt the numbers have dropped, though.
    My usual boring signature: Nothing

  35. #235
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Shaggy Hiker View Post
    What languages did you draw those other print statements from? The second one doesn't make any sense in any language, and the third, I sure don't recognize.
    Those weren't actual languages, but were an illustration.

    Quote Originally Posted by Shaggy Hiker View Post
    The Do and If statements would be about the same as what you wrote in any C syntax language, as they would also use Do and If. You would have made a better example had you used either For, And, or Or, since all of those are less clear in the C syntax family.
    The important thing is to get the point, not if the example were the best.

    Quote Originally Posted by Shaggy Hiker View Post
    Now that I understand what you were referring to with labels in braces, I agree that it's hard to read, but it's also HTML. It's nothing more than text with formatting tags. It's not a language, just a storage mechanism.
    It is a kind of language. Just declarative, we could say.
    My point is that human shouldn't have to deal with such things.
    Only the ones that are too close to working with the processor, making drivers, compilers or operating systems kernel.

    Quote Originally Posted by Shaggy Hiker View Post
    You use it as well. The form design in VB6 used a markup language that wasn't any better. While it's painful for us to read, it's particularly easy for a computer to read, which is why it is what it is. I don't consider that a programming thing, and has nothing to do with any language.
    If you are referring to the *.frm files, I don't need to read them (normally).

    But if you work in PHP, you'll have to read a lot of such things.

    Quote Originally Posted by Shaggy Hiker View Post
    That response makes me think that I didn't understand what you were referring to with your original statement. I certainly don't know what you are referring to in this case, or see how it relates to my response, so maybe you could explain that more.
    We were talking about curly braces.
    You say that you don't need to type them because the IDE does for you.
    My point is that they are still there. If you read any example in MSDN you see them.
    You don't have to write them, OK, but the code that you read elsewere is cumbersome.

    Quote Originally Posted by Shaggy Hiker View Post
    I'm currently sitting in a meeting with about 100 highly educated professionals (and barely paying attention, obviously), yet of this entire group, there are exactly two people who do any programming or even want to know anything about it. There might also be one or two others I could lure into it, but that's it. That's what I meant by not normal.
    I think that two programmers every 100 people is a lot. The median is less, I think (just a guess).
    I don't know, may be one every 300... (*)

    My point was (or tried to be) that circa year 2000, there were many people, non professional programmers, but technicians, electronic engineers, may be even secretaries, Etc. that started using VB because it was easy to do something.
    As we already talked before, that was a big misleading, because they might have thought that they were already programmers (an in some sense they were), but when they tried to do something more "serius", it wasn't so easy.
    But they were there, learning, experimenting...

    Quote Originally Posted by Shaggy Hiker View Post
    I kind of agree. Better languages could be written there, and are coming out. Still, I doubt the number of programmers has dropped over the last two decades. If anything, I'd say it has gone up. The number of 'commonly used' languages seems to have increased in the last two decades. Perhaps I'm wrong about this, and if I'm right, then perhaps it has to do with the proliferation of platforms. I doubt the numbers have dropped, though.
    I don't know. What I can say is that everything seems to be too difficult now, just to start doing something.

    If you sum all the web designers, may be there are more programmers now, but that is because there weren't so many web sites at that time (to when we are comparing to) as there are now.

    Edit: (*) I'm reconsidering that estimation. I meet with some people, around 100, and there are two other programers.

  36. #236
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Vb6 , the Future, and what I have discovered

    No one ever writes representative code when they discuss how VB is "so close to English".

    In English, I might say, "Take the first 3 letters from my name and capitalize them." Some very esoteric languages like AppleScript pull that off.

    In VB .NET/VB6 I'd say philosophically the best we do is:
    Code:
    UCase(Mid(name, 0, 3))
    -or-
    name.Substring(0, 3).ToUpper()
    None of those look much like English, to me. Worse, I'd expect most forum posters to:
    Code:
    UCase(Mid(txtName, intStart, intEnd))
    -or-
    txtName.Text.Substring(Start, End).toupper
    That's a really common operation and even the object-oriented version doesn't read much like a sentence. Character-for-character there's no need to compare to many modern languages, it's very hard to pull off an English-like syntax without losing a ton of expressiveness. VB has long favored expressiveness, it only maintains the keyword style of BASIC.

    This is the place where OO design can shine and Functional Programming can polish it further, if you are careful and devote some discipline to your task. For example, I don't know how you do asynchrony in VB6, but I assume it's callback-based APIs. So let's look at some .NET code through the ages for a simple asynchronous task. This is sort-of-kind of what I was planning if I joined the, "Oh yeah, what can your language do that mine can't?" discussion.

    Zeroth: the big elephant in the room is if you pick stupid variable/sub/function names your code is garbage. Let's assume we're writing names that look like English.

    First, let's look at .NET 1.x's callback-based asynchonous pattern. I'm going to use an imaginary HTTP API so we don't get caught up in details about the stupid parts of those APIs. (And they ARE stupid.) Just try to read this in English.
    Code:
    Delegate Sub UpdateWebBrowserDelegate(ByVal data As String)
    
    Sub ShowWebResults()
        _httpClient.BeginGetString(AddressOf WhenDataIsDownloaded, url)
    End Sub
    
    Sub WhenDataIsDownloaded(ByVal token As IAsyncResult)
        Dim data As String = _httpClient.EndGetString(token)
        UpdateWebBrowser(data)
    End Sub
    
    Sub UpdateWebBrowser(ByVal data As String)
        If Me.InvokeRequired
            Dim task As New UpdateWebBrowserDelegate(AddressOf UpdateWebBrowser)
            task.Invoke(data)
        Else
            webBrowser.LoadHtml(data)
        End If
    End Sub
    What I get from this is a mess. To show web results, I "begin get string" and give it the "address of" some method named "when data is downloaded". So when that happens, I call "end get string" with a token to get the data. I call "update web browser", which checks if some InvokeRequires flag is true. if so, it creates a delegate named 'task' and gives it to an Invoke() method. If not, it tells a web browser to load the data. *** is this code really doing?

    So in .NET 2.0 they changed it to the Event-Based Asynchronous pattern.
    Code:
    Sub ShowWebResults()
        AddHandler _httpClient.GetStringCompleted, Addressof WhenDataIsDownloaded
        _httpClient.GetStringAsync(AddressOf WhenDataIsDownloaded, url)
    End Sub
    
    Sub WhenDataIsDownloaded(ByVal sender As Object, ByVal e As GetStringEventArgs)
        RemoveHandler _httpClient.GetStringCompleted, AddressOf WhenDataIsDownloaded
        Dim data As String = e.Data
        webBrowser.LoadHtml(data)
    End Sub
    This is still a little crooked in English. Add a handler, then call GetStringAsync. You have to magically remember that the event is raised when the download completes. When teh data is downloade, remove a handler then send the data to the web browser. Cool, this is better, right?

    (A nice side-effect of this pattern is the event it raises is required to execute on the UI thread, so we lose the boilerplate for marshalling to the UI thread which took up half the code in the callback-based pattern.)

    Now let's have a peek at the .NET 4.0 timeframe, which introduced lambda methods, better inference for delegates, and the Task asynchronous API, along with several other major improvements:
    Code:
    Sub ShowWebResults()
        _httpClient.GetStringAsync(url).ContinueWith( _
            Sub(t) webBrowser.LoadHtml(t.Result), _
            TaskScheduler.UseCurrentSynchronizationContext)
    End Sub
    OK, "Get a string asynchronously, and when it finishes load the result into a web browser, using the current thread's synchronization context." This was still too agitating for us, so we tweaked it with new VB language features:
    Code:
    Async Sub ShowWebResults()
        Dim data = Await _httpClient.GetStringAsync(url)
        webBrowser.LoadHtml(data)
    End Sub
    "Wait for the data from getting the string from this URL, then load it into a web browser."

    (What is happening behind the scenes is compiler olympics. Put most simply, the compiler auto-generates code that looks more like the previous example. The point is I don't have to write it.)

    An alternative technique that's catching on in the .NET world is the Reactive Extensions:
    Code:
    Sub ShowWebResults()
        _httpClient.GetString(url) _
            .SubscribeOn(CurrentThreadScheduler) _
            .Subscribe(AddressOf webBrowser.LoadHtml)
    End Sub
    "Wait for getting a string to return a result. On the current thread, give that result to the LoadHtml() Sub of WebBrowser."

    That's a very functional style of programming, as opposed to the more OO style of the Task Asynchronous Pattern. Both are much more expressive than callback-based approaches. This is a big part of why I said a lot about introducing new language features and not assuming we're at our peak of language design.

    I like VB syntax for some things, but "English-like" is a stretch. But we can do a lot with VB to make it meet that promise, and VB .NET has made many great strides. What my examples show is the language designers found a thing people do frequently ("update the UI with some asynchronous task") and over a decade developed syntax to make that thing much easier. I can write code quickly in ANY of those styles, but I prefer using Reactive Extensions or Tasks whenever I can because they let me spend time writing "what I want to do", not "how I want to do it". That is, in my eyes, what VB set out to do.
    Last edited by Sitten Spynne; Jan 30th, 2018 at 02:25 PM.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  37. #237
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,207

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by techgnome View Post
    And punch cards. IT's also got to be able to read punch cards. I've got stacks and stacks of punch cards. Unless there's an easy way to port that code over as well.
    In my opinion immortalx's post was not in the "usual category" one could so often read in other (earlier) threads which had a similar topic.:
    - "whining about what MS has done to us poor souls..." (I dislike such posts perhaps more than you .NETers do)
    - and also not the "pleading to MS" to "give us a new compiler" (dito here, since they made it abundantly clear, that they will not do so)

    VB6 is still a powerful language (e.g. C is by comparison way older than VB6, but nevertheless still considered one of the most powerful and successful languages to this day) -
    so I don't really see, how that "punch-card"-thing even compares.

    In my opinion, a lot of you guys (e.g. Sitten, Niya and now you - but also many VB6ers) do not (yet) clearly separate two things:
    - what part of code is "the language" ...
    - and what part of the code is "library-calls"

    The "lib-calls" perhaps with the "sub-distinction":
    - which parts are calls against the always needed runtime-libs (the parts which are "checked in per default", e.g. in your VB6-Project-references-dialog)
    - and which ones are calling into "true externals" (the parts you optionally check-in as COM-Dlls or -OCXes, or optionally define per Declare-Statements directly "in a module")

    If you keep those apart, the "plain VB6-language" (how you define Functions, Subs, Enums, Types, Classes - and the "basic control- and flow-statements"
    are entirely enough also in our "modern times" IMO.

    What was missing is a modern, unicode-aware, DPI-aware (internally already designed for platform-independence)
    Class-Library (comparable to what is available in .NET)... And we have that now (already for nearly a decade).

    If such Class-Libraries are well-written, then you will need no "Extra-fancy-stuff" in the language itself,
    when a "single line in UserCode" (a single call into a "well-designed Class") can ensure the same outcome.

    "Over-boarding fancyness in the language itself", ends in such "monsters like C++".
    There is a reason, why Apple was using Objective-C for that long in all its important implementations (and not C++) -
    and there's a reason why the Mozilla-team is rewriting their (currently in wide parts still C++) Browser-engine in the much simpler designed "Rust".

    And if you ask me, C# is on its way to become "the new C++" ...
    (overboarding with "fancyness", which is not really needed, though nevertheless later on *used*, to not be counted as "one of *those* guys").

    That's the sole reason, why I'm always encouraging you (who think otherwise),
    to show examples of "all the fancyness you can imagine and cram into a useful little demo" -
    because only by looking at the equivalent VB6-code (which accomplishes the same end-result)
    you "might" be convinced that none of the "fancyness" was really needed...

    Olaf

  38. #238
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Schmidt View Post
    you "might" be convinced that none of the "fancyness" was really needed...
    It's not essential but it's more productive. A lot of people have deadlines to meet.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  39. #239
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    None of the "fancyness" was ever needed. You can do whatever with plenty of existing languages. We never needed VB. We never needed C. It's all just groping towards some imagined, yet undefinable "something better", kind of like Plato's ideal forms (we don't create ideal forms, even in VB...but that's a different joke).

    My boss, convinced that VB was too complicated, wrote his own language. It has some amazing features. The way it interacts with databases is particularly impressive. Still, it's more of that groping towards something better.

    I don't disagree with anything you said, but you can't stop humanity for constantly trying new things. Hopefully, it's to the purpose of making things better, but we often go through some swamps along the way, and often abandon the effort while in one.
    My usual boring signature: Nothing

  40. #240
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Vb6 , the Future, and what I have discovered

    Quote Originally Posted by Niya View Post
    It's not essential but it's more productive. A lot of people have deadlines to meet.
    Yeah, but they best not be involved in THIS discussion.
    My usual boring signature: Nothing

Page 6 of 18 FirstFirst ... 345678916 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width