6 ms·
always wonder why functional languages or constructs are often described as being beautiful or using other aesthetic terms. just strange that they are the only
by workthrowaway 7y ago
always wonder why functional languages or constructs are often described as being beautiful or using other aesthetic terms. just strange that they are the only ones we ascribe such attributes, among the few paradigms and the many coding styles out there.
- mlevental 7y agothis is a pet peeve of mine - the use and abuse of humanist terms in stem. you see this a lot in a math - beautiful proofs, beautiful formulas, etc. I think it's a really weird perverse even thing to look at something purely formal (mechanical) and call it beautiful - like brutalist architecture - I think it says something about the person making the claim (that they appreciate structure to an inhuman extent).
- cstpdk 7y agoThis is quite an elitist position to take. Why is it inhumane to find beauty in structures? Human society is riddled with structure
- sweeneyrod 7y agoI think the exact opposite; an aesthetic sense for proofs/code is usually required to be a good mathematician/ programmer.
- jlg23 7y agoHow should it have been phrased?
- tmountain 7y agoHumans naturally associate aesthetic qualities with all sorts of things. An appreciation for the things around you makes life richer. Maybe you don't like the word beautiful in this context (or feel like it's overused), but I wonder if you'd argue with using the word elegant to describe something like quicksort or a cleverly composed fibonacci function? Beauty takes many forms, and getting hung up on nomenclature seems silly TBH. Characterizing this appreciation as perverse and inhuman is essentially taking offense to someone else's enjoyment in something they appreciate. Seems pointless.
- mlevental 7y agoelegant is fine. beauty and elegance aren't the same thing. >Characterizing this appreciation as perverse and inhuman is essentially taking offense to someone else's enjoyment in something they appreciate. Seems pointless. it's a humanist critique of the use of language for rhetorical purposes...? the purpose is exactly to investigate what the significance of that particular word choice is.
- fnordsensei 7y agoDoes elegance describe well-defined observable properties that are independent of the observer? The point being, that if not, we're still within the domain of the subjective. It seems arbitrary to allow one set of subjective descriptions and disallow another.
- mlevental 7y agoelegant: "the quality of being pleasingly ingenious and simple; neatness." definitely less subjective than beautiful. and it's not arbitrary - i've alluded to an argument that can be made. i'm not going to spell it out because as usual no one on here is receptive anything that doesn't valorize stem.
- jjuel 7y agoBeauty: "a combination of qualities, such as shape, color, or form, that pleases the aesthetic senses, especially the sight." So I cannot like the shape or form when I look at a proof or function? I cannot have my aesthetic senses pleased by looking at STEM field things?
- mlevental 7y agoi'm sorry but what is the shape or form of a proof? a function maybe - and calligraphy is certainly an art but what's wholly different from what the function encodes.
- jakeinspace 7y agoSoftware is written and maintained by humans. Buildings are designed and lived in by humans (I happen to like many brutalist buildings). They are not purely formal, they need to have psychological appeal; pathos + logos.
- TrackerFF 7y agoI like elegance. Beauty is highly subjective, but I think elegance is more focused on simplicity and efficiency - though still tied up to beauty. Basically; If someone says that something is beautiful, it's pretty much in the eye of the beholder. If someone shows that something is very simple but effective, it's much harder to argue against. If a line of code can replace a block of code efficiently, while still maintaining readability and cleanness, then that's something I would call elegant code.
- mlevental 7y agoelegant is a fine word: "the quality of being pleasingly ingenious and simple; neatness."
- ashtonbaker 7y agoI don't think it's clear at all that the natural grouping or division should be "STEM" vs "humanities". I think that mathematics belongs much closer to the humanities, especially philosophy and aesthetics, than to science or engineering.
- mruts 7y agoMost colleges give you a BA for mathematics not a BS, btw (to reinforce your point). Which I think makes sense. Conputer science for some reason usually nets you a BS though, despite not being related to science in the least bit (and almost the same as math).
- mruts 7y agoWait, so according to you, what can be called beautiful? Only people and maybe animals I guess?
- BasDirks 7y agoIsn't appreciation of structure _precisely_ human?
- cstpdk 7y agoI have, evidently to too small a circle of people, described several non-FP coding styles and paradigms using aesthetic terms such as "ugly"
- pure-awesome 7y agoThe way I understand the parent comment (and I am open to correction), the question is why do we specifically describe functional programming with terms such as 'beautiful' - why do we not use say 'beautiful' for paradigms such as object-oriented, or aspect-oriented, or event-driven?
- foxes 7y agoPeople find order and structure attractive. Functional programming is associated to that. I feel like functional programming - maybe more from a categorical perspective - is good at generalising and capturing lots of ideas cleanly. For example you could think of object-oriented programming as using comonads - Haskell is an object oriented language! :). I feel like that power to connect ideas, and see how they fit into some "larger" structure is what is beautiful. Being able to say what is "really" going on behind the scenes (yeah well really you are just using monads to do x...), being able to draw connections, and then use that to potentially discover new ideas is what is attractive. Usually other programming paradigms are not constructed from a more rigorous mathematical perspective, but if its a good idea, don't be suprised if you cant describe it with fp.
- UK-Al05 7y agoI would read the john backus turing award lecture to see why people have such appreciation of functional programming. In short it's makes it easy to compose things, using a simple core language.
- dunefox 7y agoIIRC is talking about function programming in the sense of J, not about functional programming in the sense of Haskell.
- mattmcknight 7y agoI have actually had similar appreciation for Ruby, and humane interfaces in general. Beauty can be misleading, as suggested in "Lost in Math: How Beauty Leads Physics Astray" https://www.amazon.com/dp/B0763L6YR7/ https://www.amazon.com/dp/B0763L6YR7/
- szemet 7y agoMy suspicion is that people like declarative better than imperative. When a program reads as a definition it seems to be much more innocent than a bunch of commands. Same split between descriptive/theoretical, and applied science. The first just increase knowledge - pure innocence without side-effects - the second may build bombs. (But in the end both functional programs, and pure knowledge made with the intention to go through some interpreter with side-effects (computer/human) anyway...)
- the_af 7y agoI don't think it's exclusive to FP. I've read many times people describing Lisp, Ruby and Python code as "beautiful".
- mlthoughts2018 7y agoUsually people who talk like this haven’t dealt with functional programming in the real world. I fell in love with the beauty of functional programming in grad school. After using Haskell in a real business setting for many years, no thanks. The code and headaches and weird bugs are just as bad as with any other language or paradigm. The type checking doesn’t actually help you to create functionally correct systems at all (let alone the false claims that it makes this process faster). Putting designs into the type system doesn’t matter. It’s little more than a useful mind-expanding way to think about code, but ultimately just as applicable to other paradigms. Mutating state is very often the right tool for the job. Plenty of experienced functional programmers write immutable, pattern-focused functional programming implementations that are full of bugs, confusing misdirection, unsafe handling of data, etc. Library support is still insanely poor compared with C/C++, Python and Java. You have to insanely careful not to allow architectural astronauts to build out inscrutable systems that satisfy their weird personal opinions about aesthetics or interface design. Hiring more engineers is super hard. Building in safety for when senior engineers choose to leave is even harder. Integrations with emerging technologies like new database systems or new statistical packages always lags way behind other languages and usually exists in some half-finished form that depends on labor of love from some isolated hobbyist. In terms of basic business decision making, I cannot recommend enough to avoid functional programming.
- jimbokun 7y ago> Integrations with emerging technologies like new database systems or new statistical packages always lags way behind other languages and usually exists in some half-finished form that depends on labor of love from some isolated hobbyist. This really sets Clojure apart from Haskell, in that you can use any Java library with almost zero friction.
- mlthoughts2018 7y agoI don’t have experience in Clojure but I do have experience in Scala where this claim is also made often. In Scala anyway, it’s totally false. Firstly there’s just a huge impedence mismatch between code relying on Scala features and code serving as a Java wrapper into Scala. But even just the basic usage of the libraries doesn’t always work. I very nearly quit a job once just from the incredible frustration of trying to use JFreeChart in Scala.