Journal entry for


I just remembered another useful FRP feature which currently doesn’t exist. It would solve the “I wrote my program as a function of Event a, but I want it to accept input looking something like Event [a], where [a] is an ordered sequence of occurrences that have to happen “within the current moment”. Doing this safely, especially if you want to pass multiple of these Event [a] values to a program, seems tricky. You want to keep your “moments within the current moment” apart from other “moments within the current moment” because there would not necessarily be a relationship between them.

Maybe one way to achieve it would be something like the following, for which you need a source of first-class sub-time values.

withMoments :: Integer -- How many sub-moments to generate
            -> forall t. [Time t]
                         -> Event t' (Map (Time t) a)
                         -> (Event t a -> Behavior t b)
                         -> Behavior t' b

(I didn’t think about this signature properly.)

Code metadata–version coupling

Another “what programming should be like” thought: I find it weird that TODOs/issues/… are not coupled to code. Some people consider TODO/FIXME notes in the code itself a smell, but they are metadata about the code and I’d like to see them while working on the code.

As far as I understand people are worried about:

On the other hand I think I’ve seen technical debt accumulation precisely because TODOs were not added. The same little niggles were present all over the code base but no one kept track of them and it kept making things worse.