possible programming challenge: a smart(er) IDE?
#2
(10-14-2022, 02:21 PM)madscijr Wrote: (Disclaimer: this is more a thought experiment or topic of discussion than a hard proposal!)

One thing I have wanted to see for a while is an IDE that lets you enter your program in the language / syntax of your choice, stores the program, variable names, and comments, in some sort of universal format or intermediate language, and can "render" the source code in a different language or with different variable naming conventions, depending on the user's preference. Maybe there's a dropdown you use to select the language (e.g. QB64, Python, JavaScript, etc.) and as soon as you do, the editor immediately translates or renders the source code into whatever you choose. 

I know that this isn't necessarily as simple as it sounds where languages do not support the same features or paradigms - e.g. QB64 is statically typed and Python dynamically typed, QB is strictly procedural whereas Python can be OO or functional - but if a program sticks to the lowest common denominator of functions, or the IDE stores the maximum detail (e.g. explicit type declarations for QB which is stored under the hood, but ignored when using dynamically typed languages like Python & JavaScript) then perhaps it can work? 

Or we could take the simple route and just support the features all languages have in common (e.g. strictly procedural) so people who are more familiar with C/JavaScript syntax can use that, people who like Python can use that, and us BASIC lovers can do that. 

...<snip>...

I really like this idea! And I agree with you, not easy to do.  As you surmised, lots of differences that don't translate easily.  But it is still a great idea!

For instance, I've written a "Tiny Basic" interpreter in various languages, trying to keep the code as similar as I could.  I've (re-)written it in QB64, Python, C, C++, C#, as well as various other Basic dialects: VB.NET, FreeBasic, GW-Basic, SmallBasic (the real one Smile ), Yabasic and RCBasic.  While some things are very different, it is pretty interesting how many things are similar.  As the old saw goes, I can write Fortran in any language Smile (Yes, Fortran was my first language, back in 1976 or so).

I'd also like to add converting QB64 to various other Basic dialects.

Also:  There was a user, STxAxTIC, - alas, he apparently ran afoul of the current powers-that-be - he had a neat scripting language called Sxript I think.  Anyway, he had a Basic program that would translate a subset of QB64 to C or Javascript, and perhaps vice versa. 
However, I could never get it to work, and was going to ask him about it, but now he is gone Sad  Why can't we all just get along? Smile

Again, I really like your idea, thanks for sharing it!
Reply


Messages In This Thread
RE: possible programming challenge: a smart(er) IDE? - by Ed Davis - 10-14-2022, 03:34 PM



Users browsing this thread: 14 Guest(s)