Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #84323 > unrolled thread
| Started by | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| First post | 2022-05-29 02:59 +0200 |
| Last post | 2022-06-01 18:39 +0200 |
| Articles | 20 on this page of 157 — 19 participants |
Back to article view | Back to comp.lang.c++
Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 02:59 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-05-29 05:46 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 08:03 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 08:34 +0200
Re: Wikipedia Öö Tiib <ootiib@hot.ee> - 2022-05-29 01:36 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 10:37 +0200
Re: Wikipedia Öö Tiib <ootiib@hot.ee> - 2022-05-29 02:09 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 11:16 +0200
Re: Wikipedia Öö Tiib <ootiib@hot.ee> - 2022-05-29 03:08 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 12:44 +0200
Re: Wikipedia Paavo Helde <eesnimi@osa.pri.ee> - 2022-05-29 16:05 +0300
Re: Wikipedia Freethinker <freethinker@mymail.com> - 2022-05-29 15:19 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 15:27 +0200
Re: Wikipedia Manu Raju <MR@invalid.invalid> - 2022-05-29 17:26 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 19:18 +0200
Re: Wikipedia scott@slp53.sl.home (Scott Lurndal) - 2022-05-29 17:49 +0000
Re: Wikipedia Manfred <noname@add.invalid> - 2022-05-30 00:25 +0200
Re: Wikipedia Popping Mad <rainbow@colition.gov> - 2022-06-04 13:00 -0400
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-04 19:19 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 11:48 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-05-30 06:06 +0000
Re: Wikipedia Popping Mad <rainbow@colition.gov> - 2022-06-04 13:02 -0400
Re: Wikipedia Manu Raju <MR@invalid.invalid> - 2022-05-29 17:18 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-29 18:22 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-05-30 06:08 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-31 04:41 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-05-30 06:06 +0000
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-30 19:31 +0100
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-30 19:52 +0100
Re: Wikipedia Manfred <noname@add.invalid> - 2022-05-31 14:34 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-31 15:15 +0200
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 18:00 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-31 19:06 +0200
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 18:43 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-31 19:48 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 09:26 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 09:44 +0200
Re: Wikipedia Öö Tiib <ootiib@hot.ee> - 2022-06-01 01:47 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 13:53 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 17:05 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 17:06 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-02 04:57 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 07:43 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-02 08:53 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 12:56 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-02 12:46 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 14:56 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:14 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 06:19 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:26 +0000
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-06-03 14:22 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 15:34 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 07:24 -0700
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 14:56 +0000
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 08:06 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-03 17:30 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 10:37 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-03 20:33 +0200
Re: Wikipedia scott@slp53.sl.home (Scott Lurndal) - 2022-06-03 18:59 +0000
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 12:35 -0700
Re: Wikipedia Freethinker <freethinker@mymail.com> - 2022-06-03 23:42 +0200
Re: Wikipedia Muttley@dastardlyhq.com - 2022-06-04 08:10 +0000
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 11:59 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-04 15:27 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-04 15:31 +0000
Re: Wikipedia Manfred <noname@add.invalid> - 2022-06-03 17:02 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 08:11 -0700
Re: Wikipedia "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-06-03 14:23 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 14:58 +0200
Re: Wikipedia Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-06-04 08:00 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-02 16:00 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 16:09 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 16:14 +0200
Re: Wikipedia Popping Mad <rainbow@colition.gov> - 2022-06-04 13:20 -0400
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-04 19:23 +0200
Re: Wikipedia Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2022-06-02 04:40 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 14:00 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-02 12:47 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-02 14:59 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:17 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 06:20 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:27 +0000
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-02 16:13 +0200
Re: Wikipedia Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-06-02 10:09 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-02 22:35 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:22 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 06:23 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:28 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 06:35 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 05:22 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 07:23 +0200
Re: Wikipedia "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-06-02 22:25 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 07:28 +0200
Re: Wikipedia "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-06-02 22:31 -0700
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 06:22 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 08:38 +0200
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 10:14 +0000
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-03 06:32 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-03 15:35 +0200
Re: Wikipedia "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-06-03 14:12 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-03 10:31 +0200
Re: Wikipedia Manfred <noname@add.invalid> - 2022-06-02 19:12 +0200
Re: Wikipedia Popping Mad <rainbow@colition.gov> - 2022-06-04 13:09 -0400
Re: Wikipedia Manu Raju <MR@invalid.invalid> - 2022-06-02 17:54 +0100
Re: Wikipedia Paavo Helde <eesnimi@osa.pri.ee> - 2022-06-02 20:40 +0300
Re: Wikipedia Manu Raju <MR@invalid.invalid> - 2022-06-02 18:50 +0100
Re: Wikipedia Juha Nieminen <nospam@thanks.invalid> - 2022-06-03 04:25 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 14:21 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 06:17 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 15:34 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 07:13 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 16:55 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 16:29 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 16:56 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 07:58 -0700
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 17:07 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 17:50 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 18:11 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 17:41 +0200
Re: Wikipedia Manfred <noname@add.invalid> - 2022-06-01 17:42 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 09:12 -0700
Re: Wikipedia Manfred <noname@add.invalid> - 2022-06-01 18:35 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 18:36 +0200
Re: Wikipedia Manfred <noname@add.invalid> - 2022-06-01 18:59 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 19:04 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 10:04 -0700
Re: Wikipedia Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-06-07 08:28 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 21:22 +0200
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-01 13:43 -0700
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-02 10:07 +0200
Re: Wikipedia Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-06-07 08:21 -0700
Re: Wikipedia "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-06-10 07:18 -0700
Re: Wikipedia muttley@dastardlyhq.com - 2022-05-31 18:34 +0000
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 19:37 +0100
Re: Wikipedia muttley@dastardlyhq.com - 2022-05-31 18:42 +0000
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 20:00 +0100
Re: Wikipedia muttley@dastardlyhq.com - 2022-05-31 19:19 +0000
Re: Wikipedia Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 20:28 +0100
Re: Wikipedia muttley@dastardlyhq.com - 2022-06-01 18:07 +0000
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 20:28 +0200
Re: Wikipedia scott@slp53.sl.home (Scott Lurndal) - 2022-05-31 19:37 +0000
Re: Wikipedia Vir Campestris <vir.campestris@invalid.invalid> - 2022-05-31 21:27 +0100
Re: "std::" (was: Wikipedia) Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-05-31 21:17 +0100
Re: "std::" (was: Wikipedia) Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 06:33 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 09:34 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 05:40 +0200
Re: Wikipedia Manu Raju <MR@invalid.invalid> - 2022-05-31 17:18 +0100
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-05-31 18:25 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 09:38 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 09:46 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 10:16 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 10:21 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 17:13 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 17:15 +0200
Re: Wikipedia David Brown <david.brown@hesbynett.no> - 2022-06-01 18:12 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 18:18 +0200
Re: Wikipedia Bonita Montero <Bonita.Montero@gmail.com> - 2022-06-01 18:39 +0200
Page 3 of 8 — ← Prev page 1 2 [3] 4 5 6 7 8 Next page →
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-01 17:06 +0200 |
| Message-ID | <t77v9a$fqt$1@dont-email.me> |
| In reply to | #84431 |
Am 01.06.2022 um 17:05 schrieb David Brown: > On 01/06/2022 13:53, Bonita Montero wrote: >> Am 01.06.2022 um 10:47 schrieb Öö Tiib: >>> On Wednesday, 1 June 2022 at 10:45:12 UTC+3, Bonita Montero wrote: >>>>> The whole point of having standard library names in the "std::" >>>>> namespace is that new versions of C++ can have more functions, classes >>>>> and other identifiers added to /their/ namespace without conflicting >>>>> with user code. >>>>> ... >>>> >>>> You are also arguing with pseudo-reasons for the mental problems I >>>> told. The C++ Core Guidelines encourage to use "using namespace std". >>>> That's the whole story. >>> >>> You are misrepresenting the C++ Core Guidelines. You quote that: >>> <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf6-use-using-namespace-directives-for-transition-for-foundation-libraries-such-as-std-or-within-a-local-scope-only> >>> >>> It starts with "should be used sparingly" because of the very same >>> "pseudo-reason". >>> >>> | Reason: using namespace can lead to name clashes, so it should be used >>> | sparingly. >>> >>> These are your own mental problems that make you to misread it as >>> "should be used in every snippet that you ever write as soon as >>> possible". >>> Stop mirroring your mental issues to others as it is sad. >> >> "We assume knowledge of the standard library. For example, >> we use plain vector rather than std::vector." > > You misunderstand. That is in a description of the way the examples are > given, where they do this as a shortcut. Elsewhere, the guidelines > regularly use fully qualified names (like "std::vector"). They recommend this nonewhere.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-02 04:57 +0000 |
| Message-ID | <t79g0c$1sqg$1@gioia.aioe.org> |
| In reply to | #84416 |
Bonita Montero <Bonita.Montero@gmail.com> wrote: > "We assume knowledge of the standard library. For example, > we use plain vector rather than std::vector." Do you know every single name in the standard library? From a random list of names could you point out with accuracy which ones are used in the standard library and which ones aren't? How many programmers do you think would be able to do that? Also, as far as I know, no or almost no names in the std namespace are reserved for the compiler by the standard. Meaning that they are free to be used for other purposes in user code (as long as the user doesn't declare them in the std namespace). In other words, it's not wrong or non-standard conforming to create your own variables, functions or classes that have the same name as some standard library name. What do you think will happen when you use "using namespace std" and then use the unqualified names? Consider that these duplicate names may appear in third-party libraries. Consider that these duplicate names may appear in the future in such third-party libraries, breaking your code when the libraries are updated.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-02 07:43 +0200 |
| Message-ID | <t79ilr$8iv$1@dont-email.me> |
| In reply to | #84457 |
> Do you know every single name in the standard library? From a random list > of names could you point out with accuracy which ones are used in the > standard library and which ones aren't? How many programmers do you think > would be able to do that? No, but my compiler does and gives me an error if there are any name clashes. And in rare cases where I can't disambiguate a symbol which could be part of multiple namespaces I right-click the symbol and click "Go to definition" or "Go to declaration" and that is it. So where's the problem ?
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-02 08:53 +0000 |
| Message-ID | <t79tpd$n0b$1@gioia.aioe.org> |
| In reply to | #84458 |
Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Do you know every single name in the standard library? From a random list
>> of names could you point out with accuracy which ones are used in the
>> standard library and which ones aren't? How many programmers do you think
>> would be able to do that?
>
> No, but my compiler does and gives me an error if there are any name
> clashes. And in rare cases where I can't disambiguate a symbol which
> could be part of multiple namespaces I right-click the symbol and
> click "Go to definition" or "Go to declaration" and that is it.
> So where's the problem ?
Code should be readable and easy to understand even without using some IDE.
If the understandability of your code relies on the reader using an IDE,
it's not well-designed code.
If it's not clear from a name in the code that it's something from the
standard library, that only helps making the code harder to read and
understand.
When you use "using namespace std;" and never use the "std::" prefix,
your code is bound to break with newer versions of the C++ standard,
which might introduce that name in the standard library. Moreover,
as mentioned, a third-party library may introduce (inadvertently or
otherwise) a name in the global namespace that's the same as a name
in the std namespace, which can then potentially cause name clashes.
That might not happen when you are developing the code that uses that
third-party library, but it may happen if that third-party library is
later updated.
I can't think of any situation where "using namespace std;" would
actually introduce some benefit to the code, in terms of readability
or otherwise. I can think of plenty of examples of the opposite.
The only technical reason I can think of where bringing a name from the
standard library to the current scope might have validity is in generic
code that wants to allow the calling code to overload standard library
functions. (AFAIK) the standard doesn't allow user code to add anything
to the std namespace, so if the calling code would want to overload
some standard library function, it would need to be done in another
scope. For example like this:
template<typename Value_t>
void foobar(Value_t value)
{
using std::cos;
// Allows overloading cos() for a custom Value_t:
Value_t cosValue = cos(value);
// ...
}
But even then it's better to bring individual names to the current
scope rather than the entire std namespace.
(Let me make a prediction here: You will respond by saying that you didn't
read any of this. Prove me wrong.)
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-02 12:56 +0200 |
| Message-ID | <t7a50c$2r4$1@dont-email.me> |
| In reply to | #84462 |
Am 02.06.2022 um 10:53 schrieb Juha Nieminen: > Bonita Montero <Bonita.Montero@gmail.com> wrote: >>> Do you know every single name in the standard library? From a random list >>> of names could you point out with accuracy which ones are used in the >>> standard library and which ones aren't? How many programmers do you think >>> would be able to do that? >> >> No, but my compiler does and gives me an error if there are any name >> clashes. And in rare cases where I can't disambiguate a symbol which >> could be part of multiple namespaces I right-click the symbol and >> click "Go to definition" or "Go to declaration" and that is it. >> So where's the problem ? > > Code should be readable ... You have a very compulsive opinion of what is readable. You and some others here have an "occupational illness" of many programmers that feel uncertain. That helps to see more details, but these people see a lot of irrelevant details and have less capabilify to see com- prehensive relations among those details and therefore shouldn't program. That's also while lowers the emotional level below zero that this kind of experiencing leaves some unhealthy enduring effects with that persons. That's generally adverse but doesnt forces to lead to mental illnes. But if these people think they can dictate to how I program because they would be otherwise frus- trated or angry, this is a strong sign for a severe personality disorder (personality-disorders are mainly relational disorders and that these people here have such a disorder is obvious).
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-02 12:46 +0000 |
| Message-ID | <t7abet$6qe$1@gioia.aioe.org> |
| In reply to | #84465 |
Bonita Montero <Bonita.Montero@gmail.com> wrote: > You have a very compulsive opinion of what is readable. You and > some others here have an "occupational illness" of many programmers > that feel uncertain. That helps to see more details, but these people > see a lot of irrelevant details and have less capabilify to see com- > prehensive relations among those details and therefore shouldn't > program. That's also while lowers the emotional level below zero > that this kind of experiencing leaves some unhealthy enduring > effects with that persons. That's generally adverse but doesnt > forces to lead to mental illnes. But if these people think they > can dictate to how I program because they would be otherwise frus- > trated or angry, this is a strong sign for a severe personality > disorder (personality-disorders are mainly relational disorders > and that these people here have such a disorder is obvious). You shouldn't be wondering why I am so hostile against you, when your responses are always like that. The only thing that amazes me is why anybody here takes you seriously. Time and again you post something, and some people bother answering you in an appropriate manner... only for you to start insulting people if they present even the slightest of disagreements. It's relatively clear that you are engaging in projection there, assigning to others your own personal problems. Surely you must notice that it's not normal for people here to respond to others in such a manner, especially when those others did nothing more than respond in a completely reasonable and professional way. Your behavior is not normal, and the only thing you are doing there is projecting.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-02 14:56 +0200 |
| Message-ID | <t7ac0o$s2m$1@dont-email.me> |
| In reply to | #84468 |
> You shouldn't be wondering why I am so hostile against you, when your > responses are always like that. I'm not hotile but I tell you what's the problem. Trying to dicate pure tastes for nothing is a symptom of an illness. Rest unread.
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-03 04:14 +0000 |
| Message-ID | <t7c1rv$1b85$1@gioia.aioe.org> |
| In reply to | #84470 |
Bonita Montero <Bonita.Montero@gmail.com> wrote: > Rest unread. You are so incredibly predictable.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-03 06:19 +0200 |
| Message-ID | <t7c248$2pg$1@dont-email.me> |
| In reply to | #84483 |
Am 03.06.2022 um 06:14 schrieb Juha Nieminen: > Bonita Montero <Bonita.Montero@gmail.com> wrote: >> Rest unread. > > You are so incredibly predictable. To say that you'd need knowledge of human nature ...
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-03 04:26 +0000 |
| Message-ID | <t7c2i7$1fft$3@gioia.aioe.org> |
| In reply to | #84485 |
Bonita Montero <Bonita.Montero@gmail.com> wrote: > Am 03.06.2022 um 06:14 schrieb Juha Nieminen: >> Bonita Montero <Bonita.Montero@gmail.com> wrote: >>> Rest unread. >> >> You are so incredibly predictable. > > To say that you'd need knowledge of human nature ... This is what I wrote earlier: (Let me make a prediction here: You will respond by saying that you didn't read any of this. Prove me wrong.)
[toc] | [prev] | [next] | [standalone]
| From | Mr Flibble <flibble@reddwarf.jmc.corp> |
|---|---|
| Date | 2022-06-03 14:22 +0100 |
| Message-ID | <20220603142220.0000600f@reddwarf.jmc.corp> |
| In reply to | #84485 |
On Fri, 3 Jun 2022 06:19:37 +0200 Bonita Montero <Bonita.Montero@gmail.com> wrote: > Am 03.06.2022 um 06:14 schrieb Juha Nieminen: > > Bonita Montero <Bonita.Montero@gmail.com> wrote: > >> Rest unread. > > > > You are so incredibly predictable. > > To say that you'd need knowledge of human nature ... > I will remove "using namespace std;" from the Wikipedia article sometime next week; and then again a few weeks later: I will not tell you exactly when I am going to change it forcing you to waste time keep checking it if you really want an edit war. /Flibble
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2022-06-03 15:34 +0200 |
| Message-ID | <t7d2kd$7bq$1@dont-email.me> |
| In reply to | #84503 |
Am 03.06.2022 um 15:22 schrieb Mr Flibble: > On Fri, 3 Jun 2022 06:19:37 +0200 > Bonita Montero <Bonita.Montero@gmail.com> wrote: > >> Am 03.06.2022 um 06:14 schrieb Juha Nieminen: >>> Bonita Montero <Bonita.Montero@gmail.com> wrote: >>>> Rest unread. >>> >>> You are so incredibly predictable. >> >> To say that you'd need knowledge of human nature ... >> > > I will remove "using namespace std;" from the Wikipedia article > sometime next week; and then again a few weeks later: I will not tell > you exactly when I am going to change it forcing you to waste time keep > checking it if you really want an edit war. LOL. Maybe this will be a official ICD F-diagnosis some time.
[toc] | [prev] | [next] | [standalone]
| From | "daniel...@gmail.com" <danielaparker@gmail.com> |
|---|---|
| Date | 2022-06-03 07:24 -0700 |
| Message-ID | <b16ae9d5-a5e0-4e50-8a6a-406b3f3385f4n@googlegroups.com> |
| In reply to | #84503 |
On Friday, June 3, 2022 at 9:22:37 AM UTC-4, Mr Flibble wrote: > > > I will remove "using namespace std;" from the Wikipedia article > sometime next week; and then again a few weeks later: I will not tell > you exactly when I am going to change it forcing you to waste time keep > checking it if you really want an edit war. > You could, of course, do that, there is little to stop you, Wikipedia is, after all, free range. But it would be impolite, causing, as it were, a certain amount of distress. Miss Manners would not approve. Perhaps you feel that somebody is being wrong on the internet, and that duty calls. But at least consider that the C++ Core Guidelines show a "good" example that also has "using namespace std" at file scope. Perhaps having this line above 166 lines of code is not the greatest wrong of all times. But if you're really worried about name clashes, I have some very bad news for you, the code also includes Windows.h ... Maybe go with politeness this time? Best regards, Daniel
[toc] | [prev] | [next] | [standalone]
| From | Juha Nieminen <nospam@thanks.invalid> |
|---|---|
| Date | 2022-06-03 14:56 +0000 |
| Message-ID | <t7d7eg$14m7$1@gioia.aioe.org> |
| In reply to | #84507 |
daniel...@gmail.com <danielaparker@gmail.com> wrote: > Perhaps you feel that somebody is being wrong on the internet, > and that duty calls. But at least consider that the C++ Core Guidelines > show a "good" example that also has "using namespace std" at file > scope. Perhaps having this line above 166 lines of code is not the > greatest wrong of all times. Perhaps someone could present a well-formulated argument to the authors about why that using expression shouldn't be there, as it teaches new C++ programmers bad habits. I think *avoiding* "using namespace std;" should be a Core Guideline.
[toc] | [prev] | [next] | [standalone]
| From | "daniel...@gmail.com" <danielaparker@gmail.com> |
|---|---|
| Date | 2022-06-03 08:06 -0700 |
| Message-ID | <6f7f4e1a-e000-4b70-848f-7f9ab3d7347en@googlegroups.com> |
| In reply to | #84508 |
On Friday, June 3, 2022 at 10:56:36 AM UTC-4, Juha Nieminen wrote: > Perhaps someone could present a well-formulated argument to the authors > about why that using expression shouldn't be there, as it teaches new > C++ programmers bad habits. I think *avoiding* "using namespace std;" > should be a Core Guideline. That's what _you_ think, that's what David thinks, and it may even be what I think. But that's not what the Core Guidelines say. Best regards, Daniel
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2022-06-03 17:30 +0200 |
| Message-ID | <t7d9dv$19u$1@dont-email.me> |
| In reply to | #84510 |
On 03/06/2022 17:06, daniel...@gmail.com wrote: > On Friday, June 3, 2022 at 10:56:36 AM UTC-4, Juha Nieminen wrote: > >> Perhaps someone could present a well-formulated argument to the authors >> about why that using expression shouldn't be there, as it teaches new >> C++ programmers bad habits. I think *avoiding* "using namespace std;" >> should be a Core Guideline. > > That's what _you_ think, that's what David thinks, and it may even be what I > think. But that's not what the Core Guidelines say. > The Guidelines don't give any clear guidelines either way in this case. Since it is a topic that comes up regularly in all kinds of C++ discussion areas, I think the Guideline authors should cover it. They might choose to say they recommend it, or that they recommend against it, or they might give circumstances or reasons for when it should or should not be used. As they stand, the Guidelines say too little, and are too vague, and are thus pretty useless as a reference on the particular topic. Like Juha, I believe the Guidelines should be changed to recommend avoiding file scope "using namespace std;" in most (but not necessarily all) circumstances. But I'd rather they had a clear stance /for/ using it, than the current lack of clarity.
[toc] | [prev] | [next] | [standalone]
| From | "daniel...@gmail.com" <danielaparker@gmail.com> |
|---|---|
| Date | 2022-06-03 10:37 -0700 |
| Message-ID | <7a1b9373-edbe-45ad-b765-61c25bf740dcn@googlegroups.com> |
| In reply to | #84512 |
On Friday, June 3, 2022 at 11:30:24 AM UTC-4, David Brown wrote: > Like Juha, I believe the Guidelines should be changed to recommend > avoiding file scope "using namespace std;" in most (but not necessarily > all) circumstances. But I'd rather they had a clear stance /for/ using > it, than the current lack of clarity. Actually, they provide a very clear rationale /for/ using it: "sometimes a namespace is so fundamental and prevalent in a code base, that consistent qualification would be verbose and distracting." _You_ may not agree with that rationale, Juha might not, I might not, but it's in the text. They also provide an example of "good" coding style that has "using namespace std" at file scope. Now, you can say that examples take shortcuts to convey an essence. And that's true, but what is the essence that _these_ examples are intended to convey? Surely it is _good coding style_. Finally, they mention name clashes as a possible issue, but go on to say: "However, [a name clash] is not particularly likely to lead to a resolution that is not an error and people who use using namespace std are supposed to know about std and about this risk." _You_ may think that the risk of a name clash is too big of a risk to take, but Stroustrup and Sutter don't seem to think so. And as far as I can tell, they mention no other issue with "using namespace std" when used at local scope, including in a cpp file. David can't seem to separate what he thinks from what the Guidelines say. That's evident in all of his comments. I fear I'm repeating myself :-) but so is everybody else. Best regards, Daniel
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2022-06-03 20:33 +0200 |
| Message-ID | <t7dk53$rim$1@dont-email.me> |
| In reply to | #84513 |
On 03/06/2022 19:37, daniel...@gmail.com wrote: > On Friday, June 3, 2022 at 11:30:24 AM UTC-4, David Brown wrote: > >> Like Juha, I believe the Guidelines should be changed to recommend >> avoiding file scope "using namespace std;" in most (but not necessarily >> all) circumstances. But I'd rather they had a clear stance /for/ using >> it, than the current lack of clarity. > > Actually, they provide a very clear rationale /for/ using it: "sometimes a > namespace is so fundamental and prevalent in a code base, that consistent > qualification would be verbose and distracting." _You_ may not agree > with that rationale, Juha might not, I might not, but it's in the text. I'm sorry, but you are taking that out of context and extrapolating it. The quotation is in a section titled "Use using namespace directives for transition, for foundation libraries (such as std), or within a local scope (only)". No one is arguing that "using namespace" directives do not have their place and their use. The question under discussion is solely about the use of "using namespace std;" at file scope. And here the Guidelines mention it as a possibility when "the standard is used pervasively and apparently no other library is used", and they also mention some of the risk of name clashes. They also make the valid point that a cpp file itself is a scope, and it is reasonable to view a using directive at file scope as similar to a using directive inside a function of the same length. (Of course, in reality files are usually a good deal longer than you'd want a single function to be.) > > They also provide an example of "good" coding style that has > "using namespace std" at file scope. Now, you can say that examples > take shortcuts to convey an essence. And that's true, but what is the > essence that _these_ examples are intended to convey? Surely it is > _good coding style_. No. We've been through this - is there any point in repeating it? If you are still in doubt, read the introduction to the Guidelines where it says "Examples are not intended to be production quality or to cover all tutorial dimensions". And they specifically say they skip the "std::" in the examples - with /no/ implication that this is considered "good coding style". Again, I'd be a lot happier if the Guidelines made this clear. If they really do think global "using namespace std;" is good coding style, I'd like them to say so explicitly. > > Finally, they mention name clashes as a possible issue, but go on to say: > "However, [a name clash] is not particularly likely to lead to a resolution > that is not an error and people who use using namespace std are supposed > to know about std and about this risk." _You_ may think that the > risk of a name clash is too big of a risk to take, but Stroustrup and > Sutter don't seem to think so. They say it is a risk - they don't say if they recommend taking the risk or not. And they miss completely the fact that clashes may occur with future standards but not the ones you might have used when developing the code. That is a significant missing point. > And as far as I can tell, they mention > no other issue with "using namespace std" when used at local scope, > including in a cpp file. > > David can't seem to separate what he thinks from what the Guidelines > say. That's evident in all of his comments. I fear I'm repeating myself :-) > but so is everybody else. > There are many people here who seem convinced they know what the Guidelines are saying - I am saying that it is not at all clear what the Guidelines are saying in regard to file scope "using namespace std;". I am perfectly capable of distinguishing this ambiguous message in the Guidelines from my own personal preferences in regard to the "using" declaration.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2022-06-03 18:59 +0000 |
| Message-ID | <7SsmK.104301$70j.1155@fx16.iad> |
| In reply to | #84514 |
David Brown <david.brown@hesbynett.no> writes: >On 03/06/2022 19:37, daniel...@gmail.com wrote: >> On Friday, June 3, 2022 at 11:30:24 AM UTC-4, David Brown wrote: >> >> David can't seem to separate what he thinks from what the Guidelines >> say. That's evident in all of his comments. I fear I'm repeating myself :-) >> but so is everybody else. >> > >There are many people here who seem convinced they know what the >Guidelines are saying - I am saying that it is not at all clear what the >Guidelines are saying in regard to file scope "using namespace std;". I >am perfectly capable of distinguishing this ambiguous message in the >Guidelines from my own personal preferences in regard to the "using" >declaration. > Appeals to authority are generally fallacies anyway. Follow the coding guidelines of the organization paying the bills. You guys could have written five programs in the time you've wasted arguing about this.
[toc] | [prev] | [next] | [standalone]
| From | "daniel...@gmail.com" <danielaparker@gmail.com> |
|---|---|
| Date | 2022-06-03 12:35 -0700 |
| Message-ID | <2db58bf7-a302-4330-8303-30c172234d23n@googlegroups.com> |
| In reply to | #84515 |
On Friday, June 3, 2022 at 2:59:31 PM UTC-4, Scott Lurndal wrote: > You guys could have written five programs > in the time you've wasted arguing about this. Just so :-)
[toc] | [prev] | [next] | [standalone]
Page 3 of 8 — ← Prev page 1 2 [3] 4 5 6 7 8 Next page →
Back to top | Article view | comp.lang.c++
csiph-web