Opportunity missed by Python ?

C

candide

Dart is the very new language created by Google to replace Javascript.
So Python was not able to do the job? Or may be they don't know about
Python at Google ;) ?
 
A

Andreas Neudecker

Am 13.10.2011 11:45, schrieb candide:
Dart is the very new language created by Google to replace Javascript.
So Python was not able to do the job? Or may be they don't know about
Python at Google ;) ?

What needs to be done to make Python replace JS in Browsers/HTML? (or at
least make it a viable alternative to JS)

Can the Python community do this without involvment in browser development?

Regards

Andreas
 
C

Chris Angelico

Dart is the very new language created by Google to replace Javascript.
So Python was not able to do the job? Or may be they don't know about Python
at Google ;) ?

Python, as I found out to my detriment, is practically impossible to
sandbox effectively. Any language that hopes to gain full traction in
a browser-based environment MUST be secure against scripts gaining too
much control over the browser chrome.

Also, Dart is looking to support (optional) strict typing, which
Python doesn't do. That's a fairly major performance enhancement.

ChrisA
 
T

Terry Reedy

Python, as I found out to my detriment, is practically impossible to
sandbox effectively. Any language that hopes to gain full traction in
a browser-based environment MUST be secure against scripts gaining too
much control over the browser chrome.

I believe there was some idea of translating Dart into Javascript, which
can be done with Python also (Pyjamas).
Also, Dart is looking to support (optional) strict typing, which
Python doesn't do. That's a fairly major performance enhancement.

Cython support optional typing.
 
C

Chris Rebert

Python, as I found out to my detriment, is practically impossible to
sandbox effectively. Any language that hopes to gain full traction in
a browser-based environment MUST be secure against scripts gaining too
much control over the browser chrome.

Also, Dart is looking to support (optional) strict typing, which
Python doesn't do. That's a fairly major performance enhancement.

Actually, they can't use it as much more than an optimization hint,
per their own spec (see Sec 13.1 of the draft):

"Static type annotations are used during static checking and when
running programs in checked mode. They have no effect whatsoever in
production mode.
[...]
A Dart implementation must provide a static checker that detects and
reports exactly those situations this specification identifies as
static warnings. However:
• Running the static checker on a program P is not required for
compiling and running P.
• Running the static checker on a program P must not prevent
successful compilation of P nor may it prevent the execution of P,
regardless of whether any static warnings occur."

Cheers,
Chris
 
A

Alain Ketterlin

Chris Angelico said:
Python, as I found out to my detriment, is practically impossible to
sandbox effectively. Any language that hopes to gain full traction in
a browser-based environment MUST be secure against scripts gaining too
much control over the browser chrome.

A first step in that direction would be to have a specification for a
python virtual machine.

I guess engineers at Google know very well the limitations of Python in
its current state. After all, python's inventor works there. Also,
they've tried the optimization road with unladden-swallow. And failed.
Also, Dart is looking to support (optional) strict typing, which
Python doesn't do. That's a fairly major performance enhancement.

I think you're absolutely right. They've already included a "better
DOM". The use of typing will let them provide a very efficient standard
library.

I am willing to bet that Google's next step will be to provide a
plugin/extension/whatever to directly execute Dart programs in the
browsers. And then a JIT compiler inside the VM. And then everybody will
want to move, for performance reason. All the Javascript compatibility
is transitional stuff.

-- Alain.
 
W

Westley Martínez

Dart is the very new language created by Google to replace Javascript.
So Python was not able to do the job? Or may be they don't know
about Python at Google ;) ?

Google's a big supporter for Python...I think Guido working being
employed there has something to do with it, but I could be conspiring.

Python is not an appropriate language for client-side web scripts, it's
just too good for such a lowly job. ;)
 
W

Westley Martínez

Python, as I found out to my detriment, is practically impossible to
sandbox effectively. Any language that hopes to gain full traction in
a browser-based environment MUST be secure against scripts gaining too
much control over the browser chrome.

Also, Dart is looking to support (optional) strict typing, which
Python doesn't do. That's a fairly major performance enhancement.

ChrisA

You mean static typing?
 
C

Chris Angelico

The entire resources of Google available, and they re-invent C!

Syntactically, C has a lot going for it. If you want to invent a new
language and have developers grok it easily, borrowing syntax from C
will help a lot. But in this case, I think the derivation is from
JavaScript (which itself derives from C), making Dart a more-similar
replacement.

ChrisA
 
8

88888 dihedral

As long as there are tools to translate scripts or source code between the two languages. More new evolved powerful programming languages arenot problems at all for experienced programmers.
 
8

88888 dihedral

As long as there are tools to translate scripts or source code between the two languages. More new evolved powerful programming languages arenot problems at all for experienced programmers.
 
P

Prasad, Ramit

As long as there are tools to translate scripts or source code between thetwo languages. More new evolved powerful programming >languages arenot problems at all for experienced programmers.

More often than not, these conversion utilities are a source of terrible code. They are good for getting a quick job done, but not for code that has long term use.

Ramit


Ramit Prasad | JPMorgan Chase InvestmentBank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
 
8

88888 dihedral

Conversion utilities are used to ease the burdens for programmers to translate source scripts and codes into different languages or even the same language with revisions. Check for translators for C, C++, PASCAL, BASIC, and FORTRAN and also SWIG, PYREX, CYTHON, JYTHON and etc..
 
8

88888 dihedral

Conversion utilities are used to ease the burdens for programmers to translate source scripts and codes into different languages or even the same language with revisions. Check for translators for C, C++, PASCAL, BASIC, and FORTRAN and also SWIG, PYREX, CYTHON, JYTHON and etc..
 
G

geremy condra

The latest version of PyPy introduces a prototype sandbox:

http://pypy.org/features.html#sandboxing

It'll be interesting to see how effective this is.

Please note that their sandbox, while a good idea, is not a guaranteed
jail. It's enforced by replacing calls to external libraries with
trampoline stubs, but does not appear to have any intrinsic mechanism
to prevent calls from being issued without it. That means that if you
were able to successfully inject code you would be no more protected
here than with any other process.

Geremy Condra
 
8

88888 dihedral

The undetected recursive call loop in some states that can be hacked or would hang and crush! Every program has to be run in a VM is just one solution but that will slow down a lot.
 
8

88888 dihedral

The undetected recursive call loop in some states that can be hacked or would hang and crush! Every program has to be run in a VM is just one solution but that will slow down a lot.
 
D

DevPlayer

What I don't get is, having seen Python's syntax with indentation
instead of open and closing puncuation and other -readability-
structures in Python's syntax, is if someone is going to invent any
new language, how could they NOT take Python's visual structures (read
as readability) and copy it, whether it be a compiled language,
explicidly typed checked or whatever underlying mechanism they want to
make that code executable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,413
Latest member
KeiraLight

Latest Threads

Top