Wishlist for PureBasic v4.xx - Overview

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

WHY IS PEOPLE GETTING SO OFFTOPIC LATELY? IS IT ALL MY FAULT? TELL ME, YOU TELL ME!
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

dagcrack wrote:WHY IS PEOPLE GETTING SO OFFTOPIC LATELY? IS IT ALL MY FAULT? TELL ME, YOU TELL ME!
Tssshh... They are deeply bored waiting for 4.0 :P
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

I CAN SEE QUADS ....


Image
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

haha:D
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

just modified the variable type list a little bit in the overview ... thanks for this to dr.dri ;) hope its ok for all...!?
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Wishlist for PureBasic v4.0 - Overview

Post by fsw »

If you look at my post:
viewtopic.php?t=15479&highlight=freebasic
you will see another small list.

Anyway, to my small list the following should be added:
profiling
unicode strings (and all functions for it...)
with... end with (somewhere I read Fred is working on this)
classes (well not the whole sheebang like in real oop languages, but at least the following):

Code: Select all

; build some classes...
Class MyClass1
   attribute1.l           ;properties should always be private, access only inside the class
   
   Method setAttribute1(value.l)
      *this\attribute1 = value   ; \ for accessing properties, like normal structures
   EndMethod
   
   Method.l getAttribute1()
      MethodReturn *this\attribute1
   EndMethod
EndClass

Class MyClass2 Extends MyClass1
   attribute2.l
   
   Method setAttribute2(value.l)
      *this\attribute2 = value
   EndMethod
   
   Method.l getAttribute2()
      MethodReturn *this\attribute2
   EndMethod
EndClass

; here starts the main code...
NewObject *obj.MyClass2

*obj->setAttribute1(1)  ; -> for accessing methods
*obj->setAttribute2(2)
Debug Str(*obj->getAttribute1()) + " / " + Str(*obj->getAttribute2())
*obj->destruct()  ; actually the destructor could be called automatically when app ends

End 
this would simplify the code, and make it more readdable.

I know there is didelphodon's precompiler and it seems to work great, but it's better if this functionality is inside the compiler.

BTW: IMHO all the other fancy OOP stuff is actually not needed because it overcomplicates things too much. Also no need for "design by contract" etc.
akee
Enthusiast
Enthusiast
Posts: 496
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

Re: Wishlist for PureBasic v4.0 - Overview

Post by akee »

Code: Select all

  var.b    ;  8 bits int
  var.w    ; 16 bits int
  var.l    ; 32 bits int
  var.q    ; 64 bits int
  
  var.ub   ;  8 bits unsigned int
  var.uw   ; 16 bits unsigned int
  var.ul   ; 32 bits unsigned int
  var.uq   ; 64 bits unsigned int
  
  var.f    ; 32 bits float
  var.d    ; 64 bits float 
  var.ld   ; 80 bit float (long double)   <--- for the huge scientific applications ;)
  
  var.s    ; ansi string  / character (maybe var.c !?)
  var.u    ; unicode string / character 
 
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

fsw, and Didelphodon,
no needed new words.
NewObject, Method and EndMethod is a surplus commands to do the stuff.
Objects are datatypes indeed. It is matter of the programmer to know and define what is a 'only data' structure and 'data & code' structure.
'Class' is Structure, and 'EndClass' is EndStructure. That's how i would do it at the moment if i was Fred. :)

Code: Select all

; build some classes... 
Structure MyClass1 
   attribute1.l           ;properties should always be private, access only inside the class 
    
   Procedure setAttribute1(value.l) 
      *this\attribute1 = value   ; \ for accessing properties, like normal structures 
   EndProcedure 
    
   Procedure.l getAttribute1() 
      ProcedureReturn *this\attribute1 
   EndProcedure 
EndStructure 

Structure MyClass2 Extends MyClass1 
   attribute2.l 
    
   Procedure setAttribute2(value.l) 
      *this\attribute2 = value 
   EndProcedure 
    
   Procedure.l getAttribute2() 
      ProcedureReturn *this\attribute2 
   EndProcedure 
