News for hackers. Stuff that matters.
Re:Dynamic type systems are not inherently more open by rwmj on Sunday January 19, 2020 @09:18AM (#22091534)
When writing OCaml, if I'm unsure of the type I set the type to some impossible value, compile it, and the compiler tells me what the type really is.
Re:Dynamic type systems are not inherently more open by hnra on Sunday January 19, 2020 @09:37AM (#22091622)
I Haskell you simply put a "_" in the annotation and the compiler suggests the correct type.
Re:Dynamic type systems are not inherently more open by dllthomas on Sunday January 19, 2020 @02:07PM (#22093218)
You can also do this with values, asking "what goes here?" - it's great.
Re:Dynamic type systems are not inherently more open by andrepd on Sunday January 19, 2020 @10:51AM (#22092017)
Alternatively, merlin can tell you the type of the expression under your cursor, besides also flagging type mismatches like your situation.