[Tutor] Writing a programming language in Python (was: Trying to parse a HUGE(1gb) xml file in python)

David Hutto smokefloat at gmail.com
Tue Dec 21 11:16:48 CET 2010


On Tue, Dec 21, 2010 at 5:00 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> David Hutto, 21.12.2010 10:46:
>>
>> On Tue, Dec 21, 2010 at 4:34 AM, Stefan Behnel wrote:
>>>
>>> David Hutto, 21.12.2010 10:19:
>>>>
>>>> If I want to write a programming language, It might not be the best
>>>> idea to have a labguage needed for speed based on Python, I should
>>>> maybe use wha it's based on, or refine my own optimizations, just to
>>>> be a little clearer about my perspective.
>>>
>>> Being clearer would certainly help in understanding your postings.
>>
>> What's the difference between a language based on C++ Python, and C?
>>
>> If I used any of the above to begin writing my own language, which of
>> the above would be faster(other languages aside) to begin with?
>
> Certainly Python. The Cython compiler is written in Python, for example. It
> translates Python to C. It would have been a lot less fun to write it in C,
> and it would totally have made the project progress a lot slower.
>
> PyPy and ShedSkin are other famous examples to name here, even though both
> are written in restricted versions of Python (not sure about ShedSkin, but
> if it compiles itself, it must be).
>
> Seriously, if you want to write a programming language, the best advice I
> can give is to write it in Python.


Simpler yeah, Several implementations of python ring a bell with that,
and I understand it's .pyc so it's a compiled file and ready for usage
as 'anyother'(I might be wrong on this, but sure it's the same as
converting the original py file straight back to c).

Every language has it's benefits, and it's devout worshippers, I love
python, I even give credit to Guido for inspiring my own language
deviation in C++. I like cross language diversity, so I do things
everywhere, and I see noone complaining all the time about any one
language, nor it's advantages to them, especially if they know it and
use it.


More information about the Tutor mailing list