Background
I am a hobbyist. I do not make money from my programs, though I have tried,
and failed, in the past.
I have had a Purebasic license for a few years but only in the last 4 months
or so have I really dived into it so I am by no means an expert and so some
of these observations may be totally wrong and I welcome anyone who knows
better to point them out.
And, as usual, your mileage may vary with Purebasic.
Platforms
Supports OSX, Windows and Linux. It does not cross compile, you have to
compile for a platform on that platform. You can directly access a
platform’s API. For example, on OSX, you can use the CocoaMessage command
to access Cocoa methods and objects. Note: it does not work for everything
in Cocoa.
There is a web based version, called SpiderBasic, but it has not been
updated in quite some time so I do not know if its still supported.
A new version, 6.0 is currently in beta that has better support for the
M1 processor.
The Language
Purebasic (PB) is not object oriented though it does have modules which allow you
to sort of emulate it. It does support pointers, structures, dictionaries, linked lists
and arrays.
Syntax is a bit weird… to access fields in a structure you would use
StructureVariableName()\fieldname. Variable types are declared using Define
and then appending the type to it… e.g. “Define.s var” to declare a
string. If you do not specify a datatype it defaults to integer unless you
have a “$” at the end of variable name, which makes it a string.
Variables do not have to be explicitly defined unless you specify
“EnableExplicit” at the top of your program, which I highly recommend.
There is direct support of linked lists. You use NewList to automatically
create a list of structures and then there are commands for navigating,
adding and deleting items. Dictionaries (maps in PB) have a similar setup.
GUI Support
PB supports a number of standard controls (gadgets in PB). Strangely,
dialog windows have to be created using XML to describe them. Its the only
way proper way (as I far as I can tell) to create modal windows though you
can simulate it through other ways.
As far as I know, PB does use native controls whenever possible. That being
said, it will take a considerable amount of effort to create a modern
looking GUI. The controls are basic and don’t offer a lot of extended
functionality without having to dive into your platform’s API.
It also has a canvas gadget, similar to Xojo, which allows you to create new
GUI elements.
The GUI builder is adequate, at best. It works and does the job but that’s
about all you can say about it.
PB also includes support for the Scintilla text editing control.
Database Support
PB supports SQLite, Postgres, MySQL and ODBC. They are all supported
through the same set of commands. However, each result set must have its
own database connection. Something to keep in mind if you are accessing a
database with limited licenses/connections.
I have not done a lot with databases yet.
Tools
The IDE is simple and fast. It loads so much quicker than Xojo. The GUI
builder, as said before, is adequate.
Integrated debugger is quite good and it includes a command line one as well.
Project Types
You can build command line tools, GUI apps, DLLs and dynamic libraries.
Final program size is extremely small. A simple hello world program in Xojo
can be around 15mb whereas in PB it is less than 5mb! Command line programs
are even smaller.
Comparison to Xojo
PB is much faster, includes support for database and command line programs
and costs only $99 and that’s a one time fee. You get all updates for life.
The IDE starts in seconds, not minutes like Xojo and its compiler is
blazingly fast. The current version compiles to ASM code but the new 6.0
version in beta uses a C backend to support more platforms. I have not noticed any
significant different in performance with the C backend.
However, its GUI support is not nearly as good as Xojo and based on the
amount of activity on its forum, the user base is either just not that
active or is smaller. A lot of the add-on libraries (modules in PB) and 3rd
party tools are quite old and not updated so that tells me maybe PB’s usage is
declining.
I would say Xojo is capable of building far more sophisticated programs
mainly because of better 3rd party and platform API support. There is nothing
like the MBS or Einhugur plugins available, but it depends on what exactly you
want to do with it.
Summary
PB is a lean, mean, programming language. Executables are extremely small
and fast. The IDE and GUI builder is written in PB so you know the language
is quite capable.
PB is owned by a small company, even smaller than Xojo, I think there are
only 1 or 2 developers working on it. But they also are not trying to bite
off more than they can chew and keep their focus pretty tight. Bugs are
fixed quickly and the forum has areas for reporting them.
You are not going to create sophisticated GUI programs but PB is great for
small to medium projects that don’t demand big GUIs. Its also excellent for
command line based projects.