ClojureScript

Implement cljs$lang$applyTo on String.prototype instead of apply

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Activity

Hide
Laszlo Török added a comment -

Why is this needed?

Show
Laszlo Török added a comment - Why is this needed?
Hide
David Nolen added a comment -

It's a bit ugly, not to mention asking for clashes to implement apply instead of cljs$lang$applyTo.

Show
David Nolen added a comment - It's a bit ugly, not to mention asking for clashes to implement apply instead of cljs$lang$applyTo.
Hide
Laszlo Török added a comment -

So the expectation here is having

(apply js/String [1])

result in "1"?

Since js/String is a built-in function object (defmethod emit :fn ...) will not produce cljs$lang$applyTo magic.

So is this sg for the compiler to do in a bootstrap step or rather a (set! String.prototype.cljs$lang$applyTo ...) hack?

Show
Laszlo Török added a comment - So the expectation here is having (apply js/String [1]) result in "1"? Since js/String is a built-in function object (defmethod emit :fn ...) will not produce cljs$lang$applyTo magic. So is this sg for the compiler to do in a bootstrap step or rather a (set! String.prototype.cljs$lang$applyTo ...) hack?
Hide
David Nolen added a comment -

Lowering the priority on this ticket. If have we have real Keywords & Symbols we don't need to bother with this.

Show
David Nolen added a comment - Lowering the priority on this ticket. If have we have real Keywords & Symbols we don't need to bother with this.
Hide
Sean Grove added a comment -
Show
Sean Grove added a comment - This is related to http://dev.clojure.org/jira/browse/CLJS-576
Hide
David Nolen added a comment -

Made moot by CLJS-576

Show
David Nolen added a comment - Made moot by CLJS-576

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: