Page 4 of 8

Posted: Fri Feb 09, 2007 12:55 pm
by Hroudtwolf
ffs, just learn Purebasic as it is first:

http://www.purebasic.fr/english/viewtopic.php?t=19416
Just learn to read.
Look at the links here in this thread ;-)

The most of the classes there are my products ;-)

Posted: Fri Feb 09, 2007 12:58 pm
by johnfinch
So, where can people who are interested in an optional OOP extension to PB help?

Posted: Fri Feb 09, 2007 1:00 pm
by Kale
hellhound66 wrote:@kale: Wolf is in a project that codes OOP in PB and we have got about 15000 lines of code. I think he knows all variants of programming OOP in PB. And none is really good.
Use another language then ffs! You obviously take no notice of past threads where this has been brought up time after time. OOP in PB is not going to happen soon.

Only an idiot would use a language not suitable for his programming project!

Posted: Fri Feb 09, 2007 1:03 pm
by hellhound66
And there we have the second troll: Kale.

/edit: He is sillier than 3 irishmen.

Posted: Fri Feb 09, 2007 1:07 pm
by Hroudtwolf
@Kale an Brice

I don't know what is pricking you.
The only you do here is trolling against our wish for a OOP support in PB.
Do ya get money for it ?

Please, accept our wish.
You are not impaired because of that.

Posted: Fri Feb 09, 2007 1:33 pm
by Character
Brice Manuel wrote:In spite of everything, PB is in good hands. Fred has made it clear where he stands on the OOP issue, so we should respect his decision. Fred is a smart guy and knows where he wants to go with PB. We should trust him enough to let him do what he thinks is right for PB and the community.
You're right. Wise words.

Posted: Fri Feb 09, 2007 1:39 pm
by Hroudtwolf
We should trust him enough to let him do what he thinks is right for PB and the community.
...and all the other people are stupid?

Posted: Fri Feb 09, 2007 1:46 pm
by PB
>> We should trust him enough to let him do what he thinks is right for PB and the community
>
> ...and all the other people are stupid?

No, but they aren't in charge of PureBasic's future, no matter what they wish.
Just because Fred is open to suggestions doesn't mean he is going to act on
all of them. And OOP is one suggestion that he has said on MANY occasions is
NOT going to be part of PureBasic. People need to accept this and get over it.
Repetitive requests and topic bumps isn't going to do anything except waste
forum bandwidth.

Posted: Fri Feb 09, 2007 1:56 pm
by Guimauve
I like PB because it's possible to built program with BOP (Based Object
Programming) style.

Exemple :

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Structure declaration <<<<<

Structure Vector3

   Coords.d[3] ; i,j,k

EndStructure

; <<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The mutators <<<<<

Macro SetVector3Coords(VectorA, Index, P_Coords)

   VectorA\Coords[Index] = P_Coords

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The observators <<<<<

Macro GetVector3Coords(VectorA, Index)

   VectorA\Coords[Index]

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Update Static array operator <<<<<

Macro UpdateVector3Coords(VectorA, P_i, P_j, P_k)

   SetVector3Coords(VectorA, 0, P_i)
   SetVector3Coords(VectorA, 1, P_j)
   SetVector3Coords(VectorA, 2, P_k)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The specials mutators <<<<<

Macro SetVector3i(VectorA, P_i)

   SetVector3Coords(VectorA, 0, P_i)

EndMacro

Macro SetVector3j(VectorA, P_j)

   SetVector3Coords(VectorA, 1, P_j)

EndMacro

Macro SetVector3k(VectorA, P_k)

   SetVector3Coords(VectorA, 2, P_k)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The specials observators <<<<<

Macro GetVector3i(VectorA)

   GetVector3Coords(VectorA, 0)

EndMacro

Macro GetVector3j(VectorA)

   GetVector3Coords(VectorA, 1)

EndMacro

Macro GetVector3k(VectorA)

   GetVector3Coords(VectorA, 2)

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Equal operator : A = B <<<<<

Macro EqualVector3(VectorA, VectorB)

   For Index = 0 To 2
      SetVector3Coords(VectorA, Index, GetVector3Coords(VectorB, Index))
   Next

   ; CopyMemory(VectorB, VectorA, SizeOf(Vector3))

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Plus operator : R = A + B <<<<<

