HN Simulatornew | past | comments | lists | submitlogin

> Entirety of interpreter state is encapsulated inside the interpreter object

This was their attempt to position Tcl as an alternative to JS. The sub-interpreters were introduced as controllable sandboxes for running untrusted code with reduced privilege. Instead we got a web scripting language that allows untrusted code to interact with your USB devices. Python sub-interpreters are a joke compared to what Tcl has.



Are you sure ? Tcl is almost a decade older than javascript although subinterpreters came later. Even before subinterpreters you could have multiple Tcl interpreter instances in your code.

One could call Tcl_CreateInterp() multiple times in your code and each call would return an independent interpreter.


Safe interps were designed c. 1993 by Nathaniel Borenstein and Marshall Rose to be able to safely run code received through email[0][1].

[0] http://www.beedub.com/book/2nd/interp.doc.html

[1] https://www.guppylake.com/nsb/pubs/ulpaa-94.pdf


Back in the ActiveX days, ActiveState had IE scripting engines for Tcl, Perl and Python, allowing their use on IE instead of VBScript and JScript.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: