[ANN] ClojureCLR 1.12.3-alpha2 released
Some small changes:
• Improvements in the type resolution code and automatic assembly loading that first appeared in alpha1.
• Improvement in loading the spec library files.
But the big change: improved typename syntax and resolution.
• improved type alias definitions
• ability to use typenames like String in generic type arguments with having to write System.String
• ability to use the Clojure special type names that you can use in type hints, such as int and shorts directly in generic type arguments
• no need to attach the backquote-arity suffix to generic types when the arity can be inferred.
You can now do
(alias-type Dictionary |System.Collections.Generic.Dictionary`2|)
(alias-type List |System.Collections.Generic.List`1|)
(alias-type IntList |List[int]|)
and refer to types
|Dictionary[String, List<long>]|
|Dictionary[String, IntList]|
and write code such as
(def my-list (IntList/new))
(IntList/.Add my-list 42)
(In this example, using qualified method expressions).
alias-type is a macro. First argument a symbol, not evaluated, second argument is a type.
def-type-alias is a regular function. It might be needed in some situations. The following are equivalent:
(alias-type Dictionary |System.Collections.Generic.Dictionary`2|)
(def-type-alias 'Dictionary |System.Collections.Generic.Dictionary`2|)
I've written up an in-depth discussion of the what's changed here: https://dmiller.github.io/clojure-clr-next/general/2025/09/21/typename-syntax-and-resolution.html
I still need to update the ClojureCLR wiki with the changes. (Brevity takes more work.)
This is definitely an alpha improvment. (Though I do have a fairly extensive suite of tests, so it should be fairly robust.) Please give it a try and let me know how it goes.Fixed.
Found a non-trivial bug in the automatic assembly loading code that came out in alpha1.
You might notice a problem with cljr if you are using it.
Next alpha coming out soon.