Talk:Function composition: Difference between revisions

doubts
No edit summary
(doubts)
Line 3:
::I.e. this is possible only for languages that have [[First-class functions]] (by the way, it seems like this task is already covered by showing that the language has first class functions in [[First-class functions]] task page) --[[User:ShinTakezou|ShinTakezou]] 11:27, 4 March 2009 (UTC)
:::Thats right, it is another aspect of first class functions but there is no need to show functions as members of other collection types. Some languages may be able to do this and not First Class Functions. --[[User:Paddy3118|Paddy3118]] 15:48, 4 March 2009 (UTC)
::Let me show another doubt of mine. What a function ''is'' for a language, is definible inside the same language; C can deal naturally with pointers, and we pass ''function'' to e.g. other functions by pointer (reference?); so foo(bar) call foo with argument bar (by the way, "calling a subroutine" for compiled languages means always to know its address, even at the end of the games a run-time, such the one of Objective-C when "finding" the code for a selector, ''compute'' the address of other compiled code...), and "foo" ''is'' the function (which C handles by pointer). So this task, if the right constraint of [[First-class functions]] is dropped (exactly the first: "New functions can be created from others at run time"), can be implemented in C. If it is not droppable, languages can accomplish this task iff they "have" first class functions. Am I reasonably right? --[[User:ShinTakezou|ShinTakezou]] 16:23, 4 March 2009 (UTC)