Qbasicnews.com
December 10, 2018, 10:13:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Straying to C++  (Read 24422 times)
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #15 on: February 15, 2003, 04:14:36 PM »

You can't do OO in QBasic, just strutured programming. It is different. Bot OO and SP have types and sets of SUBs with related functionality, but only OO leaves you to have pieces of executable code embedded in those objects, and things like hierarchy and software abstraction, things impossible to achieve in SP (you can use any FUNCTION anywhere, and this could be dangerous when working on a large project where many people is involved). Also QB lacks pointers, and that feature makes it very lame, IMHO.

The Java feature of having each class in a separate file is not a problem as long as you use a good IDE. With such a facility, your project will look like *exactly* as your QB program in the QB IDE where you have each SUB/FUNCTION in a separate "screen" or section.

I like storing each object definition in a separate file, just to be tidy. It is easy to copy some files to the new folder where you are gonna start your new project rather than having to do hours of copy and paste skimming thru' a bunch of untidy files full of both code and declarations.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #16 on: February 17, 2003, 08:09:42 PM »

Qbasic cannot do OOP period. OOP isnt just having classes and methods, it also includes features such as inheritance, polymorphism, abstract classes, class and method protection, templates and more. When used effectively, OOP is a very powerful way of programming (very suitable for large groups engineering large projects). Of course not everything lends itself to OOP, which is why other forms of languages exist (structural, functional, etc).

C++ is a terrible hack as Na_th_an said, it has ambiguous syntax problems ( << operators cause problems), multiple inheritance can be a nightmare, its attempts to remain backward compatible with C have destroyed its potential as a good OO language (and it isnt even fully backward compatible either). Unfortunately it seems to have ammased quite a following in the software engineering world, although Java and some of the .NET languages are now challenging this.

C is as Toonski said the successor to the language B (written by Kerrigan) which was  the succesor to BCPL. B was a pretty terrible language and with the help of Dennis Richie, Bell labs produced the first C compiler which they used to reimplement UNIX portably.

Its not just the compiler that makes a language, but also the design. C was designed as a portable language that lends itself very well to system programming. Java was designed as a cross platform true OO language (and succeeds very well), QB is designed as a simple, fast language to learn. You wouldnt use QB or Java to write a hardware driver, nor would you use C to write an internet applet, regardless of the compiler. Language design is very important. Poor design is the reason languages such as PL/I dont exist anymore.
Logged

esus saves.... Passes to Moses, shoots, he scores!
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #17 on: February 18, 2003, 01:05:21 AM »

Reading loosecaboose is just music Smiley
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Hexadecimal Disaster
Been there, done that
*****
Posts: 1123



« Reply #18 on: February 18, 2003, 01:30:12 AM »

Agreed.

But, programming a business application in COBOL, who's a business oriented language (as you can read in the acronym), is still an annoying task.
Logged

img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
LooseCaboose
I hold this place together
*****
Posts: 981



« Reply #19 on: February 19, 2003, 08:08:55 PM »

Wow, cheers  guys. Now youve got me all embarrassed.  :oops:

Yeah COBOL and Fortran were both disgusting ugly languages, the former having the horid captials everywhere syntax (which basic unfortunately picked up). Interestingly enough, both languages  still have quite a following. You can even get object orrientated COBOL and Fortran if you really want to Shocked.

I think Java is a very nice language for bussiness applications, its much simpler than C/C++, excellent for software engineering in large groups and is highly web based (Companies can use applets, etc on intranets and global web pages). All this garbage about it being slow is unfounded, you can get JIT compilers if the VM issue bothers you that much and processors are getting sooo fast these days that bussiness application speed isnt even an issue anymore.

A good programmer learns which language is approiate for which task. I recently wrote a six line awk program (scripting language) for parsing data out of a UNIX syslog and creating a spreadsheet from it. I could have written it in bash, C or Java but it would have required far more effort for the same results.
Logged

esus saves.... Passes to Moses, shoots, he scores!
fox
New Member

Posts: 24


« Reply #20 on: May 24, 2009, 10:13:36 PM »

Ha ha ha this is just gold.

It's been about six years since I first posted this and so much has changed since then.

That's all, I have nothing to add :-)

Oh ... except that I ditched C++ in favour of C# - more for work than anything :-)

... time to fire up QBasic for a trip down memory lane, I think.
Logged
Ninkazu
Been there, done that
*****
Posts: 1169



WWW
« Reply #21 on: June 25, 2009, 09:24:03 PM »

C# is based on great technology, controlled by horrible people. I refuse to use it on the grounds of my belief in free (as in freedom) software. I worked for Microsoft, met Ballmer, and promptly started by boycott. The man is leading the world to an electronic prison.
Logged

am an asshole. Get used to it.
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!