Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ambrosebs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
ambrosebs
13y ago
Most of the research that Typed Clojure is based on didn't even exist when Clojure was created. Rich just made the best language he could, and waited for type theory to catch up, as it were! See this goldmine of papers for Typed Racket
32.
▲
by
ambrosebs
13y ago
Cool!
33.
▲
by
ambrosebs
13y ago
It's invaluable with abstract code that throws around functions. It's also fantastic for documenting your code. Watch "Typed Clojure" 2012 Conj talk, might reveal more about where it's best suited.
34.
▲
by
ambrosebs
13y ago
Just as cool though! :)
35.
▲
by
ambrosebs
13y ago
Thanks. There are certainly important tradeoffs. Haskell the language and Haskell the type system are designed to prevent many kinds of programming mistakes. Typed Clojure is designed to follow any decisions Clojure makes. For example, it&#
36.
▲
by
ambrosebs
13y ago
Fantastic, bring it on!
37.
▲
by
ambrosebs
13y ago
No problem, just was eager to clarify :) FWIW there are macros like fn> that allow you to write (fn> :- Number [a :- Symbol] 1), but you lose the ability to write ordered function types with multiple cases, so I don't use it very
38.
▲
by
ambrosebs
13y ago
May I suggest stealing some of core.typed's syntax for your docstrings, especially for polymorphic functions? It scales very well, from simple types like clojure.core/symbol: https://github.com/clojure/core.ty
39.
▲
by
ambrosebs
13y ago
core.typed author here. It might be easy to consider Schema as "competitor" to core.typed. In fact, it's the opposite: once they play nicely together they will form a formidable bug-fighting, finely-documenting team. :) core.
40.
▲
by
ambrosebs
13y ago
Just so readers don't deduce you're talking about core.typed, core.typed is plenty expressive enough to represent many idiomatic Clojure data structures, and very succinctly. eg. Heterogeneous keyword maps https://gith
41.
▲
by
ambrosebs
13y ago
core.typed will have to be extended to understand schemas. core.typed already plays nicely with assertions and branches (via occurrence typing), so we just need information on what type a schema "casts" to. This will not be diffic
42.
▲
by
ambrosebs
13y ago
Author of core.typed here. I will challenge that schemas are "significantly" better for documentation than core.typed types. With unions, intersections, heterogeneous maps, parameterised classes, recursive types we can be very
43.
▲
by
ambrosebs
14y ago
Typed Clojure multimethod support is work in progress, but closing in.
44.
▲
by
ambrosebs
14y ago
Shen is pretty amazing and is built with a type system in mind from the beginning. If you don't want the type system, just turn it off, in the middle of a REPL session if you want!
45.
▲
by
ambrosebs
14y ago
I'll just note that any corrections are more than welcome, this is my first paper and I've got a lot to learn! Please send them to abonnairesergeant at gmail dot com.
46.
▲
by
ambrosebs
14y ago
Thanks, I intentionally chose examples where types are particularly useful, like monads and conduits (and apparently null elimination).
47.
▲
by
ambrosebs
14y ago
Multimethods are an awesome feature, which I'm a big fan of, but they were lower on my priority list so I haven't got around to typing them. It's not clear how comprehensively they can be typed either, I comment about it in "Future work". I
48.
▲
by
ambrosebs
15y ago
Thanks for a very exciting and productive year with your work on core.logic. Can't wait to see how it gets used in the future!
49.
▲
by
ambrosebs
15y ago
... and I'll be around, so ditto! (I'm Ambrose)
50.
▲
by
ambrosebs
15y ago
Lisps make it fairly difficult to reason about resource consumption based on code size. And in general, is not a good metric for such a measurement.
51.
▲
by
ambrosebs
15y ago
FWIW I would pronounce it "delete all".