4 ms·
Thanks but to be honest, I'm not proficient in Python, so it's hard to guess if those restrictions would hurt, although they seem fairly small. I was more askin
by throwaway41597 11y ago
Thanks but to be honest, I'm not proficient in Python, so it's hard to guess if those restrictions would hurt, although they seem fairly small. I was more asking for personnal opinions and projects using it. I wasn't able to quickly find any, it even seems pretty much nobody writes RPython code or maybe people call it Python code so googling is hard.
- detaro 11y agoI don't know of any real projects outside of interpreters that use it. It has downsides (long compile times come to mind) and I'm not sure how well you can utilize the strengths (like the JIT) for non-interpreters. EDIT: Writing it is more restricted than normal Python, so you have to think about what you do (especially type hints, to make sure it gets what type your variables are) and the long feedback cycles due to compile time are annoying, but still very comfortable. And for building interpreters, the more or less "free" JIT is magic :)
- aidos 11y agoI've never worked with RPython. Looking through that list it doesn't look dreadful. There are a couple of things that jump out though - you can't use kwargs in function definitions which is probably used quite a lot in dynamic settings. Eg in Python one might do (warning; crazy, contrived example): def create_thing(**kwargs): thing = dict(id=gen_id()) thing['other_data'] = kwargs return thing thing = create_thing(name='name', foo='bar') You could avoid it, and generally in Python you're better off being explicit about everything. But it's definitely a feature that gets used a fair amount, especially in libraries where you don't explicitly know what the api call takes concerning user data. An easy (more explicit) workaround would be: def create_thing(other_data=None): thing = dict(id=gen_id()) thing['other_data'] = other_data or {} return thing create_thing(dict(name='name', foo='bar')) It's just a little more work for the calling code.