Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
possible programming challenge: a smart(er) IDE?
#7
(10-14-2022, 04:46 PM)Spriggsy Wrote: One thing to consider would be libraries. Some things that are accomplished in Python require different libraries from what is used to achieve the same result in C/C++. Any sort of translator would have to be aware of these common libraries and know when to include them. That would be quite difficult as well.

I think to begin with, we would just convert syntax for vanilla programs (ie nothing that relies on a binary library). It wouldn't be able to convert existing applications to a different language, so much as creating new programs, where users can choose what syntax to use (C, BASIC, Python, etc.) 
Maybe for now the libraries would be limited to whichever ones are available to the "primary" language (for example QB64). 

How to handle underlying libraries... hmm. 
Here's a question - how does Cython approach the whole library dependency question? 

Maybe to start, only support libraries that we actually have source code for? If they're binary libraries like PyGame, perhaps they would need to be recreated as a compilable program? I don't expect these problems to be solved overnight - this is something that will likely evolve little by little, library by library. 

If we are talking about OS m-level APIs or DLLs already on the machine, then they can be included however the given language includes them? I don't know enough about Python to know what command would be used to include a library or reference an API or DLL. 

The same with JavaScript, which lacks a lot of commands for desktop applications. Perhaps for languages lacking these kind of commands, we just create the equivalent to QB64, just done in the syntax of that language? e.g. No CLS or PRINT statement in JavaScript? Add it! No way to reference a COM DLL or declare an API function? Add it! 

The same with static variable definitions - we would expand certain languages like Python and JavaScript to add support. It would need to be done judiciously, or the work will never end. Start with the question, how do languages like cython or typescript approach adding features not in their parent languages? Can they be leveraged at all? Maybe we would get the code for the original library (e.g. numpy) and re-compile it or translate it to plain C to be part of our system? *** NOTE *** Take all this with a grain of salt - I'm just spinning my wheels, thinking out loud! LoL

Good questions though! Keep 'em coming! But at the same time, try to think of way(s) to solve these problems, not just give up.
Reply


Messages In This Thread
RE: possible programming challenge: a smart(er) IDE? - by madscijr - 10-14-2022, 06:02 PM



Users browsing this thread: 2 Guest(s)