4 ms·
An overview of a problem that I run into is the need to pair some input, validate that input, query the system based on the input, expose the intermediate stage
by 6keZbCECT2uB 7y ago
An overview of a problem that I run into is the need to pair some input, validate that input, query the system based on the input, expose the intermediate stages for inspection and modification by arbitrary consumers, conditionally modify the underlying system in some way, and provide well defined semantics around the outcome while handling failure recovery, distributing the processing into multiple, cancelable stages, and sharing the system context and other forms of memory with concurrent operations.
The right way to behave in each situation based off of the input, the state of the system, or failures encountered is determined by history and by many people.
A language that makes my job easier solves problems like:
1. Help me describe my system as straightforwardly as the above description
2. Prevent me from neglecting to handle failure and reduce the work to specify how to handle failure
3. Prevent me from introducing logic errors. e.g. concurrency without synchronization, or passing an int where a string is expected.
3a. Help me verify that my solution does what I expect.
4. Make it easy to accumulate data and pass information through various interfaces.
5. Make it easy to extend behavior without modifying existing code.
Given that we probably spend 95% of our time plumbing information, handling failure, and reducing logic errors, an order of magnitude of productivity increase is realistic. Choosing an algorithm or data structure is less than five percent of time allocated.
Rich Hickey and Clojure seems to focus on people like me. Rust seems to focus on another subset of the challenges I face. One of the useful ideas I've encountered is that coding is a specification design process rather than a manufacturing process. We start with an ambiguous description and specify behavior in increasing detail until a computer can work with it. The article suggests that we can subordinate some of this detail to the compiler. The details that it chooses to subordinate aren't the details that disrupt my productivity.
- tigershark 7y agoIt seems that you are describing Haskell or ocaml/f#, I don’t see how clojure would fit the bill given that it’s a dynamic language.
- 6keZbCECT2uB 7y agoThose languages do indeed have a lot to offer for helping ensure safety. I attempted to describe 'situated programs' which Rich developed Clojure to solve. I've struggled to use Haskell in these kinds of environments maybe because it lets you do so much static analysis. The article assumes that as we get more productive at programming our time will be dominated by tests. While that's probably true, I would consider it important in this future world to minimize what tests need to be run and written. We do this today in Ocaml by making some classes of inconsistency inexpressible. We do this today in Rust by making some kinds of failure inexpressible.
- Sinidir 7y agoAn overview of a problem that I run into is the need to pair some input, validate that input, query the system based on the input, expose the intermediate stages for inspection and modification by arbitrary consumers, conditionally modify the underlying system in some way, and provide well defined semantics around the outcome while handling failure recovery, distributing the processing into multiple, cancelable stages, and sharing the system context and other forms of memory with concurrent operations. This sounds like a dream for data analysis.