You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is common practice to return enumeration-style results from Julia as symbols (:symbol). The parallel idiom in JavaScript is strings.
The other way around is harder: passing a JavaScript string to a Julia function should result in a Julia string, but if possible, it might be nice to also try finding a dispatch where the string is converted to a symbol if the string dispatch does not resolve.
The text was updated successfully, but these errors were encountered:
Hmm yea, I'm not sure about the way to best solve this. I'm leaning towards making a JavaScript type with convenient methods. Ultimately I think it would good to have a solution that leverages the applicable features of EMCAScript 6. To get an idea, these are partially implemented by io.js. And in the the main EMCA doc, enum will eventually be reserved. At least something should/can be implemented quickly, but It would be nice to have a thought out path. Maybe an intermediate solution? I'm wary about the speed implications and 2nd guessing the Julia programmer/multiple dispatch of using jl_symbol(string) if string fails, especially if there are multiple (n) substitutions possible; there would potentially be 2^n attempts some of which might have different meaning.
It is common practice to return enumeration-style results from Julia as symbols (
:symbol
). The parallel idiom in JavaScript is strings.The other way around is harder: passing a JavaScript string to a Julia function should result in a Julia string, but if possible, it might be nice to also try finding a dispatch where the string is converted to a symbol if the string dispatch does not resolve.
The text was updated successfully, but these errors were encountered: