Importing things in Clojure

INSIDE AN (NS) ONLY, LOL

from foo.core import *

(:use foo.core)

from foo.core import bar (only if bar is not another module, lol)

(:use [foo.core :only (bar)])

import foo.bar

(:require [foo.bar])

import foo.bar as bar (only if bar is another module, lol)

(:require [foo.bar :as bar])

import foo.core.Bar as Bar (only if bar is a record, trolololol)

(:require [foo.core])
(:import [foo.core Bar])


OUTSIDE AN (NS) ONLY, LOL

from foo.core import *

(use 'foo.core)

from foo.core import bar

(use '[foo.core :only (bar)])

import foo.bar

(require '[foo.bar])

import foo.bar as bar

(require '[foo.bar :as bar])