News for hackers. Stuff that matters.
Re:Clojure's core.typed vs Haskell by masklinn on Monday September 30, 2013 @10:26AM (#6469765)
> As seen at the top, it was necessary to annotate mod. It has the no-check flag on it, which is basically how you tell core.typed to just take your word on this one. That's something you can't do in Haskell, but I'm not sure whether or not that's a good thing.

Isn't the reason why you need to do it because you're importing a non-typed symbol? Wouldn't the only situation where you'd need to do that in Haskell be at FFI?

(and a nitpick: `putStrLn $ show` can be replaced with a simple `print` call)

Re:Clojure's core.typed vs Haskell by rmcclellan on Monday September 30, 2013 @10:33AM (#6469804)
Re:Clojure's core.typed vs Haskell by brandonbloom on Monday September 30, 2013 @11:02AM (#6469965)
I'll save the value judgement for another time, but I'd like to point out an important difference:

As the word "unsafe" implies, these Haskell primitives forego type safety in addition to type correctness. That means you can get segfaults and other undefined behavior at runtime. Such a type error on the JVM will simply produce an exception at runtime.

Re:Clojure's core.typed vs Haskell by tikhonj on Monday September 30, 2013 @02:23PM (#6471287)
This is why we have Data.Dynamic which does safe dynamic types.

It almost never comes up because it turns out to be virtually useless, but that's a story for another time.

Re:Clojure's core.typed vs Haskell by brandonbloom on Monday September 30, 2013 @04:10PM (#6472038)
> it turns out to be virtually useless

That's debatable, however Data.Dynamic is built on top of Data.Typeable, which provides a lower level runtime type safety facility. I think we can both agree Typable has lots of interesting uses.

Re:Clojure's core.typed vs Haskell by tel on Monday September 30, 2013 @04:48PM (#6472276)
Typeable is interesting in theory and generic traversals are a godsend, but usually I find that when I'm reaching for that particular hammer I should check twice.
Re:Clojure's core.typed vs Haskell by brandonbloom on Monday September 30, 2013 @05:28PM (#6472495)
I'll agree it's best to avoid fully open unions when you can, but some (super useful) things truly don't work that way. Check out http://okmij.org/ftp/Computation/monads.html#ExtensibleDS for a cool example.
Re:Clojure's core.typed vs Haskell by tel on Monday September 30, 2013 @05:31PM (#6472512)
I always think of Control.Exception as the poster child for open unions.
Re:Clojure's core.typed vs Haskell by brandonbloom on Monday September 30, 2013 @08:08PM (#6473172)
Perfect, since exceptions are a subset of effects! Check out http://math.andrej.com/eff/ and its literature.
Re:Clojure's core.typed vs Haskell by emillon on Monday September 30, 2013 @11:12AM (#6470016)
The difference is that Haskell does not check types at runtime like Clojure does (which is the point of strong static typing), so if the type is wrong it becomes as unsafe as C.