PureBasic suggestions, etc. PureBasic is great!
Posted: Sat Apr 03, 2004 1:38 am
Firstly let me say, I think PureBasic is great!
I'd like to propose the following list of enhancements which, in my humble opinion, would make it even better.
I'm new to PB, so some of these might already be in the product and I just missed it, there might be valid reasons for them being the way they are, etc. Some of these suggestions I've already made a post before on or were suggestions made by others, this is just my current "hot" list. Each new suggestion is denoted by a "***".
*** Modal windows - Allow windows to be shown in a Modal mode: only 1 window in this specific application can accept user input. No impact on other applications currently running.
*** Structure field references: Allow structure fields to be referenced using a '.' instead of '/'.
e.g. MyStructure(10).myfield = 100, instead of MyStructure(10)\myfield = 100.
*** New PB Constant How about a standard PB constant of #PB_PATHDELIM ?
I try to only write code that is cross-platform. If I ever need to build a file path string, then I could use this PB constant and not have to worry about which platform I'm compiling on.
For example,
On Linux -
#PB_PATHDELIM = "/"
On Windows -
#PB_PATHDELIM = "\"
On OS X -
#PB_PATHDELIM = "/" (MacOS 8 & 9 used ":", OS X allows both)
On Amiga -
#PB_PATHDELIM = "/" (is this correct?)
But in code we just use #PB_PATHDELIM, and so it would be correct for whichever platform we're compiling on:
MyPathString = "HOME" + #PB_PATHDELIM + "BACKUP" + #PB_PATHDELIM + MyFileName
*** Enhance all Window... functions to accept the WindowID as a parameter (optionally?). Several Window functions use the UseWindow() function, then you can call other functions such as WindowWidth(), WindowHeight(), WindowOutput(), etc. It would be nice if I could pass the WindowID to all those functions, instead of having to call UseWindow() first.
e.g. WindowHeight(#myWindow)
Please also apply this to all other PB functions that have similar type requirement, this will make code cleared. Passing in parameters to these type of functions could be made optional to ease transition and no break old code.
*** NOT keyword. Add the NOT keyword for use in boolean expressions.
e.g. If NOT (A > B)
*** Dynamic-length strings - with no 64K limit, only limited by system memory.
*** Dynamic arrays - REDIM or DIM without destroying an existing array's data would be VERY nice! Along with UBOUND.
*** Packer library to allow the use ZIP algorithm / new SetPackAlgorithm function -
I know the current packer algorithm is superior to the zip algorithm but it would be handier to be able to pack data in the zip format AND it would also be easier for you to support the zip packer lib on all platforms since it's so widely available. I'd like to propose to change the packer algorithm to also allow the use of the ZIP algorithm and make the Packer library cross-platform.
zLib is free! http://www.gzip.org/zlib/
Plus, the produced files can then be unpacked by non-PB based apps.
Perhaps just a new SetPackAlgorithm(x) function with the default being the existing JCalG1 algorithm. But SetPackAlgorithm(x) could be used to set to use other algorithms, like ZIP. Since JCalG1 is only on windows, then Linux could use the Packer library using ZIP.
SetPackAlgorithm(0) = JCalG1 (the default anyways to as not to break existing code.
SetPackAlgorithm(1) = ZIP (then all Packer library functions would use the ZIP algorithm)
*** Cross-platform Grid/Table Gadget, Date and Time pickers, all supported by Visual Designer.
*** IDE: When exiting the IDE and if there were changes to the source code, the confirmation box should say "Save before continuing?" or the whole message could be simplified to just say "Save changes to (filename) ?" "Save before continue?" is not quite proper English.
*** SmartUpdate: In a couple message boxes, the word "available" is mis-spelled as "avaiable".
*** Continued emphasis on cross-platform development and limit the number of platform-specific features. Cross-platform is the rage these days and will make PureBasic even more popular (especially with the addition of OS X!). No limits on API access, however.
Overall, You've done some terrific work on PureBasic Fred, et al, please keep up the great work! I'm very excited about the OS X version of PB!
Thanks!
I'd like to propose the following list of enhancements which, in my humble opinion, would make it even better.
I'm new to PB, so some of these might already be in the product and I just missed it, there might be valid reasons for them being the way they are, etc. Some of these suggestions I've already made a post before on or were suggestions made by others, this is just my current "hot" list. Each new suggestion is denoted by a "***".
*** Modal windows - Allow windows to be shown in a Modal mode: only 1 window in this specific application can accept user input. No impact on other applications currently running.
*** Structure field references: Allow structure fields to be referenced using a '.' instead of '/'.
e.g. MyStructure(10).myfield = 100, instead of MyStructure(10)\myfield = 100.
*** New PB Constant How about a standard PB constant of #PB_PATHDELIM ?
I try to only write code that is cross-platform. If I ever need to build a file path string, then I could use this PB constant and not have to worry about which platform I'm compiling on.
For example,
On Linux -
#PB_PATHDELIM = "/"
On Windows -
#PB_PATHDELIM = "\"
On OS X -
#PB_PATHDELIM = "/" (MacOS 8 & 9 used ":", OS X allows both)
On Amiga -
#PB_PATHDELIM = "/" (is this correct?)
But in code we just use #PB_PATHDELIM, and so it would be correct for whichever platform we're compiling on:
MyPathString = "HOME" + #PB_PATHDELIM + "BACKUP" + #PB_PATHDELIM + MyFileName
*** Enhance all Window... functions to accept the WindowID as a parameter (optionally?). Several Window functions use the UseWindow() function, then you can call other functions such as WindowWidth(), WindowHeight(), WindowOutput(), etc. It would be nice if I could pass the WindowID to all those functions, instead of having to call UseWindow() first.
e.g. WindowHeight(#myWindow)
Please also apply this to all other PB functions that have similar type requirement, this will make code cleared. Passing in parameters to these type of functions could be made optional to ease transition and no break old code.
*** NOT keyword. Add the NOT keyword for use in boolean expressions.
e.g. If NOT (A > B)
*** Dynamic-length strings - with no 64K limit, only limited by system memory.
*** Dynamic arrays - REDIM or DIM without destroying an existing array's data would be VERY nice! Along with UBOUND.
*** Packer library to allow the use ZIP algorithm / new SetPackAlgorithm function -
I know the current packer algorithm is superior to the zip algorithm but it would be handier to be able to pack data in the zip format AND it would also be easier for you to support the zip packer lib on all platforms since it's so widely available. I'd like to propose to change the packer algorithm to also allow the use of the ZIP algorithm and make the Packer library cross-platform.
zLib is free! http://www.gzip.org/zlib/
Plus, the produced files can then be unpacked by non-PB based apps.
Perhaps just a new SetPackAlgorithm(x) function with the default being the existing JCalG1 algorithm. But SetPackAlgorithm(x) could be used to set to use other algorithms, like ZIP. Since JCalG1 is only on windows, then Linux could use the Packer library using ZIP.
SetPackAlgorithm(0) = JCalG1 (the default anyways to as not to break existing code.
SetPackAlgorithm(1) = ZIP (then all Packer library functions would use the ZIP algorithm)
*** Cross-platform Grid/Table Gadget, Date and Time pickers, all supported by Visual Designer.
*** IDE: When exiting the IDE and if there were changes to the source code, the confirmation box should say "Save before continuing?" or the whole message could be simplified to just say "Save changes to (filename) ?" "Save before continue?" is not quite proper English.
*** SmartUpdate: In a couple message boxes, the word "available" is mis-spelled as "avaiable".
*** Continued emphasis on cross-platform development and limit the number of platform-specific features. Cross-platform is the rage these days and will make PureBasic even more popular (especially with the addition of OS X!). No limits on API access, however.
Overall, You've done some terrific work on PureBasic Fred, et al, please keep up the great work! I'm very excited about the OS X version of PB!
Thanks!