3 ms·
Is there a static type system included/inferred? Couldn’t not find the answer
by jiehong 10mo ago
Is there a static type system included/inferred?
Couldn’t not find the answer
- gleenn 10mo agoIt is implementing Clojure which does not have static typing so my strong assumption would be no
- Zak 10mo agoClojure offers static typing as a library.
- kermatt 10mo agoIs that 'core.typed' ? Does it introduce incompatibilities with third-party libraries?
- yogthos 10mo agotyped Clojure has both Clojure and ClojureScript implementations, so it's not tied to the JVM https://github.com/typedclojure/typedclojure https://github.com/typedclojure/typedclojure
- pxc 10mo agoAs a dialect of Clojure, it's a dynamically typed language. But its designer has expressed interest in eventually adding static type checks via a gradual typing system¹: > I mentioned that a native Clojure is the first step toward my dream language. Indeed, it doesn't stop there. jank will always be a Clojure dialect, but it will also optionally support more. Features like gradual typing (maybe linear typing), more explicit memory management, value-based errors, and stronger pattern matching, to name a few, improve upon Clojure. This will allow another axis of control, where some parts of the program can remain entirely dynamic and garbage collected while others are thoroughly controlled and better optimized. That’s exactly the control I want when programming. -- 1: https://jank-lang.org/blog/2025-01-10-i-quit-my-job/ https://jank-lang.org/blog/2025-01-10-i-quit-my-job/
- tym0 10mo agoOh man, as someone who used to contribute to a statically typed lispy language this would be the dream for me.
- swlkr 10mo agothere's always carp lang but no gc
- tym0 10mo agoThat's the language I was talking about :) But none of us have worked on it in a while.
- Jeaye 10mo agoCarp is great and I would love to include a mode of jank which is very much Carp-esque. If you're interested in working together on this, please let me know.
- tym0 10mo agoMost of my contributions were to the stdlib so my knowledge of the implementation of the type system is limited sadly. Maybe Erik, the creator, would be interested. I know he was looking at rewriting Carp in cpp at some point.
- dismalaf 10mo agoIt's too bad. I was looking at it the other day, looks really interesting.
- tym0 10mo agoIt's still a fun language to play with :) My favourite thing was to run it on all kind of microcontrollers as you could just emit C. Wrote a small GBA game with it.
- Jeaye 10mo agoNo full-lang static type system. jank has seamless C++ interop and all interop is statically typed, but as soon as things get back into Clojure land, it's all dynamically typed and hella polymorphic. I will be exploring optional static typing modes for jank in the future, a la Carp. That will not be this year, though.