Talk:Named parameters: Difference between revisions

Content added Content deleted
m (→‎REXX examples: answered some queries.)
Line 16: Line 16:
==REXX examples==
==REXX examples==
Do the REXX examples actually complete the task? Is it idiomatic REXX? do the docs for "normal" function calls in the language mention any of those solutions? Might it be better to just omit REXX? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:26, 2 July 2014 (UTC)
Do the REXX examples actually complete the task? Is it idiomatic REXX? do the docs for "normal" function calls in the language mention any of those solutions? Might it be better to just omit REXX? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:26, 2 July 2014 (UTC)

: Yes, the REXX examples actually complete the task, although ''named parameters'' aren't normally used in REXX as it's a somewhat bulky method to do in the manner specified.   Most often, because of the manner the (original) host (operating system) passes arguments (parameters) to a REXX program, lends itself to specifying options (parameters) followed by a value (with no intervening equal sign, and the order of the arguments isn't important. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:59, 2 July 2014 (UTC)

: Yes, it is idiomatic REXX.   (That begs a question, must every solution have to idiomatic?)   REXX is a minimalistic language and many techniques aren't necessarily documented as solutions.   Being so minimalistic, there are often numerous ways to skin a cat (as the various language versions attest to).   Named parameters is a specific method of passing parameters in REXX (but hardly used as the manner of this Rosetta Code task).   Of what I've observed of the many REXX publications (from different vendors/authors), it isn't in the nature to mention specific types of solutions in function calling (invocation).   However, there are some excellent publications on various techniques in using the REXX language to address all manners of problems. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:59, 2 July 2014 (UTC)

: No, the REXX documentation(s) for function calls don't give solutions;   the various docs (that I've seen) for REXX show the syntactical format of functions (the built-in ones) and their various arguments, what the functions do, which arguments are optional (and can be omitted), and if any of the arguments have a default value.   Note that some BIF functions in REXX perform different things based on the number of arguments, or most often, specific options;   this is in its philosophy of a minimalistic language.   It isn't the nature of the REXX manuals that I've read to give solutions in how to use any particular function (BIF or user written), but to explain the language (syntax) of the (BIF) function and its arguments.   Also, I don't know what "normal" function calls are in this context, unless you mean BIFs instead of user written functions.   I wouldn't know what an abnormal function call would look like.   There are only two ways to call a function, explicitly via a '''call''' verb, or as a function.   Well, there is a third way, to perform/invoke/execute the function as if it was a "system/user command", and have the host (operating system) invoke the function/program as if it was a regular program (that returns a value, like a function).   I hope we won't be tripping up on the definition of routine versus a function, at least as far a REXX is concerned). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:59, 2 July 2014 (UTC)

: I don't see why it would be better to (just) omit REXX, especially as there are two solutions posted.   I thought the whole point of Rosetta Code is to show how other languages solve a particular task, even if the solutions may not be understood, idiomatic, or look pretty. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:59, 2 July 2014 (UTC)