Sorry for a late reply to the thread. This release is pretty cool. I
haven't been following the development too closely, so I have two questions:
1. Is ClojureScript/ClojureCLR supported by core.typed? Or, is it planned?
2. Is there a Leiningen plugin that can help run the type checks from the
Hi Shantanu,
CLJS support is planned but not current plans to work on CLR myself.
No leiningen plugins yet, FWIW I tend to add type checks to my unit tests
like:
(is (check-ns 'my.ns))
Thanks,
Ambrose
On Sat, Aug 31, 2013 at 4:13 AM, Shantanu Kumar kumar.shant...@gmail.comwrote:
Sorry for
Couldn't occurrence typing catch the error in that example, since
evil-atom-reset! can only return an atom wrapping a keyword?
I guess the problem I had is that the optional typing moniker seems
misleading since it forces you to annotate vars. I had visions of gradually
assigning types to
How about annotating clojure.core API. Is it needed, provided, optional?
On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant
wrote:
Hi,
After 10 months and 26 0.1.x releases of transitioning core.typed from an
ambitious student project, I am finally comfortable
I see optional typing as the opposite of mandatory typing. You don't need
to pass a type checker to get a program semantics.
Typed Clojure offers a particular flavour of optional typing: gradual
typing. My interpretation of gradual typing is some of your code is
rigorously statically typed, some
Hi,
Roughly 1/3 of clojure.core is annotated and comes included with
core.typed. They are unchecked annotations.
https://github.com/clojure/core.typed/blob/master/src/main/clojure/clojure/core/typed/base_env.clj#L658
You can lookup types via cf at the REPL.
(clojure.core.typed/cf +)
;= (Fn
Also you can add missing annotations via ann.
(ann ^:no-check clojure.core/+ )
Core vars observe the same rules as all vars: they must be annotated.
Thanks,
Ambrose
On Thu, Aug 29, 2013 at 3:44 PM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
Hi,
Roughly 1/3 of
Congratulations and thanks for your work!
On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant
wrote:
Hi,
After 10 months and 26 0.1.x releases of transitioning core.typed from an
ambitious student project, I am finally comfortable recommending core.typed
for
Is there any perf improvement to use static typing in Clojure?
Like we can see with Groovy 2.x and its static mode.
2013/8/29 Nils Grunwald nils.grunw...@gmail.com
Congratulations and thanks for your work!
On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant
wrote:
2013/8/29 Christian Sperandio christian.speran...@gmail.com
Is there any perf improvement to use static typing in Clojure?
core.typed is not a compiler, it's a type annotation/checker implemented
as a library.
If you are familiar with Erlang, it is to Clojure what Dialyzer is to
Erlang.
--
Ok...
Another question, the checking is done only once (while compiling) ? Or,
it's done while the runtime?
2013/8/29 Michael Klishin michael.s.klis...@gmail.com
2013/8/29 Christian Sperandio christian.speran...@gmail.com
Is there any perf improvement to use static typing in Clojure?
With Clojure the lines blur between compile time and runtime.
The clearest way to put it is that type checking is explicitly called at
the REPL or in a unit test. Usually this is done during development
iterations or testing time.
Re: performance improvements: Michael is correct. Interestingly
If you can do that, why not return the literal representation of the type
hinted function?
For the repl you could provide a function that interns the type-hinted
function into the namespace by evaluating the literal representation first.
From there it's easy to provide something like
I don't think it would be possible to reconstruct the original forms in
general, you would need to reverse macroexpansion to provide a form that
has at least a passing familiarity with the original form. Otherwise you
would get fully macroexpanded forms.
That's a lot of work!
On Thu, Aug 29,
Those forms won't be in the namespace you're evaluating?
Yeah, it's probably a lot of work, but it sounds neat. :-)
On Thursday, August 29, 2013 9:07:26 AM UTC-5, Ambrose Bonnaire-Sergeant
wrote:
I don't think it would be possible to reconstruct the original forms in
general, you would
Well I'm sure people wouldn't be happy if their call to (+ a b c) was
suddenly turned into (clojure.lang.Numbers/add (clojure.lang.Numbers/add a
b) c)
:)
On Thu, Aug 29, 2013 at 10:57 PM, Daniel doubleagen...@gmail.com wrote:
Those forms won't be in the namespace you're evaluating?
Yeah,
On Thu, Aug 29, 2013 at 5:01 PM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
Well I'm sure people wouldn't be happy if their call to (+ a b c) was
suddenly turned into (clojure.lang.Numbers/add (clojure.lang.Numbers/add a
b) c)
:)
the expresso [1] optimizer can be used for
Imo, there's nothing easy about writing something like Slamhound. Even
after many iterations it can't handle macros, because ultimately they're
impossible, without some kind of hints specifically added for Slamhound (or
for Typed Clojure) :)
--
--
You received this message because you are
Yeah, it's pretty much impossible unless you limit yourself to a manageable
subset of Clojure. The easy part I was referring to was the Leiningen
plugin, not the whole kit n' caboodle.
On Thursday, August 29, 2013 11:02:17 AM UTC-5, Alex Baranosky wrote:
Imo, there's nothing easy about
Just pushed 0.2.1 based on feedback from the video on HN.
https://github.com/clojure/core.typed/blob/master/CHANGELOG.md
Thanks,
Ambrose
On Thu, Aug 29, 2013 at 6:28 AM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
Hi,
After 10 months and 26 0.1.x releases of transitioning
Awesome. Thanks for your hard work!
Allen
On Wednesday, August 28, 2013 3:28:35 PM UTC-7, Ambrose Bonnaire-Sergeant
wrote:
Hi,
After 10 months and 26 0.1.x releases of transitioning core.typed from an
ambitious student project, I am finally comfortable recommending core.typed
for
Excellent work. I noticed that function parameter types default to Any when
not Annotated. What was the reasoning behind not mirroring this behavior
for vars, and instead requiring an annotation?
On Wednesday, August 28, 2013 5:28:35 PM UTC-5, Ambrose Bonnaire-Sergeant
wrote:
Hi,
After
Hi Daniel,
It is unsound to assume we can pass anything to an unannotated, unchecked
var.
core.typed makes the user explicitly mark unchecked vars, which is also a
source of unsoundness, but an explicit one. Hopefully :no-check is not
ambiguous in this regard.
Take this example.
;; untyped
23 matches
Mail list logo