manuel / wat-js

Concurrency and Metaprogramming for JS
MIT License
259 stars 8 forks source link

Operators #8

Open shadowcat-mst opened 11 years ago

shadowcat-mst commented 11 years ago

Javascript and Perl's operators don't behave identically. Nor do Python's.

Do we want to try and standardise on a single set of behaviours? Is that even feasible?

This ticket is more a placeholder for "now there's three implementations we should start thinking about this" than anything else.

manuel commented 11 years ago

Standardizing across JS and Perl -- sounds like the definition of hell to me ;-)

From the "Wat as an embeddable engine" standpoint, I think that's best left to each embedder.

At one point I'd like to define a higher-level, less expressive, statically-typechecked language based on Wat, and for that standardization may make sense.

shadowcat-mst commented 11 years ago

On Tue, Jul 09, 2013 at 04:42:59AM -0700, Manuel Simoni wrote:

Standardizing across JS and Perl -- sounds like the definition of hell to me ;-)

I was planning to invoke ingy to help since his c'dent project is intended to compile to perl, JS, python, ruby and other things.

Possibly the answer will be to have a small set of 'definitely do the right thing' operators - numeric-eq and string-eq or something.

Honestly I think if we changed all the numeric stuff to do 0+x == 0+y and similar we'd get very close to consistency there.

I guess I'll experiment at the point I'm trying to make wat-js and wat-pl talk to each other.

Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN commercial support, training and consultancy packages could help your team.