<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 11 August 2017 at 16:19, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Aug 12, 2017 at 5:13 AM, Alberto Berti <<a href="mailto:alberto@metapensiero.it">alberto@metapensiero.it</a>> wrote:<br>
> Chris> What do you do about all the places where the languages have<br>
> Chris> significantly different semantics? For instance, a Python integer can<br>
> Chris> store more values than a Python float (which is broadly compatible<br>
> Chris> with a JS Number), but in JS, bitwise operations restrict the value to<br>
> Chris> 32-bit.<br>
><br>
> As of now, I do nothing. As I said, the goal of the tool is not to<br>
> shield you from JS, for this reason it's not meant for beginners (in<br>
> both JS or Python). You always manipulate JS objects, but allows you to<br>
> to be naive on all that plethora of JS idiosyncrasies (from a Python pow<br>
> at least) that you have to think about when you frequently switch from<br>
> python to js.<br>
><br>
</span><span class="">> Chris> Transpiling is an<br>
> Chris> extremely dangerous thing to do a partial job of.<br>
><br>
> Even breathing can be dangerous in some environments...<br>
> Bridging two different concepts together is always a partial job...<br>
><br>
> Again, the use case may seem minimal to you but I can assure that it<br>
> helps on the day to day work with JS.<br>
<br>
</span>Speaking as someone whose day job is teaching Python and JavaScript, I<br>
don't like the idea of this kind of thing. You're bringing (some)<br>
Python syntax, but sticking to JS semantics. That means your source<br>
code looks like Python, but runs like JS. You can't afford to ever run<br>
it through a Python interpreter (the semantics will be wrong).<br>
<br>
There's already plenty of confusion in the world. I don't want to add<br>
more. It would be far better to base your language on JS syntax, since<br>
it's using JS semantics; just add in a handful of Python features that<br>
you really miss.<br>
<br></blockquote><div><br></div><div>Well,I hope you both had at least skimmed over "brython" - it started a couple years ago</div><div>with somewhat the same "won't o full Python purpose" - but nowadays they have a </div><div>very conformant implementation of Python3 that is transpiled client-side into working javascript. </div><div><br></div><div>(It does use some JS third party library to be able to implement Python integers, for example - </div><div>but I think one can use a "pragma" like statement to use "native" numbers for performance)</div><div><br></div><div><a href="http://brython.info">http://brython.info</a> </div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ChrisA<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</div></div></blockquote></div><br></div></div>