Macro PlusVector3(VectorR, VectorA, VectorB)

   For Index = 0 To 2
      SetVector3Coords(VectorR, Index, GetVector3Coords(VectorA, Index) + GetVector3Coords(VectorB, Index))
   Next

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Minus operator : R = A - B <<<<<

Macro MinusVector3(VectorR, VectorA, VectorB)

   For Index = 0 To 2
      SetVector3Coords(VectorR, Index, GetVector3Coords(VectorA, Index) - GetVector3Coords(VectorB, Index))
   Next

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Zero operator <<<<<

Macro ZeroVector3(VectorA)

   For Index = 0 To 2
      SetVector3Coords(VectorA, Index, 0)
   Next

   ; RtlZeroMemory_(VectorA, SizeOf(Vector3))

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The ProductByScalar operator : R = A * Scalar <<<<<

Macro ProductByScalarVector3(VectorR, VectorA, Scalar)

   For Index = 0 To 2
      SetVector3Coords(VectorR, Index, GetVector3Coords(VectorA, Index) * Scalar)
   Next

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The DivideByScalar operator : R = A / Scalar <<<<<

Macro DivideByScalarVector3(VectorR, VectorA, Scalar)

   For Index = 0 To 2
      SetVector3Coords(VectorR, Index, GetVector3Coords(VectorA, Index) / Scalar)
   Next

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Read binary file operator <<<<<

Procedure ReadVector3(FileID.l, *VectorA.Vector3)

   For Index = 0 To 2
      SetVector3Coords(*VectorA, Index, ReadDouble(FileID))
   Next

EndProcedure

; Macro ReadVector3(FileID, VectorA)
   ; ReadData(FileID, VectorA, SizeOf(Vector3))
; EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Write binary file operator <<<<<

Procedure WriteVector3(FileID.l, *VectorA.Vector3)

   For Index = 0 To 2
      WriteDouble(FileID, GetVector3Coords(*VectorA, Index))
   Next

EndProcedure

; Macro WriteVector3(FileID, VectorA)
   ; WriteData(FileID, VectorA, SizeOf(Vector3))
; EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Read dynamic array on current file <<<<<

Procedure ReadDynamicArrayOfVector3(FileID.l, Array.Vector3(1))

   Array_Max.l = ReadLong(FileID)

   For Index = 0 to Array_Max
      ReadVector3(FileID, Array(Index))
   Next

EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Write dynamic array on current file <<<<<

Procedure WriteDynamicArrayOfVector3(FileID.l, Array.Vector3(1))

   WriteLong(FileID, (PeekL(@Array() - 8) - 1))

   For Index = 0 to (PeekL(@Array() - 8) - 1)
      WriteVector3(FileID, Array(Index))
   Next

EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Read linked list on current file <<<<<

Procedure ReadLinkedListOfVector3(FileID.l, LList.Vector3())

   LList_Max.l = ReadLong(FileID)

   For Index = 0 to LList_Max - 1
      AddElement(LList())
      ReadVector3(FileID, LList())
   Next

EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Write linked list on current file <<<<<

Procedure WriteLinkedListOfVector3(FileID.l, LList.Vector3())

   WriteLong(FileID, CountList(LList()))

   ForEach LList()
      WriteVector3(FileID, LList())
   Next

EndProcedure

; <<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Debugging macro <<<<<

Macro DebugVector3(VectorA)

   For Index = 0 To 2
      Debug GetVector3Coords(VectorA, Index)
   Next

EndMacro

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.078 seconds <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Personnally, I don't understand why some PB user ask for OOP feature.

If you don't like PB as is, so just don't use it. If you want to built your
program with OO style, use the free C++ Code::Blocks IDE with a free
C++ compiler such as Mingw32 and built your program if you think OOP
it's better and if everything else it's for bad programmer.

Regards
Guimauve

Posted: Fri Feb 09, 2007 2:08 pm
by Hroudtwolf
If you don't like PB as is, so just don't use it.
That's naive.
PureBasic grews by the help of the community.
Many bugreports, proposals and also the money we spend for PureBasic helped PureBasic to grow.
And now, a big part of the community wishs to have a new feature.
That's totally legitimate.

