I think it's cool that someone has started on a python2dart translator. It
will be interesting to see how some of the paradigm mismatches are resolved
between Dart and Python, the biggest one being dynamism: Dart does not
allow the program structure to change after it's been loaded, this means
all imports have to be loaded before the program runs... conversely just
about every major Python framework uses one form or another of dynamic
imports, these will be impossible to port to Dart. This restriction is why
Dart is so insanely fast.

The problem with any solution where you don't support 100% of Python is
that you then don't benefit from the Python ecosystem in which case why
bother use Python proper. This is the niche of projects like RapydScript,
Coffeescript, etc. which are just syntax sugar over JS.

I think any python2dart translator will find itself in the same boat: it
won't be able to support 100% of Python and end up growing in complexity
like Pyjs. In the end it might be easier to just port something like
RapydScript or Coffeescript to output Dart code.

I've been doing full time Python development for over 10 years now, I've
gone to Python conferences and have loved the language and still do.
Unfortunately the times have changed and I don't feel that Python has kept
up. There are only two things going for Python right now: syntax and
ecosystem. I think you really need to have both of those to make developing
in Python worthwhile. Just having familiar syntax isn't worth it.

Dart has a lot of really nice features that in my opinion make it way worth
the inconvenience of semi-colons and squigglies.

1) It was designed from the ground up for Pyjs' use case: being
translatable to JS.
2) Insanely fast start up (if using Dart VM).
3) Has all of the features you need for large apps: classes, interfaces,
mixins, packages, etc.
4) Excellent async API, even more importantly it's consistent across the
entire standard lib (client or server).

If you've ever used Python Twisted than Dart will feel right at home.
Everything from file access to websockets connections to button click
events are based around Futures and Streams. Server side and client side
(HTML5/DOM) all use the same async API.

Another awesome thing about Dart is the optional typing, this results in
wicked good IDE support. By having optional typing the IDE has a much
better idea of what methods are available on an object and so auto-complete
works superbly well compared to Python.

 - lex


On Wed, Dec 10, 2014 at 6:34 AM, wb <warrenbuffettbilliona...@gmail.com>
wrote:

> One of advantages of Python2dart translator like Medusa is that we don't
> have to spend time on making compatible in different platforms. Dart takes
> care of cross-platform compatibility.So having a nice python2dart
> translator means that we can run Python applications everywhere without
> worrying about compatibility.
>
> Medusa is not supporting Windows and Cygwin yet, so I couldn't use it. I
> think that Medusa is not matured enough to be used widely.
>
> I think that python2dart translator can be a better way than
> python2javascript translator. 1. we can take advantage of Dart's a
> cross-platform property. 2. It is significantly faster than CPython. 3.
> Dart provides a nice debugging tool.
>
> But, we still need Pyjs until this idea becomes a practical and matured
> solution which is not available right now.
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Pyjs.org Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pyjs-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyjs-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to