I'm writing a Entity Component System. Part of my plan is to have a protocol called System that a system must fulfill to use the ECS.
The problem is, Clojure complains if I try to create a protocol called System; seemingly because it clashes with java.lang.System.
(ns entity.system)
(defprotocol System
; Protocol methods)
yields
CompilerException java.lang.RuntimeException: Expecting var, but System is mapped to class java.lang.System, compiling:(C:\Users\slomi\IdeaProjects\entity\src\entity\system.clj:3:1)
I tried excluding System by adding both (:refer-clojure :exclude [System]) and (:refer-clojure :exclude [java.lang.System]), but neither did anything; I received the same error again.
Of course I could just name it something else, but System seems the most appropriate name, and something like entity.entity-system/Entity-System or even entity.system/Entity-System seems overly redundant.
How can I exclude java.lang.System from the namespace?