News for hackers. Stuff that matters.
Re:Clojure Design Patterns by sooheon on Friday November 24, 2017 @08:33PM (#15773954)
Can you enlighten me as to how ADTs differ from specified contracts like spec [1]?

[1]: https://clojure.org/about/spec

Re:Clojure Design Patterns by catnaroek on Friday November 24, 2017 @08:37PM (#15773970)
Abstract data types guarantee that nobody besides the implementor can violate the contract. They compartmentalize what you have to verify.

Without abstraction enforcement mechanisms, an abstraction you have correctly implemented can still misbehave, because someone else has tampered with its internal representation.

Re:Clojure Design Patterns by hellofunk on Saturday November 25, 2017 @03:04AM (#15774965)
And here I thought ADT almost always meant "algebraic data type."

Regardless, Rich Hickey's last talk (last month at Clojure Conj) offered a counter argument, why ADTs are usually not the best way to organize software (as part of his larger discussion against static typing).

Re:Clojure Design Patterns by catnaroek on Saturday November 25, 2017 @06:05AM (#15775481)
> And here I thought ADT almost always meant "algebraic data type."

It depends on context

> why ADTs are usually not the best way to organize software

He clearly hasn't proven anything about his code.

Re:Clojure Design Patterns by mike706574 on Saturday November 25, 2017 @03:11PM (#15777736)
> He clearly hasn't proven anything about his code.

Is that a bad thing? It seems like many people are able to write software that works well and gets the job done without "proving anything" about their code in the way you're describing. Personally, I'm fine with not proving anything if I can deliver quickly and everything works, but I'd like to be convinced otherwise if there's real value there.

Re:Clojure Design Patterns by lprefontaine on Sunday November 26, 2017 @10:15AM (#15781201)
Formal verification of code has been the elusive Graal seeked by many for now a few decades.

It’s a mirage to which many have succumb but like in the desert most died of thirst trying to catch it.

Re:Clojure Design Patterns by catnaroek on Saturday November 25, 2017 @08:41PM (#15779021)
For basic infrastructure such as compilers and standard libraries (at least of data structures and algorithms), not providing proofs of correctness is outright criminal.
Re:Clojure Design Patterns by blain_the_train on Sunday November 26, 2017 @07:41AM (#15780660)
It's not though is it... You know, because there aren't actual laws about it.

Let's try not to make inflammatory statements.