Hacker News new | past | comments | ask | show | jobs | submit login

Gotta be honest, this sounds like a nightmare. Clojure felt like it got out of hand in my own _personal_ projects, I can't imagine going through 250k lines of it without a strong type system backing it up.

And they're building a "programming tool". Hmmmm

> We have about 400 macros defined through our codebase, 70% of which are part of source code and 30% of which are for test code only.




You can write 'type signatures' easily in clojure code, there's dozens of options, they're just only checked at runtime (and usually relegated to developer builds). if you combine that with good code coverage, it stops being a weakness and starts being a strength, because you declare data types with far more specificity & precision than a static type system.

As rich likes to say, the type signature of your stereotypical statically typed language, e.g. reverse :: [a] -> [a], doesn't have a much information content.

I write clojure, and still 'think in types' & category theory.


> the type signature of your stereotypical statically typed language, e.g. reverse :: [a] -> [a], doesn't have a much information content.

It's a little bit unfair to imply any alternative to bleeding-edge clojure is going to have a simple 70's Damas-Milner type system. Today, static types can describe a lot more. Refinement types (e.g liquid Haskell) and/or dependant types (e.g. Idris or Agda) can describe and enforce the desired properties for reverse statically.


I think you're downplaying the strength of types! In any relationally parametric type system `reverse :: [a] -> [a]` has a huge amount of content.


I'm not downplaying anything, it was the parent who was dissatisfied with static checking of reverse. Personally, I think any static checking is better than none at all. Statically typed languages are perfectly capable of checking additional contracts/properties at runtime too (as Clojure does).


Firstly, I was being a bit tongue-in-cheek, but secondly you seem to be saying that a "70's Damas-Milner type system" isn't already an extremely powerful type system. I would say that it is!


I was just trying to combat the common narrative that static types are "what Java has". There is so much potential for static typing that has not been explored by industry (e.g structural typing).


(That common narrative is also quite negative, Java’s type system is surprisingly strong and can express many more things than people give it credit for. See jooq, or several FP java frameworks)


Jooq is not a good example as it is essentially dynamically typed. Queries on the relational algebra can be statically typed, with structural typing and a few type-level features like sets. There are lots of papers on this.


It is quite statically typed, look at the examples. You might be thinking of the stringly-typed version, but it can generate classes from DB inspection and use columns and whatnot with its respective type throughout a query, failing to compile when a group by value is incorrect! It can’t verify everything what a SQL engine can of course, but it is quite remarkable in my opinion.


if I type ctrl+space, will it give me the correct auto-completion? despite what type-system galaxy brains might think, this is 95% of the value




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: