3 ms·
I think this is a neat attempt to make functional programming more acceptable but I really dislike the first section on assembler production > If Factorio were
by munk-a 6y ago
I think this is a neat attempt to make functional programming more acceptable but I really dislike the first section on assembler production
> If Factorio were a strongly typed language all the way, there would be separate recipes for producing different assemblers (that is assemblers with different recipes). For instance, we could have:
Technically yes - in a strongly typed language assemblers would be specifically specialized at compile time. For the Haskell side of things they go on to specify a higher order function to produce an assembler that can then be given a purpose by a second call. However they dropped the ball a bit on the C++ side and, while generics cause grief, they are quite good to learn about and this is a perfect place to use a templated function that could infer the correct type at compile time.