Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6596325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:03:41+00:00 2026-05-25T18:03:41+00:00

On a particular namespace I am working on I am beginning to run out

  • 0

On a particular namespace I am working on I am beginning to run out of function names. Is there a way to get a warning like the one I get if I override a symbol from another namespace if I reuse a symbol which is already bound to a function in the same namespace?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:03:42+00:00Added an answer on May 25, 2026 at 6:03 pm

    If this is enough of a problem that you’d be willing to replace a (set of) core macro(s), you could try this approach:

    (ns huge.core
      (:refer-clojure :exclude [defn]))
    
    (defmacro defn [name & defn-tail]
      (assert (nil? (resolve name))
              (str "Attempting to redefine already defined Var "
                   "#'" (.name *ns*) "/" name))
      `(clojure.core/defn ~name ~@defn-tail))
    

    Then any attempt to redefine an existing Var with defn will fail:

    user=> (defn foo [] :foo)
    #'user/foo
    user=> (defn foo [] :bar)
    AssertionError Assert failed: Attempting to redefine already defined Var #'user/foo
    (nil? (resolve name))  user/defn (NO_SOURCE_FILE:2)
    

    You could similarly replace defmacro; in that case you would have to call clojure.core/defmacro when defining your own variant.

    Plain, unadorned def is a special form and receives magic treatment from the compiler, so you could still overwrite existing Vars with it. If you would like to guard against name clashes on that flank too, you could switch to something like defvar (used to be available in clojure.contrib.def) with a similar custom assert.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any particular way to integrate Captch code validation in iPhone application? is
There is a method to create a namespace extension rooted in a particular folder.
I'm having trouble working with lambda functions in the Intel compiler, in particular, the
I'm working on an MVVM project, so I have folders in my project like
Basically I wanna know if all the types in a particular namespace implements a
What is the equivalent of Java's default (package) access in C#? Is there one?
I'm working on a Shit Cipher and decrypting a particular piece of text. Ok,
I have had to set a fixed time out for a particular COM method
When authoring a library in a particular namespace, it's often convenient to provide overloaded
I know there are Rails gurus out there who know exactly how to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.