176 karma · joined April 21, 2015
Hence why I said this. There is nothing you can use to believe a human's claims over the text-to-speech's claims, so we choose what looks like suffering to us. However, my point is that it is an arbitrary choice.
One can give a small step relation for a Turing machine and one could possibly come up for a type system for it, but generally one starts with the semantics for untyped lambda calculus.
Some of the more advanced type theory stuff unifies the notions of terms and types, meaning arbitrary computations can happen in type checking and so properties about types can involve properties about computation in general.
EDIT: Apologies, misunderstood.
It seems that like the concept is so over-complicated that it requires developers to invent an entire religion to be able to effectively apply it to real world use cases...( my procedural philosophy is so simple, I could explain it to a 10 year old).
There are many ways to build software, but only few ways to build it reliably. One major aspect of reliable software is composability, so that may ensure correct large systems are out of correct smaller systems. Correctness in the small, trivial bits and their glue is what makes correctness at large. You say you just have to think about what's best for your project. Why not think about and understand the problem in general and build tools to tackle the specific complexities you have.
Feel free to not use Haskell. Just keep in mind that you too live in a bubble with a certain mixture of doctrine and trade-offs.
If Martians visited Earth, surely you'd want to learn their language. :)
I said lenses, but the more general term is optics (still vague and unsearchable, I know). A certain representation of optics was popularized in Haskell by Edward Kmett partly as a way to solve the record access problem, but they are way more useful then that.
Lenses, in a context of programming, can sort of be seen as a vast purely functional generalization of l-values.
When you are manipulating affordances in a user interface, you can view it as manipulating part of larger state. That is something that fits very well into the framework of optics. A simple example would be a color picker using different color models. HSV and RGB are both views of the same object. A slider for each of hue, saturation, value, red, blue and green can be seen as a lens from color to a magnitude. By adjusting the slider, you change the state.
Some parts of a user interface are dynamical systems, i.e. evolve over time based on state and locally available actions. One can imagine a platformer game with changing player position, or a media player with a slider. FRP delves into this, but I'm not too familiar with the literature. I am vaguely aware that lenses can be connected to dynamical systems, but I don't understand it at all.
As far as reinterpreting code. In Haskell and typed functional programming in general, there is this tower of different abstractions you can use to describe different levels of reified computation (Functors, Applicatives, Arrows, Monads). You also get effects systems, which make it more tractable for the layman that doesn't want to read ω+1 monad tutorials.
In these abstractions, one can make "free" constructions, which sort of have the flavor of making the thing as syntactic as possible while still following the laws that must be upheld by the abstraction. This makes it possible to write code separately from the way it is interpreted.
I only have a vague feeling that these concepts will fit well together. Perhaps my head is too far in the clouds.
EDIT: As far as model view separation, that it is. But the idea is to stratify it even further. You have your larger state of the whole application in which you can increasingly select parts of the whole and manipulate them. The lens part not only captures the translation from the model to the view, but also from actions on the view to the model.
This has a very reactive flavor, so I think you could have a sort of functional reactive approach where your hot-swappable definitions are represented as behaviours over time.
How to make that get out of your way until you actually want to swap things out, I have no clue. I think it will involve some sort of effect system, but I'm not sure if that will solve the problem.
I have no idea if it is possible, and maybe I should be the change I want to see in the world.
EDIT: I realize now this doesn't quite follow the conversation, but I wanted to get the thought out somewhere.