Clojure

Allow the function / to be referred to in namespaces other than clojure.core

Details

  • Type: Enhancement Enhancement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.1, Release 1.2, Release 1.3, Release 1.4
  • Fix Version/s: Release 1.6
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Ok

Description

The attached patch gives the programmer the option of referring to the division function in namespaces other than just clojure.core. For example,

(ns foo
(:require [cljs.core :as core]))
(apply core// '(1 2 3))

The above lines do not compile without this patch.

Activity

Hide
Alex Miller added a comment -

Re-resolving. Moved extra late patch to new ticket - CLJ-1238.

Show
Alex Miller added a comment - Re-resolving. Moved extra late patch to new ticket - CLJ-1238.
Hide
Alex Miller added a comment -

Since the last patch on this came in after the change had been applied, I moved the cleanup patch to CLJ-1238.

Show
Alex Miller added a comment - Since the last patch on this came in after the change had been applied, I moved the cleanup patch to CLJ-1238.
Hide
Nicola Mometto added a comment -

Andy, I've updated 0001-Fix-CLJ-873-for-EdnReader-too.patch to remove SLASH and CLOJURE_SLASH as you suggested.

Show
Nicola Mometto added a comment - Andy, I've updated 0001-Fix-CLJ-873-for-EdnReader-too.patch to remove SLASH and CLOJURE_SLASH as you suggested.
Hide
Andy Fingerhut added a comment -

Nicola, I noticed yesterday that LispReader.java still contains values SLASH and CLOJURE_SLASH that are no longer used after the patch was applied yesterday for this ticket. Would you mind including the removal of those in your patch, too?

Show
Andy Fingerhut added a comment - Nicola, I noticed yesterday that LispReader.java still contains values SLASH and CLOJURE_SLASH that are no longer used after the patch was applied yesterday for this ticket. Would you mind including the removal of those in your patch, too?
Hide
Nicola Mometto added a comment -

I'm reopening it, attaching a patch for EdnReader

Show
Nicola Mometto added a comment - I'm reopening it, attaching a patch for EdnReader
Hide
Nicola Mometto added a comment -

clojure.lang.EdnReader should get patched aswell.

Show
Nicola Mometto added a comment - clojure.lang.EdnReader should get patched aswell.
Hide
Brandon Bloom added a comment -

This also affects a two of my libraries: 1) CSS generation library I'm working on, which wants to be able to do division with pixels and other units. 2) Factjor which defines binary math operators against a stack.

Show
Brandon Bloom added a comment - This also affects a two of my libraries: 1) CSS generation library I'm working on, which wants to be able to do division with pixels and other units. 2) Factjor which defines binary math operators against a stack.
Hide
Andy Fingerhut added a comment -

I should have added a comment here a while back if it would have helped, but David Nolen's CLJ-930 was closed as a duplicate of this one.

Show
Andy Fingerhut added a comment - I should have added a comment here a while back if it would have helped, but David Nolen's CLJ-930 was closed as a duplicate of this one.
Hide
Stuart Halloway added a comment -

Thanks all. It is nice to have supporting real-world stories such as Alex's in the comments.

Show
Stuart Halloway added a comment - Thanks all. It is nice to have supporting real-world stories such as Alex's in the comments.
Hide
Chris Gray added a comment -

A short further discussion of this patch appeared here: http://groups.google.com/group/clojure-dev/browse_thread/thread/f095980802a82747/b723726c77c1ec64

Also, I assume this bug is what is referred to in Clojurescript's core.cljs, where it says ";; FIXME: waiting on cljs.core//"

Show
Chris Gray added a comment - A short further discussion of this patch appeared here: http://groups.google.com/group/clojure-dev/browse_thread/thread/f095980802a82747/b723726c77c1ec64 Also, I assume this bug is what is referred to in Clojurescript's core.cljs, where it says ";; FIXME: waiting on cljs.core//"
Hide
Andy Fingerhut added a comment -

clj-873-namespace-divides-patch.txt is same as Chris's, just updated to apply cleanly to latest master as of Feb 24, 2012.

The test he added does fail without the code fix, and passes with it. He is now on the list of contributors.

Show
Andy Fingerhut added a comment - clj-873-namespace-divides-patch.txt is same as Chris's, just updated to apply cleanly to latest master as of Feb 24, 2012. The test he added does fail without the code fix, and passes with it. He is now on the list of contributors.
Hide
Alex Miller added a comment -

FYI, I have run into this in actual code as well (implementing a query language function library).

Show
Alex Miller added a comment - FYI, I have run into this in actual code as well (implementing a query language function library).
Hide
Chris Gray added a comment -

My CA has now been applied. This patch is quite simple – can someone have a look at it please?

Show
Chris Gray added a comment - My CA has now been applied. This patch is quite simple – can someone have a look at it please?
Hide
Chris Gray added a comment -

I have signed the CA and it is in the mail.

Show
Chris Gray added a comment - I have signed the CA and it is in the mail.

People

Vote (7)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: