Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
kinda wondering, would it really be needed
#11
(06-29-2025, 01:43 PM)Jack Wrote: just my opinion, aside from the += or whatever op= brevity, it's performance efficiency is probably negligible
I've only been programming in BASIC since 1982 or so, my experience with the language may be limited, but as far as I can remember, BASIC has always used the notation x=x{operator}{value} and it has never bothered me one bit, even after being introduced to C.
Here is the BASIC versus C notation:

x=x+1
x+=1
x++

If saving myself typing 2 or 3 characters more was that important to me, I would be programming in C and not BASIC. But apparently I _like_ BASIC, and its clunky notation, but more importantly, I don't see the benefits to introducing C syntax to the language, as it would confuse people, and make the language itself less BASIC-like.

Maybe if the IDE were "smart" and you could select an option "enable C type variable assignment" where if toggled, the IDE then automatically finds any assignment statements and rewrites them in the chosen format (BASIC or C), then people could choose the format to their liking.
But I think that functionality would be a lot of work for the QB64PE developers, which could be better used for more higher priority improvements.

Just my opinion!
Reply
#12
(06-29-2025, 01:43 PM)Jack Wrote: just my opinion, aside from the += or whatever op= brevity, it's performance efficiency is probably negligible

Agreed.

At the time C was created, computers were much less capable than the ones we take for granted now.  The original C compiler was a small, simple thing that performed few optimizations.

The designers of C included shorthand operators like <op>=, ++, and -- so that programmers could fine-tune their programs by hand.

Modern compilers, which are quite good at optimization, have pretty much made such shorthands obsolete.

Some of us still use them of course, because they're fun.

IMO Basic should stay Basic and let the compiler do the work.  Add too many features from other languages and you run the risk of creating the next COMAL (shudder).
Reply
#13
What was COMAL like?

Reading about it, it sounds a lot like QuickBasic, with support for longer variable names, procedures, and IF / END IF & other structured programming features that allow us to write more readable code, and get away from using GOTO and spaghetti code. If you ask me, that was a good thing :-)
Reply
#14
From what I can tell, COMAL appears to be a BASIC Pascal hybrid - though that’s just my initial impression. I haven’t had a chance to play with it yet. There seems to be an updated version that runs on *nix platforms here: https://github.com/poldy/OpenCOMAL
Reply
#15
(07-01-2025, 03:08 AM)a740g Wrote: From what I can tell, COMAL appears to be a BASIC Pascal hybrid - though that’s just my initial impression. I haven’t had a chance to play with it yet. There seems to be an updated version that runs on *nix platforms here: https://github.com/poldy/OpenCOMAL
Børge R. Christensen developed it based on BASIC, adding the structured programming features of Pascal, so his computer science students wouldn't write spaghetti code. And those features that set COMAL apart from standard BASIC with line numbers and GOTO statements are exactly what QuickBasic and its descendents VB6, VBA, VBScript, QB64 and QB64PE use. After 35 years of using structured programming features, it can be a shock to go back to the old 8-bit BASIC programs with all GOTOs and line numbers! I don't mind basic OOP (when it doesn't get too crazy, what with polymorphism and all those crazy abstractions & design patterns) but I can live without it. The structural programming features however I would miss.

I read that a big reason Christensen decided to create COMAL, and not just use Pascal as the language to teach comp sci with, was that he wanted to retain the realtime command line (the interactive shell) that BASIC had. That's one thing that Python retains (if you use the Idle editor, you can just type commands at the command line which run immediately) that QuickBasic, QB64, etc., did away with. I think it would be an interesting feature, and I saw at some point that someone had written a QB64 shell, but don't recall how well it worked. The MS Office VBA editor has a similar feature with the Immediate Window, and it's very useful in debugging or for trying out commands.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  The reverse of _droppedfile extended function needed doppler 0 308 09-25-2025, 03:19 PM
Last Post: doppler
  Kinda new here, again... fistfullofnails 11 2,736 12-29-2022, 11:15 AM
Last Post: OldMoses

Forum Jump:


Users browsing this thread: 1 Guest(s)