Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #684

Re: proposal : keyword default

Message-ID <l3bqlm$ro7$1@dont-email.me> (permalink)
Newsgroups comp.std.c++
From Edward Diener <eldiener@tropicsoft.invalid>
Subject Re: proposal : keyword default
Organization A noiseless patient Spider
References (2 earlier) <FOOdncbkK9Y5uNPPnZ2dnUVZ_sKdnZ2d@earthlink.com> <l2nojk$10h$1@dont-email.me> <u-ydncvlzM5_7szPnZ2dnUVZ7qydnZ2d@bt.com> <l2ucul$tg3$1@dont-email.me> <3fa2e85e-550f-4efc-ba6a-e522852dc322@googlegroups.com>
Date 2013-10-12 11:36 -0600

Show all headers | View raw


On 10/12/2013 5:47 AM, Helmut Zeisel wrote:
>
> Am Montag, 7. Oktober 2013 22:10:01 UTC+2 schrieb Edward Diener:
>> On 10/7/2013 3:50 AM, Francis Glassborow wrote:
>
>>> If you stop to consider it, it should be clear that this would have
>>
>>> been considered right at the start of the design of default arguments
>>
>>> for C++. It wasn't that it was hard to do, so there must have been
>>
>>> other reasons (I am pretty sure they will have been mentioned
>>
>>> somewhere in 'The Design and Evolution of C++')
>>
>>
>>
>> You may be crediting Mr. Stroustrup with too much foresight. Nonetheless
>>
>> if you have any particular discussion to cite about this in D&E or
>>
>> otherwise I would be glad to peruse it.
>
> Maybe Francis Glassborow refers to 6.5 "Examples of Proposed
> Extensions", 6.5.1 "Keyword Arguments".
>
> The last paragraph is
>
> "My main worry about keyword arguments was actually that keyword
> arguments might slow the gradual transition from traditional
> programming techniques to data abstraction and object-oriented
> programming in C++. In code that I find best written and easiest to
> obtain, long argument lists are very rare".
>
> IMHO the same can be said about the proposed keyword default and the
> same alternatives as in Chapter 6.5.1.1 can be used.

What does using default arguments in functions and templates have to do
with long argument lists ?

What do default arguments have to do with keyword arguments in other
languages ?

Since default arguments exist in many APIs why would not C++ make it
easier for the programmer to specify them ? Is it somehow good for
programmers to have to re-specify a default argument just so they can
override some later default argument ? I do not think so. Yet if someone
comes along suggesting a better way, as in just leaving out the argument
entirely or writing 'default' it is criticized as no doubt being too
easy or too confusing or something that is not going to happen. It is
clear to me that people are not thinking about ease of use of the
language but just maintaining/accepting the status quo, as if to say
that "real programmers" should not have things made easier for them and
it is good/healthy for them to have the language harder than it need be.


-- 
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: proposal : keyword default alexander.stoyan@googlemail.com - 2013-10-03 13:25 -0600
  Re: proposal : keyword default Daniel Krügler <daniel.kruegler@googlemail.com> - 2013-10-04 11:19 -0700
  Re: proposal : keyword default "Paul D. DeRocco" <pderocco@ix.netcom.com> - 2013-10-04 11:58 -0700
    Re: proposal : keyword default Bo Persson <bop@gmb.dk> - 2013-10-05 19:19 -0700
      Re: proposal : keyword default Edward Diener <eldiener@tropicsoft.invalid> - 2013-10-07 01:50 -0600
    Re: proposal : keyword default Edward Diener <eldiener@tropicsoft.invalid> - 2013-10-05 19:19 -0700
      Re: proposal : keyword default Francis Glassborow <francis.glassborow@btinternet.com> - 2013-10-07 01:50 -0600
        Re: proposal : keyword default Edward Diener <eldiener@tropicsoft.invalid> - 2013-10-07 15:05 -0600
          Re: proposal : keyword default James Kuyper <jameskuyper@verizon.net> - 2013-10-08 12:36 -0700
          Re: proposal : keyword default Helmut Zeisel <zei2011@liwest.at> - 2013-10-12 03:47 -0600
            Re: proposal : keyword default Edward Diener <eldiener@tropicsoft.invalid> - 2013-10-12 11:36 -0600
              Re: proposal : keyword default ootiib@hot.ee - 2013-10-12 23:10 -0600
              Re: proposal : keyword default John Harris <niam@jghnorth.org.uk.invalid> - 2013-10-13 11:33 -0600
                Re: proposal : keyword default Edward Diener <eldiener@tropicsoft.invalid> - 2013-10-16 10:34 -0600
              Re: proposal : keyword default Helmut Zeisel <zei2011@liwest.at> - 2013-10-14 20:37 -0700
  Re: proposal : keyword default Alexander Terekhov <terekhov@web.de> - 2013-10-18 01:20 -0600

csiph-web