3 ms·
Recently had a conversation on how functional programming and declarative programming were somewhat linked, and how i observed that languages that started to go
by bsaul 7y ago
Recently had a conversation on how functional programming and declarative programming were somewhat linked, and how i observed that languages that started to go down the functional road slowly tried to add more and more capabilities for DSLs, and then slowly moved toward becoming a lisp. But that was just my feeling.
is this theorized somewhere ? Or am i just dreaming ?
- try_again 7y agoA well-known quote is that whoever doesn't understand Lisp is doomed to reinvent it: http://lambda-the-ultimate.org/node/2352 http://lambda-the-ultimate.org/node/2352
- deepaksurti 7y agoGreenspun tenth rule may come into play here [1] [1] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
- dgb23 7y agoAnecdotal experience: (dynamic) functional programming enables very 'easy' succinct abstractions through combing out concretions and composing functions out of a general tool-set. Think code-reuse in the small. With some discipline you naturally end up with a very data-oriented codebase, where the specificity of your application/library ends up in your data-structures. Now these data-structures are really just plain data, without specific behavior attached to them, so they embody the (maybe almost) declarative part of your program/system. The next step would be to polish them to make them more human readable. An additional feature of Lisps is their homoiconicity and macros. These come into play when plain data-structures are not the right fit anymore. Typically you want to handle some user/client defined behavior. You can now transform the syntax of the language itself to clean up your API to reduce boilerplate and increase readability. In a sense you have now programmed your own DSL.