Re: Re: Python parser
Samir Patel <[email protected]> Mon, 9 Aug 2004 03:22:08 +0000
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 08 August 2004 05:58 pm, Mark Hahn wrote: > On Sat, 07 Aug 2004 20:19:37 -0400, Laurent Dube wrote: > > Hi Mark, > > > > If the main (only?) reason for switching paths is for having Prothon be > > more immediately connected to usable libraries, there might be a less > > onerous way of doing it than tagging on to .Net right away. > > > > Just consider your previous approach for a minute. You have a parser > > that reads prothon code and converts it to structures and data your > > interpreter can run. > > > > How about adding a second parser accepting python code as input, and > > giving you access at the same time to python libraries? > > What subset of python could be handled? > > What if the interpreter had a python mode? > > Has this been discussed before? > > Your own multiple-language VM? > > It is an interesting concept but I don't think I could make it work. > > When I looked at running CPython's libraries with Prothon earlier this year > it didn't look good. The Python libraries were too tightly wrapped around > the Python language. The CPython VM was not written to support multiple > languages as the CLR is. Python extensions expect to be able to have any > and all of Python available at all times. > > The best I could do would be to have the CPython interpreter running > embedded inside my Prothon interpreter and bridging calls from Prothon over > to Python. This would not be efficient as it would require both VMs to run > side by side. There would also be the overhead of translating between the > two. Threads would not be supported. I pretty much gave up on the idea. > Mark, I think this is only a short term problem, since programmer have a tendency to write there libraries in lang. they prefer and prothon won't be an exception. So in long term many of the libraries which are in python will end up in prothon language and your overhead problem won't be there. Also if there is high overhead, and library is very useful, they will be converted sooner than later. > > _______________________________________________ > Prothon-user mailing list > [email protected] > http://lists.prothon.org/mailman/listinfo/prothon-user