
Strictly Tagged Clojure - jonnybgood
http://arrdem.com/2015/08/03/Strictly-Tagged-Clojure-Core
======
virtualwhys
> While statically typed, Clojure is an aggressively dynamically checked
> language.

Not sure what that means, thought Clojure was a dynamically typed language
with optional static types (via Clojure.Typed). If it were statically typed
then it would not blow up at _run time_ when you, for example, mke a typo.

Personally I find Clojure.Typed code far more readable, not to mention the
added safety/performance. Any chance that will become the default? A
statically typed Clojure + ClojureScript would be pretty compelling ;-)

~~~
pron
> not to mention the added safety/performance

I believe core.typed has no effect -- neither positive nor negative -- on
performance. AFAIK, it doesn't affect code generation in any way.

~~~
virtualwhys
> I believe core.typed has no effect -- neither positive nor negative -- on
> performance

Interesting, assumed otherwise. Groovy, another dynamic language with optional
static typing, does benefit performance-wise when electing to use the
`@CompileStatic` annotation on applicable code blocks.

A Clojure.Typed with performance improvements would certainly benefit projects
like Storm. Probably a ton of work involved though, otherwise it would have
been done already.

~~~
moomin
There's two typing systems here: core.typed which is an interesting research
project which has its own type system and a focus on program correctness, and
Clojure's own type annotations, which use Java's type system and affect
performance. The article is about improving the latter.

Hope this helps.

~~~
vorg
Groovy also has two such typing systems. Type tagging, which has been present
since Groovy 1.x, causes runtime type checks and actually slows down the code.
Developers would use Java if they needed compile-time typing, say, for
performance.

Since Groovy 2, however, the `@CompileStatic` annotation has been available.
It's not being used much, probably because people using Groovy just use it for
scripting, e.g. testing Java code or in Gradle build scripts. Because only one
programmer built it, many developers are concerned about residual bugs, and
just use Java or Scala instead.

~~~
virtualwhys
That's crazy if what you say is true in your July 14th post [1]. I left in
2010, what a mess the project has become o_O

[http://gavingroovygrover.tumblr.com/](http://gavingroovygrover.tumblr.com/)

~~~
vorg
You can reference that blog entry directly, i.e.
[http://gavingroovygrover.tumblr.com/post/124058010761/groovy...](http://gavingroovygrover.tumblr.com/post/124058010761/groovys-
manifesto-the-struggle-continues)

