core.typed
inspector
core.typed | inspector | |
---|---|---|
5 | 2 | |
1,277 | 32 | |
0.0% | - | |
0.0 | 0.0 | |
over 2 years ago | over 3 years ago | |
Clojure | Clojure | |
Eclipse Public License 1.0 | Eclipse Public License 1.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
core.typed
-
Does Go Have Subtyping?
...and Typed Racket is a really powerful type system (see refinement types[4]). So, I thought it's just a matter of time for Clojure to get to that level of power and support. It should be much easier to do this to Clojure than to Ruby, given that you have a working example of how to do it well. So I'm really surprised Clojure isn't gradually typed by now, with most of the code being annotated and type-checked at compile time.
[1] https://github.com/clojure/core.typed
[2] https://github.com/typedclojure/typedclojure
[3] https://github.com/typedclojure/typedclojure/blob/main/examp...
[4] https://docs.racket-lang.org/ts-reference/Experimental_Featu...
-
What's the idiomatic way to think about type safety/domain modeling in Clojure?
gradual typing (spec/schema/malli) or actual type systems like https://github.com/clojure/core.typed . I don't use them too much though.
-
Six years of professional Clojure development
Do you know about the Typed Clojure project? More or less Racket's contract system, for Clojure:
https://github.com/clojure/core.typed
To me, it's one of the great testaments to the power of Lisp that you can bolt on a static type system after the fact.
-
Is Clojure worth learning?
There's also https://github.com/clojure/core.typed Typed Clojure
inspector
-
Clojure 1.11 is now available
> show me an example of how having 'spec' is going to help me refactor the code that I got wrong the first time, as easily as what a proto-ML-like static type checker does. It's not a question of "types are bad vs types are good thing". It's a question of "this property was called 'name', but now I need it to be 'names', and I really need to know every possible place of my code base that uses it so that I can recursively change all code paths to handle the fact that it's a list, now." I read the spec doc a dozen times, and I don't think it does help in this simplest of simple case.
For this, I think the way to go is to use `fdef` to annotate the arguments to each function. This is a lot more explicit keyboard-typing on the programmer's part, but then so is a statically-typed language.
Where I think Clojure will still come up short is in tooling to support finding each reference in a better way than grepping your project for `:user/name`. All the information you need is in there, as you can see from this proof-of-concept tool[0], but it's not implemented seamlessly into the workflow.
[0]: https://github.com/clj-kondo/inspector
-
Is Clojure worth learning?
Hopefully specs are ending up in an s/fdef rather than a comment. Sadly no editor integration yet but I know /u/borkdude did some experiments looking at integrating this with clj-kondo here https://github.com/clj-kondo/inspector/. I'm not sure what the final verdict was for feasibility.
What are some alternatives?
janet - A dynamic language and bytecode vm
rhombus-prototype - Brainstorming and draft proposals for Rhombus
clj-kondo - Static analyzer and linter for Clojure code that sparks joy
Graal - GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
immer - Postmodern immutable and persistent data structures for C++ — value semantics at scale
babashka - Native, fast starting Clojure interpreter for scripting
mun - Source code for the Mun language and runtime.
deprecated-coalton-prototype - Coalton is (supposed to be) a dialect of ML embedded in Common Lisp.
web-development-with-clojure - Repository for the examples from the book Web Development with Clojure, 2nd edition
schema - Clojure(Script) library for declarative data description and validation
test.check - QuickCheck for Clojure