I love PureBasic and its simplicity. And 'cause I love PureBasic, I want to develop in PB further.
But without OOP haves PB and myself no future.

Posted: Fri Feb 09, 2007 2:19 pm
by PB
> a big part of the community wishs to have a new feature

I wonder how big, really? Maybe a poll should be started.

Anyway, my feeling is that we paid for PureBasic because we liked it when
we bought it. We were happy to buy a non-OOP language. We all knew it
was non-OOP. So why the need to change it now? Isn't that like ordering
a steak at a restaurant and eating half and then demanding that the chef
give you a lobster instead, because you prefer lobster? Especially when
the chef has constantly said he doesn't cook lobster and never will? ;)
I say go to a different restaurant where they cook the food you like.

Posted: Fri Feb 09, 2007 2:23 pm
by Hroudtwolf
> a big part of the community wishs to have a new feature

I wonder how big, really? Maybe a poll should be started.
Yes. This part is big.
Look around the OOP posts here in the forums.
Look to the german community, there are many OOP programmers.

Yes, we should start a poll.
Especially when
the chef has constantly said he doesn't cook lobster and never will? Wink
I say go to a different restaurant where they cook the food you like.
Its everytime allowed to ask/to have a wish. ;-)

Posted: Fri Feb 09, 2007 2:26 pm
by hellhound66
@Guimauve:
What's with this code meant? It's generated really fast. Cool. I don't care. For me it's important, that the code runs fast. Anyway, what was your intention to post your code?

@Myself:
My summary:
- There are several people who wants OOP in PB. The others who don't want it, start a flame war on "we want native OOP in PB"-threads.
- The generated code of PB is relatively slow.
- I don't think the compiler isn't well programmed. I come to this conclusion due to some weird answers of Fred.
- I don't like many of the community. They think they are so divine.
- I'm in enough to switch over to C++.

Good bye, community :D

@wolf:
Tut mir leid, aber ich bins langsam leid. Mir gehen die rumfrotzelnden Typen wirklich auf den Sack. Ich hab keinen Bock mehr irgendwas in PB zu machen, immer zu kämpfen, dass aus PB mal ne nützliche Sprache wird. Wir reden im Forum.

Posted: Fri Feb 09, 2007 2:35 pm
by r_hyde
There are some simple OOP constructs that could be added to PB without making it a fully-blown OOP language, which would simplify certain programming tasks. For instance, the ability to (easily, natively) define "classes" which encapsulate data and methods would enhance the language without adding undue complexity. This is possible in the language presently, but the constructs required to allow a "natural" syntax to use these objects is overly complex and not very PB-ish IMO; certainly not something for the inexperienced to play with.

I agree with those who have said that if PB doesn't suit your needs you should probably look elsewhere, but that really only answers the question of what to do if you have a project which PB doesn't suit now. Some of us like to imagine possibilities in the future of PB that will allow us to do the kind of programming we want to do with a language we really, really enjoy. There can't be anything wrong with that. The fact that Fred has remained adamant thus far on not implementing OOP doesn't mean that the subject must be taboo for all eternity - there should always be room at the table for collegial discussion of the pros and cons of new language features. How else are we to expect Fred to be well-informed of his users' wishes? In case nobody has noticed, PureBasic is a commercial product, and all such products are, in varying degrees, focused on customer satisfaction and driven by customer feedback.

I think this discussion on OOP should remain open and active, and anyone who has only "Fred said no" to say about it should maybe refrain from hitting the submit button. We're not taking anything away from PB, and you're not adding anything to the discussion.

I don't need OOP for any project I'm currently working on; I get by OK without it. But I suspect that certain OOP-like features (if not full-blown OOP), if implemented well and made easy to use, would probably increase my productivity and enjoyment while working in PB. I'm sure Hroudtwolf and others feel much the same way. That is all.

Posted: Fri Feb 09, 2007 2:37 pm
by Kale
hellhound66 wrote:And there we have the second troll: Kale.

/edit: He is sillier than 3 irishmen.
Or one German! :roll: