Talk:Functional programming: Difference between revisions

Content deleted Content added
m Archiving 3 discussion(s) to Talk:Functional programming/Archive 3) (bot
 
(10 intermediate revisions by 8 users not shown)
Line 1:
{{Article history
{{ArticleHistory
|action1=FAC
|action1date=22:12, 21 June 2006
Line 26:
|topic=Engtech
}}
{{WikiProject banner shell|class=B|vital=yes|1=
{{Vital article|level=4|topic=Technology|class=C}}
{{WikiProject Spoken Wikipedia |1=En-Functional_programming.ogg |2=446744874}}
{{WikiProjectBannerShell |1=
{{WikiProject Computing|importance=Top |software=y |software-importance=Top |science=y |science-importance=Top}}
{{WikiProject Spoken Wikipedia |1=En-Functional_programming.ogg |2=446744874}}
{{WikiProject ComputingComputer |class=B |importance=Top |software=y |software-importance=Top |science=y |science-importance=Top}}
{{WikiProject Computer science |class=B |importance=Top}}
}}
{{User:MiszaBot/config
Line 45 ⟶ 44:
}}
 
== Letters between Beckus and Dijkstra ==
== External links modified ==
The section about Beckus delivering a Turing Award lecture about FP should also include the letters surrounding that period between Dijkstra & Beckus. https://medium.com/@acidflask/this-guys-arrogance-takes-your-breath-away-5b903624ca5f <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/144.6.170.230|144.6.170.230]] ([[User talk:144.6.170.230#top|talk]]) 09:35, 30 March 2025 (UTC)</small> <!--Autosigned by SineBot-->
 
Hello fellow Wikipedians,
 
I have just modified 2 external links on [[Functional programming]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=804419999 my edit]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
*Corrected formatting/usage for http://www.aquabu.com/2008/02/16/fibonacci-sequence-recursion-in-erlang
*Added archive https://web.archive.org/web/20110629183752/http://www.mactech.com/articles/mactech/Vol.03/03.1/SchemeWindows/index.html to http://www.mactech.com/articles/mactech/Vol.03/03.1/SchemeWindows/index.html
 
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
 
{{sourcecheck|checked=false|needhelp=}}
 
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 22:04, 8 October 2017 (UTC)
 
== [[Idempotent]] or [[injective]]? ==
Any thoughts on [https://en.wikipedia.org/w/index.php?title=Functional_programming&diff=892619256&oldid=892561226 this]?
 
''"Removed the inaccurate use of idempotent. Having the same function output for a value x is injectivity, not idempotency. The article declared that calling f twice with the same value x produces f(x) each time. This is just a claim on uniqueness. This is equivalent to saying that: for x, y in D and function f: D -> co(D), that if f(x) = f(y), then x=y. This is precisely injectivity. If functional languages acted as f(f(x)) = f(x), then for any value x, a function of x would be identical to its..."''
 
{{ping|2600:1009:B112:79C8:75D8:597D:23FC:A3A4}} [[User:Andy Dingley|Andy Dingley]] ([[User talk:Andy Dingley|talk]]) 21:22, 15 April 2019 (UTC)
 
{{ping|Andy Dingley}} it's neither. The article wants to say that if ''x'' ''f'' ''y'' and ''x'' ''f'' ''z'', then ''y'' = ''z''. That is, it satisfies the properties of [[Function (mathematics)|functions in mathematics]].
 
On the other hand:
 
* [[Idempotent]] means f(f(x)) = f(x).
* [[injective]] means if f(a) = f(b), then a = b. In the relational notation, if ''a'' ''f'' ''c'' and ''b'' ''f'' ''c'', then ''a'' = ''b''. Notice that this is in the other direction of the function properties I described above.
 
These two are irrelevent. So yes, this should be changed. --[[User:Nullzero|Nullzero]] ([[User talk:Nullzero|talk]]) 19:36, 9 September 2019 (UTC)
 
== Coding Styles section mostly detracts ==
Line 86 ⟶ 58:
:: Agreed. It provides no value at all. As it currently exists, it simply encourages people to add their own favorite languages to the list. I will remove the section. --[[User:Nullzero|Nullzero]] ([[User talk:Nullzero|talk]]) 21:57, 28 April 2020 (UTC)
 
== Criticism section ==
== Would anyone mind if I add an example for R? ==
 
> Functional programming is also key to some languages that have found success in specific domains, like JavaScript in the Web.
Functional Programming is such a core aspect of R and how R is different. I read this article and thought it was a little sad that there was not example for R. Can I add one?
The simple example would be this:
{{Syntaxhighlight|code=fibonacci <- function(n){
x = numeric(n)
x[1:2] = c(1,1)
for(i in 3:n)
x[i] = x[i-1] + x[i-2]
return(x)}
 
This is rather opinionated and poorly reflected in the current state of the art in Javscript. Javascript tends to be massively used as OOP and not functional despite some trends going on. \\ <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/2A01:E0A:5D3:2650:51F0:F3D2:7D33:13D8|2A01:E0A:5D3:2650:51F0:F3D2:7D33:13D8]] ([[User talk:2A01:E0A:5D3:2650:51F0:F3D2:7D33:13D8#top|talk]]) 11:19, 21 November 2021 (UTC)</small> <!--Autosigned by SineBot-->
fibonacci(10)}}
As the syntax implies there is no non-functional version of the basic function in R. R simply assumes.
 
Historically R as Hadley writes in advance R (https://adv-r.hadley.nz/), R actually started out as a '''pure functional programming''' that by the necessity of statistics became impure in order to add objects and classes that were mutable.
mlane --[[Special:Contributions/2600:1700:F840:1E40:6DE5:E5C1:F398:6CCC|2600:1700:F840:1E40:6DE5:E5C1:F398:6CCC]] ([[User talk:2600:1700:F840:1E40:6DE5:E5C1:F398:6CCC|talk]]) 22:22, 7 June 2019 (UTC)
 
== Criticism section ==
 
I've reverted the criticism section for now. I think a criticism section certainly is a good idea, but I don't really understand any of the points in the current one, and it doesn't have any references. If anyone can provide clarification or references for these points that would be much appreciated ({{ping|35.137.225.220}}).
Line 134 ⟶ 93:
 
:: I feel like FP terminology is not complex when you use it to ''compute''. It only becomes complex when, ironically, you use it to do category theory, with all complexity coming from category theory. Just my 2 cents. --[[User:Nullzero|Nullzero]] ([[User talk:Nullzero|talk]]) 03:28, 26 May 2020 (UTC)
 
== Lead section ==
 
The last paragraph of the lead section is way too heavy on citations. Do we really need a citation from 1987 on how to program a text editor? What is that doing there anyway (ref name="hartheimer1987")? Honestly, there should be no citations in a lead section, unless something is so controversial it causes a knee-jerk reaction from newbies to add a citation needed tag without first checking the body of the article. See [[WP:LEAD]]. Please get rid of most of them, the article will be easier to deal with. -- [[User:GreenC|<span style="color: #006A4E;">'''Green'''</span>]][[User talk:GreenC|<span style="color: #093;">'''C'''</span>]] 18:24, 16 May 2024 (UTC)
 
== Remain focused on functional programming ==
 
If no one objects I'm going to clean up sections that discuss points unrelated to function vs. other paradigms. For example, the start of Abstraction compared the time it takes to execute an even() call vs calling the mod operator directly. On one compiler. For a language which compiles to java bytecode and was then tested on one jre/jvm. Even if this comparison was more thorough, I don't see how this in any way relates to a definition of functional programming or a comparison to other paradigms. [[User:Dontfunkintellme|Dontfunkintellme]] ([[User talk:Dontfunkintellme|talk]]) 15:14, 29 March 2025 (UTC)