3 ms·
People say “the two hardest problems in computer science are cache invalidation, naming and off-by-one errors” and we often design systems so that we don’t have
by fiddlerwoaroof 7y ago
People say “the two hardest problems in computer science are cache invalidation, naming and off-by-one errors” and we often design systems so that we don’t have to think about cache invalidation and off by one errors (e.g. list.map rather than a for loop). I often wonder if we should think about minimizing how often we name things as well.
- Skunkleton 7y agoAren’t features like if-expressions just that?
- dahart 7y ago> I often wonder if we should think about minimizing how often we name things as well. Personally, I think that depends, so I like to challenge my own assumptions and examine things case by case. The implementation of a math equation, especially one that is the result of solving a different equation, and so went through a symbolic/algebraic transformation, that is one place where adding more names might not clarify the implementation. In general, though, my personal experience has been one of not seeing things named enough. Specifically, feature creep in software tends to try to add code with a light touch without disturbing too much of the surrounding code, but with new concepts that deserve more naming than they get. This can and does lead to code that is difficult to maintain, and I think I’ve seen more of that mistake than of naming things too much, and I suspect it’s much easier to not just shoot yourself in the foot, but cut your leg off, by under-naming rather than by over-naming.
- pgt 7y agoExcel is the most popular functional programming language in the world. Its killer feature is that you don’t have to name your values before you can use them.
- superdimwit 7y agoWell, it just has a cartesian namespace
- tombert 7y agoI'd argue that its killer feature is that everything is inherently reactive.
- carapace 7y agoPoint free form? Ditch your variable names. > It is very common for functional programmers to write functions as a composition of other functions, never mentioning the actual arguments they will be applied to. https://wiki.haskell.org/Pointfree https://wiki.haskell.org/Pointfree > We are going to use named variables to keep track of the arguments, then write a definition without them. http://joypy.osdn.io/notebooks/Quadratic.html http://joypy.osdn.io/notebooks/Quadratic.html