You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(makebaseunit <string>) is currently just a layer of syntactic sugar over JScience's BaseUnit.
If we try to use the name of a unit already defined in JScience's Unit/SI as the name of a new dimension, we get an exception. This is clearly a bug.
At the repl:
user=> (require '[units2.IFnUnit :refer [defbaseunit]])
nil
user=> (defbaseunits"G")
#'user/s
user=> (defbaseunits"H") ; Henry
CompilerException java.lang.IllegalArgumentException: Symbol H is associated to a different unit, compiling:(form-init######.clj:1:1)
user=> (defbaseunits"I")
#'user/s
user=> (defbaseunits"J") ; Joule
CompilerException java.lang.IllegalArgumentException: Symbol J is associated to a different unit, compiling:(form-init######.clj:1:1)
user=> (defbaseunits"K") ; Kelvin, so expect exception, but it seems to work?
#'user/s
Intriguingly, using units from Unit/NonSI is just fine:
user=> (defbaseunits"a") ; are
#'user/s
user=> (defbaseunits"b")
#'user/s
user=> (defbaseunits"c") ; speed of light
#'user/s
user=> (defbaseunits"d") ; day
#'user/s
user=> (defbaseunits"e") ; positron charge
#'user/s
An exception to this exceptional behaviour (!) occurs for Baseunits defined in Unit/SI themselves ("A", "cd", "K", "kg", "m", "mol", "s"), which seem to work just fine at a first glance but actually don't do what you'd expect!
(makebaseunit <string>)
is currently just a layer of syntactic sugar over JScience'sBaseUnit
.If we try to use the name of a unit already defined in JScience's Unit/SI as the name of a new dimension, we get an exception. This is clearly a bug.
At the repl:
Intriguingly, using units from Unit/NonSI is just fine:
An exception to this exceptional behaviour (!) occurs for
Baseunit
s defined in Unit/SI themselves ("A", "cd", "K", "kg", "m", "mol", "s"), which seem to work just fine at a first glance but actually don't do what you'd expect!The text was updated successfully, but these errors were encountered: