Talk:First-class functions: Difference between revisions

 
(7 intermediate revisions by 3 users not shown)
Line 112:
# In C, a function is just a block of machine instruction. When calling it, you take the address and push it onto stack; a function pointer is... the address of that block of instructions, which when called gets pushed onto the stack. There isn't much of a distinction here.
# The hack code doesn't return existing function pointers. The function body, a blob of machine code, really gets duplicated and stored somewhere, with some key stack variables modified according to the need, and that's why it's nasty and unportable. Calling the hack "function pointer" does not help understanding the situation. --[[User:Ledrug|Ledrug]] 05:25, 15 July 2011 (UTC)
 
:In many discussions on first-class functions the line seems to be drawn to ''exclude'' the [[wp:Talk:First-class function|C language]] capabilities as being too "low-level". Other languages gain merit for hiding the underlying mechanisms a bit more. I have tried to highlight what makes a first-class function in many minds is that functions are used as naturally as other types in the language by also creating the task [[First-class functions/Use numbers analogously]], but I realise that it is only an attempt. (Someone could use a numbers in a convoluted way just to match what ''needs'' to to be done for functions for example). --[[User:Paddy3118|Paddy3118]] 06:02, 15 July 2011 (UTC)
 
:: Of course functions are not first class in C, hence the code being not portable, I'm not disputing that. But what the code does isn't what one'd normally call a "function pointer" either, that's what the other C code did. If you cared enough to correct the heading, might as well use a ''correct'' heading. "Non-portable function body duplication" or some such would be much more accurate. --[[User:Ledrug|Ledrug]] 06:57, 15 July 2011 (UTC)
 
::: I've changed it. --[[User:Paddy3118|Paddy3118]] 09:03, 15 July 2011 (UTC)
:::: Thanks. --[[User:Ledrug|Ledrug]] 00:08, 16 July 2011 (UTC)
:::::With the widespread availability of [https://en.wikipedia.org/wiki/W%5EX W^X], this dirty hack is not going to work on (m)any platform. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 23:54, 17 February 2019 (UTC)
 
==<math> and <big> tags in REXX contribution still need attention==
 
: A combination of <math> and <big> tags in the Rexx contribution, formerly causing invisibility in most browsers, is still triggering a MediaWiki processing error and a syntactically ill-formed piece of HTML at one point, though the removal of superfluous space from <math> tag contents has now restored basic visibility.
: Please test in a majority-type browser (one like Chrome, Safari, IE/Edge which displays a graphic file for formulae, rather than the minority type like Firefox, which uses MathML processing when requisitte fonts are installed), and tidy up the formatting tags immediately after the phrase '''"Tangent begins its period at"'''. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:57, 24 September 2016 (UTC)
 
:: Repaired today [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 20:17, 13 November 2016 (UTC)
1,336

edits