2 ms·
I'm not claiming that it's a good definition, and I won't try to defend it. It may also not be my definition of FP tomorrow. :) But my very point was that FP ha
by gmfawcett 7y ago
I'm not claiming that it's a good definition, and I won't try to defend it. It may also not be my definition of FP tomorrow. :) But my very point was that FP has a multitude of subjective definitions, at least in general conversation, so differences of opinion are always to be expected.
It's interesting that, while Ada is imperative, SPARK contract annotations aren't. I won't take up the challenge, but I think someone could argue that SPARK-minus-Ada may indeed be functional (although SPARK-minus-Ada is no longer a programming language).
- MaxBarraclough 7y ago'SPARK-minus-Ada' would be 'constraint programming' [0]. I agree with Wikipedia's taxonomy: constraint programming isn't functional programming. In functional programming, we can't just describe the problem, we still have to implement an algorithm. Not so with constraint programming. That's a bright line between the two. I don't agree that functional programming is uniquely difficult to define. Again, I agree with Wikipedia, which offers a definition that seems fine: [Functional programming] treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. [1] It's true that we can disagree on whether immutability, or function composition, should be considered the true crux of functional programming. This isn't unique to FP though. In the object-oriented world, some consider inheritance to be the heart of OOP, and some consider dynamic-dispatch to be what really counts. [3] > SPARK-minus-Ada is no longer a programming language I think I agree, but I think we're in a minority (we seem to disagree with Wikipedia here). If you're working at a level of abstraction so high that you no longer think about algorithms, you aren't really 'programming'. 'Constraint programming'... isn't. The 'programmer' isn't really programming, they're writing a formal problem-description. Formal specification languages like B-Method [4] aren't considered programming languages, for the same reason. [0] https://en.wikipedia.org/wiki/Constraint_programming https://en.wikipedia.org/wiki/Constraint_programming [1] https://en.wikipedia.org/wiki/Functional_programming https://en.wikipedia.org/wiki/Functional_programming [3] https://news.ycombinator.com/item?id=21849366 https://news.ycombinator.com/item?id=21849366 [4] https://en.wikipedia.org/wiki/B-Method https://en.wikipedia.org/wiki/B-Method