GLBasic forum

Main forum => GLBasic - en => Topic started by: Quentin on 2009-Nov-21

Poll
Question: What do you think about implementing OO features in GLBasic?
Option 1: Yes, I love OO. Give us objects! votes: 12
Option 2: Nice idea, but I don't need it to survive votes: 9
Option 3: What is OO? votes: 0
Option 4: I still prefer procedural programming style votes: 3
Option 5: I don't want OO. Go away with it! votes: 6
Title: Poll: Object orientated capabilities of GLBasic
Post by: Quentin on 2009-Nov-21
As many of you know, the TYPEs of GLBasic internally are converted to C++ - classes. With the new PROTOTYPE command now we're able also to implement something like methods within TYPE structures. The way to do it seems a little bit circuitous, but for sure this is one step closer to Object Orientated programming.

I don't think, that OO will make better programmers of us, but especially for larger projects many things are easier to handle.

Now I want to know, what you think about it. Your vote will help Gernot to decide, if he should spend some thoughts about it or not :)
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: doimus on 2009-Nov-21
Methods (member functions) inside types (classes) would be excellent!
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Schranz0r on 2009-Nov-21
OO-P WTF!  :enc:
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Moru on 2009-Nov-21
What is needed is installation on all (resonable) versions of linux without anthing extra needed to be added.
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: D2O on 2009-Nov-21
Ja, ansich nicht schlecht.
Es sollte aber GLB nicht zu arg Verkomplizieren.

Ansonsten, Functionen/Methoden in einem Type direkt zu erstellen wäre schon eine Coole sache :)
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: MrTAToad on 2009-Nov-21
It would be nice - especially functions in TYPES.  However, I dont think its the most important thing to have in the short-term - I would prefer to see upgraded compilers myself.
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: bigsofty on 2009-Nov-21
I afraid I'm with Carmak with this one, I don't like OOP. One of the main things I like about GLBasic is that it IS NOT OOP.

I am a C# programmer but go home to relax with GLB and its simplicity. Easier for beginners, simple to pick up and no need to wade though piles of child parent OOP polymorphic inheritance definitions to read other peoples code.

I also believe this is what has killed the Blitz3D community, yes, OOP, when it was introduced with BlitzMax immediately the community got fragmented, one side OOP, the non-OOP... most of the original Blitz 3D community walked and learned C++, because it was just as complex as BlitzMax and a lot faster and also C++ was a very well supported mainstream language.

GLBasic is not a professional language and god forbid it ever should be, its easy to program, easy to debug and easy to learn... adding OOP would make the learning curve much higher and the impulse buyers much lower.

Yes, you can have both OOP and non-OOP... BlitzMax tried it, again, the final result was to fragment the community and people just left.

OK, that's my 10P. All my own IMHO of course.  :P
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Schranz0r on 2009-Nov-21
you dont have to use OOP...
It's just a "If you use it, then use it!"
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Quentin on 2009-Nov-21
You maybe right, but I think there are many other reasons that Blitz is going down (if it is so, I'm not really sure about that)

I think the main reasons are
- Blitz3D is not developed any further
- BlitzMax has no 3D capabilities
- the 3D library for BlitzMax was not as it was expected by the community
- too much versions to choose from (Max, 3D, Basic, Plus)

IMHO it's never a fault to offer more possibilities to write your programs. OOP is only one way, not the best in all cases, but often very nifty, if you really have internalized the concept of OO.
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Hemlos on 2009-Nov-21
Quote from: Schranz0r on 2009-Nov-21
you dont have to use OOP...
It's just a "If you use it, then use it!"

Hmm, i agree with softy here.
Not to forget to mention, Gernot is only one man...he does have a home life too you know.
The community splits into TYPES pun pun.
This would double his workload and further fragment the G time by focusing on 2 styles within one ide, as the focus moves toward style instead of functionality alone.
Also, I imagine the overall online forums support would shrink, time wise.

Vote: no

Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Ian Price on 2009-Nov-21
I use a little bit of OO with BlitzMax (Which DOES have 3D capabilities, but it's not very well supported), although to be fair I can live without it. It's just another tool to help get a job done.
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Quentin on 2009-Nov-21
Hemlos, I don't agree with this.
The GLBasic community already has several directions (Wiz, Windows, Mac, Linux, IPhone). But did that divide us? I don't think so. I really love this comm as the main intention of most members is to help each other and not to bash something or someone as  many of us had experienced in other forums.

You're right. Developing of GLBasic is a one-man-show, but you know how fast new things are implemented many times. Also remember that is isn't necessary to change a compiler. It's already there and must not be changed for this :)
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Hemlos on 2009-Nov-21
Was just being compasionate with his time.
If its not a big deal to implement, by all means.
I like having more options, makes solutions come faster.

Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Kitty Hello on 2009-Nov-23
I'm totally against it :P

The problem from my point of view is, that once you start that, people want more and more. They start with functions in TYPES, and end with generics and inheritance and all the stuff. And it's too complicated for me to implement. That's the true fact. If you knew how crappy my precompiler actually is (even though I rewrote it from scratch with boost::spirit), it's always a fight to implement new things, because most times other things break and such. It's just that GLB is not my full time job and my time is too limited.
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Quentin on 2009-Nov-23
that's a pity :(
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: freshworks on 2009-Nov-23
But as i mention last, wouldn't it be nice to if it is possible, to call/set properties of prototypes in the functions/methods with THIS.x = and THIS.y = etc...

So then you can write functions/methods within a prototype and set the properties of it with THIS. so no need to pass the whole prototype anymore. Only thing / problem probaly would be that you need  a pointer to an object, how are you gonna handle that gernot  :P

cheers,
Jespar
Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: Hemlos on 2009-Nov-23
Quote from: freshworks on 2009-Nov-23
Only thing / problem probaly would be that you need  a pointer to an object, how are you gonna handle that gernot  :P

cheers,
Jespar

PROTOYPE GLBasic_Developer2.0: Kitty_Hello( Object="Clone" , His.Family.Wouldnt.Know , Duplicate("Kitty_Hello") )




Title: Re: Poll: Object orientated capabilities of GLBasic
Post by: FutureCow on 2009-Nov-24
I'm REALLY glad Gernot is against it, as other people have said one thing I love about GLBasic is that is ISN'T OOP. I don't code for a career and OOP is a mindset that you have to constantly work in to be comfortable in it - as a non-career programmer I am not in that mindset. Yes there are times when OOP excels, but for most of the time for the scale of projects I think most people are working in here, procedural will do just fine.
Procedural coding is also easy for everyone to understand, beginners and experts alike. Introduce OOP and you'll see people wanting help on the forums getting confused when others send them back an answer that's in OO format that's a lot more complex than its procedural counterpart.

Let's keep the basic in GLBasic.