Fred wrote:Compiler wise, I don't think we will add a tons a new stuffs, as PureBasic has been created to be a beginner friendly language, and that's our main target. I'm also using other languages (mainly C#) on daily basis, and while I like a lot of features of it (LINQ, Generics, Garbage Collector, Lamba, etc.) it's designed for professional coders. Doing a competitor of professional langage makes just no sense, who will actually buy it ? Professionals have C#, C++, Java, and it covers all the use cases.
BTW, we already added too much IMHO. Interfaces for example is a cool feature but it's bring complexity to the code and almost a different paradigm (a bit of OOP in PB). Indeed current compiler can still be improved here and here, and it will be done when I can squeeze back some more time to focus on it.
That's also why we are focusing on libraries, it's easier to jump on and off, and makes some valuable progress for everyone.
C# and Java are high-level "managed" languages with huge runtimes and unpredictable perfomance (tracing GC), they are not competitors to PB at all. The competitors are C and C++. However, the lack of crossplatform libraries, and their harder to learn syntaxes, puts them at a disadvantage for a many people.
So improving PB makes sense, as there is no good alternative in many situations.
I can think of several small and big things that can be done to the compiler:
- When doing UseModule and there are name conflicts, don't give an error. Simply don't import those names, and require use of the module prefix for that name only.
- Non-arithmetic shift
- Fix the broken boolean handling (Not, etc)
- Automated reference counting (not tracing GC), explicitly declared when declaring individual variables (or maybe better, declared on structures?).
- Templates (like c++), or even better, metaprogramming.
- Better code generation
- SIMD operators. Just double the normal operators (++ is simd addition, ** is simd multiplication, ...), and allow them on structured variables.
- ProcedureASM for assembly procedures without overhead, same calling convention on all platforms.
ARC and metaprogramming would be powerful improvements without changing the imperative and low-level programming model. OOP doesn't belong in PB, IMO. When people use Interfaces to simulate OOP, it sends shivers down my spine.
In the library department I have some ideas:
- Fixing the keyboard and mouse game libraries, so they don't skip keystrokes and clicks when done inbetween examine___() calls.
- Add a GadgetWeb library, that would work like the Gadget library, but over an https connection, with the ability to serve multiple web browser clients at once, of course.
- Automatic increase of size of Map.
- Integer-indexed sparse arrays (the difference from Map is that you can wedge an element, and all elements after it will be moved back, so when wedging an element at index 5, the old element at that position, is now at position 6, instead of being overwritten). Also, it should have fast indexing (like binary search tree). (This is done by letting the key in each tree node be a delta value instead of the actual value, so that when following the tree from the root node, and adding all delta values directly downwards to a node, the result is the key.)