News for hackers. Stuff that matters.
Re:Joy: Web framework with Clojure syntax, fast startup and ... by dig1 on Saturday May 02, 2020 @06:40AM (#23050896)
Spec has it's place, but I think people are trying to shovel spec in all sort of places; for example, heavy data parsing, making code very hard to track. Reminds me on core.logic movement couple of years ago, where everyone tried to have own parser/ui/whatever written in it, resulting very unreadable code.

What I'm really missing from spec is ability to disable it with flag or property, like "assert" macro. Sometimes I just want piece of code to run as fast as possible with less bytecode and instructions executed.

Re:Joy: Web framework with Clojure syntax, fast startup and ... by jgalt212 on Saturday May 02, 2020 @10:00AM (#23051818)
Isn't spec just a way to bolt on types to a dynamic language? And if you look at this way, can one have its cake and eat it too?
Re:Joy: Web framework with Clojure syntax, fast startup and ... by nickik on Saturday May 02, 2020 @01:30PM (#23053387)
Thinking about Spec like a type-system is really not the right way to think. Its more dynamic validation system that works like regex for data-structures.
Re:Joy: Web framework with Clojure syntax, fast startup and ... by jgalt212 on Monday May 04, 2020 @08:23AM (#23067082)
unless you think about types the way Haskell does.
Re:Joy: Web framework with Clojure syntax, fast startup and ... by StreamBright on Saturday May 02, 2020 @07:26AM (#23051094)
Code readability is massively underrated.