Powerbasic Museum 2020-B

General Category => General Discussion => Topic started by: Kent Sarikaya on October 16, 2007, 10:04:51 PM

Title: Why not C/C++ or Object Pascal( Delphi, FreePascal)
Post by: Kent Sarikaya on October 16, 2007, 10:04:51 PM
The thought hit me today when thinking about the amount of talent I see on this forum. Why are you guys not using C++, Delphi or any other truly native compiled Object Oriented Language? Would love to read about why, and why PowerBasic?
Title: Re: Why not C/C++ or Object Pascal( Delphi, FreePascal)
Post by: Paul Squires on October 16, 2007, 11:13:05 PM
After I stopped programming in dBASE III, I learned QuickBASIC. From there I learned about PowerBASIC for DOS. When Windows came alone, I started with VisualBASIC and later moved back to PowerBASIC for Windows. I guess that once I became comfortable with BASIC that I didn't see the need to move to another language - I could get the job done with BASIC and with a little ASM or other magic, my programs were just as competitive as others written in C or Delphi.

I still want to learn more about OOP methods but to do that I think that I will migrate to FreeBASIC because that language tends to be headed in a nice OOP/BASIC/C++ style. I expect that PB will someday add some measure of OOP support. Many users have asked for it over the years and I think that to remain a progressive player in the BASIC market place that it would be a wise move to implement.

As I get older I find less desire to move to new languages. :)

Title: Re: Why not C/C++ or Object Pascal( Delphi, FreePascal)
Post by: Patrice Terrier on October 16, 2007, 11:25:24 PM
Being also a C# programmer, I find PowerBASIC easier to read than C, and usualy OOP produces larger EXE code than PB.
Thus for ultimate size and speed I prefer PB over C++.
However procedural C could be also very effective, but less easy to maintain because of the syntax.

And when using OOP you can't control everything as you can do it, using low level SDK programming.
Why create a class, when a direct call to the core API does the job just fine, and without overhead.

Just my personnal thought of course ;)

Note: I do exactly the same with PowerBASIC, I always use direct call to the API intead of its PB's encapsulation counterpart, of course DDT but not only, this also apply to I/O access and many of the BASIC KEY WORDS, like UCASE$, LCASE$, SHELL, OPEN, etc.

Patrice Terrier
Title: Re: Why not C/C++ or Object Pascal( Delphi, FreePascal)
Post by: Frederick J. Harris on October 17, 2007, 03:35:13 AM
Not at all familiar with Delphi, but I also code a lot in C and also a little C++.  Speaking specifically of C++, I really like the language and in the future hope to gradually do more with it.  My problem with C++ is that while I like the language in an abstract sense, I really dislike all the class libraries associated with it., ie., MFC, etc.  They impose a particular program architecture I don't care for.  I really like the idea of being able to point out in my code exactly where the program begins and ends.

It seems I find myself often in the predicament of needing some sort of custom behavior in a control that can't be easily obtained by simply modifying an 'existing' object.  That being the case, I like to be able to resort to fairly low level techniques to achieve my goals.  This sort of thing can be done equally well in C, C++, or PowerBASIC.  Its just that PowerBASIC is the most productive in terms of time.  As an aside, I oftentimes code ideas up in PowerBASIC to see if they'll work, then modify the code to C or C++ so I can use it in the embedded devices I oftentimes code for (PB won't work there).

2002 was pretty much a turning point year for me.  I could see the end of VB6, and I really couldn't see myself going .NET.  At that time I was trying to decide between C, C++, and PowerBASIC, and PowerBASIC won out.
Title: Re: Why not C/C++ or Object Pascal( Delphi, FreePascal)
Post by: Kent Sarikaya on October 18, 2007, 12:21:06 AM
Thanks for replying back guys. It is interesting to read and each reply is unique and truly adds to the wide sort of views and uses we each have and why we do and use what we do. Thanks again for sharing your experiences!