EndStructure 

; here starts the main code... 
obj.MyClass2

obj\setAttribute1(1)  ; -> for accessing methods 
obj\setAttribute2(2) 
Debug Str(obj\getAttribute1()) + " / " + Str(obj\getAttribute2()) 
End
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@fsw:
seems to me like in latest blitz on pc...

@Psychophanta:
Let us wait if someone else is replying to the discused ways ;-) Maybe Fred, may tell us something to this? (Fred? :-)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Crosscompiling: Compiling Linux executables on Windows(so I just need to run my emulator when I wanna try it out).
bye,
Daniel
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

DarkDragon wrote:Crosscompiling: Compiling Linux executables on Windows(so I just need to run my emulator when I wanna try it out).
This was already promised to be in version 4.0, via recent interview. Look at the interview thread found @ viewtopic.php?t=17324&highlight=interview and my reply. There is to be crossplatform compiling in 4.0. As stated in the interview, it's already there ... but unfortunately, it's not enabled for us users yet.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

but guys, please dont talk about a wishlist for v4.0 anymore, its more a wishlist for v4.x

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

When 4.0 will have most libriaries thread safe one (String doesn't count^^) Would be the coolest to be Thread safe, that is network it would be ideal to be able to listen with one thread per connection maybe something like thsi

Code: Select all

Procedure MyListener(ConnectionId.l)
Protected End.l
Repeat
  Select Dataavailable(ConnectionID.l)
  Case 2
   ;Receive it
  Case 0
   delay(1)
  Case 4
   End.l=1
   ;Kill this Thread
  Endselect
Until End.l=1
Endprocedure


InitNetwork()
Id.l=StartServer(#PB_Any,Port.l)

NetEvent.l=NetworkServerEvent(Id.l) ; We want to be able to use more than one server a time
Select NetEvent.l
Case 0
 Delay(1)
Case 1
 Creathread(MyListener(),NetworkclientID()
EndSelect
Maybe there are better ways to do it but you get the point. It also would
allow the old system but with the ability to Thread like in other languages.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Re: Wishlist for PureBasic v4.0 - Overview

Post by Tranquil »

akee wrote:

Code: Select all

  var.b    ;  8 bits int
  var.w    ; 16 bits int
  var.l    ; 32 bits int
  var.q    ; 64 bits int
  
  var.ub   ;  8 bits unsigned int
  var.uw   ; 16 bits unsigned int
  var.ul   ; 32 bits unsigned int
  var.uq   ; 64 bits unsigned int
  
  var.f    ; 32 bits float
  var.d    ; 64 bits float 
  var.ld   ; 80 bit float (long double)   <--- for the huge scientific applications ;)
  
  var.s    ; ansi string  / character (maybe var.c !?)
  var.u    ; unicode string / character 
 
:lol: YES! Thats the way - oho oho - I LIKE IT! oho oho...
Tranquil
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

What do you think about descripted idea for next version (maybe for v4 too!?) Would be very nice...

Code: Select all

OpenScreen(lWidth, lHeight, lDepth, cTitle$, [#Flags])

Possible Flags:
  #PB_DoubleBuffering
  #PB_TribleBuffering
  #PB_AlphaBlending
  #PB_CopyBuffer
  #PB_AntiAliasing
  #PB_AntiAliasing2
  #PB_AntiAliasing3
  #PB_AntiAliasing4
  #PB_Software
A command for using any kind of ColorFilters (R,G,B,A) for any 2D / 3D Sprites...!!! having only one original colored sprite and change its R,G,B,A values and display it in this colors... so you can draw one sprite object in different colors x times at once to the screen!

Code: Select all

SpriteColorFilter(#Sprite,RGBA($00,$00,$FF,$FF))   ; for example... This would be very very helpfull for a lot of cheating stuff...
Last edited by va!n on Tue Nov 22, 2005 7:42 pm, edited 1 time in total.
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Post Reply