The Fanta-C idea
Posted: Wed Feb 09, 2022 3:02 am
When people posted a thread about a name change for PureBasic, I had the idea of Fanta-C. Because it's C from Fantaisie Software.
I want to elaborate on it. Fred, I think you should seriously consider making a C-like derivative of PureBasic using the C backend (or just make the C backend version itself like this). Your user-base is likely limited by Basic. PB is an advanced language, but anyone who programs in modern languages like JS, C#, and Java would likely completely disregard PB. Who thinks to go back to something "basic" after they've been using those languages?
So my point is that the new version of PB should have a more C-like syntax. All the commands and libraries remain the same. The niceties of PB should stay, like for example:
1. x + 1 instead of x++
2. single '=' used in if statements
3. no semicolons
4. for loops still work like basic EX:
5. procedural
6. consistency - none of why is that done in that case, but not now EX:
or
... but none of this:
brackets are always used.
So the changes would be:
{ } brackets used everywhere instead of all the different variations of 'end'.
String elements accessible like an array [ ] - less need for the Mid().
Maybe add ( ) after if statements to be more consistent.
Maybe using square brackets [ ] instead of the { } would be nicer (but obviously less like C). It's annoying to shift and make a '{'
Consistency would be key. Do away with all those quirks of C. It may even end up making the C backend compiler simpler cause it's more similar to C.
The Go language is becoming more popular recently and it's "sort of" like what Fanta-C could be like. When I switch back to writing PB code, I do enjoy it, but it does feel a bit cumbersome using those longer 'ends'.
I want to elaborate on it. Fred, I think you should seriously consider making a C-like derivative of PureBasic using the C backend (or just make the C backend version itself like this). Your user-base is likely limited by Basic. PB is an advanced language, but anyone who programs in modern languages like JS, C#, and Java would likely completely disregard PB. Who thinks to go back to something "basic" after they've been using those languages?
So my point is that the new version of PB should have a more C-like syntax. All the commands and libraries remain the same. The niceties of PB should stay, like for example:
1. x + 1 instead of x++
2. single '=' used in if statements
3. no semicolons
4. for loops still work like basic EX:
Code: Select all
For (x = 0 To 10)
{
}
6. consistency - none of why is that done in that case, but not now EX:
Code: Select all
If (x = 10) {x = 0}
Code: Select all
If (x = 10)
{
x = 0
}
Code: Select all
If (x = 10)
x = 0
So the changes would be:
{ } brackets used everywhere instead of all the different variations of 'end'.
String elements accessible like an array [ ] - less need for the Mid().
Maybe add ( ) after if statements to be more consistent.
Maybe using square brackets [ ] instead of the { } would be nicer (but obviously less like C). It's annoying to shift and make a '{'
Consistency would be key. Do away with all those quirks of C. It may even end up making the C backend compiler simpler cause it's more similar to C.
The Go language is becoming more popular recently and it's "sort of" like what Fanta-C could be like. When I switch back to writing PB code, I do enjoy it, but it does feel a bit cumbersome using those longer 'ends'.