Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Named parameter
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== With chained method calls === In [[object-oriented programming]] languages, it is possible to use [[method chaining]] to simulate named parameters, as a form of [[fluent interface]]. Each named-parameter argument is replaced with a method on an "arguments" object that modifies and then returns the object. In C++, this is termed the ''named parameter idiom''.<ref>C++ FAQ, [http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.20 10.20 What is the "Named Parameter Idiom"?]</ref> The object may then be passed to a function that uses the arguments it contains. [[Method chaining]] is often used in conjunction with the [[builder pattern]] as a way to override default values provided by the builder class.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)