Hacker News new | past | comments | ask | show | jobs | submit login

Great post. I would even go as far as to amend your last comment to be closer to its inspiration:

> Code only those things that your grandparents would have coded

Software has been around long enough that some people's grandparents were coding, but due to the limitations of many of the systems at the time, functional, simple programs were often the craziest they could get.




My impression of early coding (could be wrong) is that you mostly couldn't afford to write in functional terms, because you had to carefully manage things like memory usage. Assembly, at least, is about as far from FP as you can get


Not in practical terms - by their very nature, registers must be mutated during a non-trivial program. Still - processor instructions are functional by nature: for example, an ADD op requires two register inputs and one register output. The assembly I worked with in university also includes the ability to create callable procedures. So even when designing assembly code, it pays to think in functional terms, although as stated earlier, registers are mutable by nature. My point was the constraints of the time kept developers from making things too complicated, so their programs often followed functional like, simple designs - see the POSIX utilities for example.

Still, Lisp was created in 1958 [0], so it's definitely likely some folks grandparents were programming in it :)

[0] https://en.wikipedia.org/wiki/Lisp_(programming_language)


My grandma wrote FORTRAN in the 60s, and my grandpa wrote COBOL in the 70s. They both expressed quite a bit of bewilderment in describing their experiences there.


My grandfather wrote BASIC programs for the TRS-80, so I'm not sure I would necessarily agree with that sentiment. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: