Is it possible to inherit methods into different namespace in clojure? -


i want able access several functions in several namespaces including 1 single namespace in other places..

eg, assume have vehicles.clj, car.clj, bike.clj, , handler.clj.

i want able 'inherit' or include methods car.clj , bike.clj in vehicles.clj can use or require vehicles.clj in handler.clj namespace (or other namespace) , call functions in car , bike.cljs.

not unlike parent , children classes in c#. possible?

the reason need because i've split many functions different files keep separation of concerns, want want able include main file (say, vehicles.clj (:use [myproject.vehicles]) in other namespace / files , call functions in classes.

is there better way this?

thanks.

https://github.com/ztellman/potemkin has tools doing this, highly recommend don't. sort of thing can make code difficult follow , it's easy turn seems improved organization spaghetti nightmare.

use @ discretion, try keep in mind making things easier on doesn't mean you're improving code!


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -