Sunday, September 2, 2018

Digest for comp.lang.c++@googlegroups.com - 25 updates in 5 topics

James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 02 12:28PM -0400

On 08/31/2018 03:29 PM, Chris Vine wrote:
...
> and always will be represented differently in C++ (_Bool, _Complex,
> _Imaginery, _Pragma), and more in C11 (_Alignas, _Alignof, _Atomic,
> _Noreturn, _Static_assert, _Thread_local). ...
 
Taking, for instance, _Bool, they had to do that because "bool" was not
a reserved identifier, so strictly conforming C90 code might have used
that identifier for just about anything, including things that might
conflict with a standard-defined "bool" keyword. Such code can compile
with no problems using C2011. However, most C code that uses the "bool",
"true" and "false" identifiers does so in a fashion that's entirely
compatible with _Bool. _Bool has a couple of characteristics that no
other C type has (conversion to _Bool produces either 0 or 1, and
nothing else, _Bool is the only integer type that a pointer value can be
converted to with a standard-defined result, and _Bool has an integer
conversion rank lower than that of char). If you want to modify existing
code to take advantage of those features, you can replace any existing
code that declares/defines those identifiers with
 
#include <stdbool.h>
 
Existing code that's intended to be compilable as either C or C++ code
will, necessarily, not declare/define those those identifiers when
compiled as C++ code, since they are keywords in C++, so this problem
can't come up in such code. However, for compilation as C code, it can
also use <stdbool.h>, and with current versions of C++, it doesn't even
need to be conditionally #included - stdbool.h is also supported as a
part of the C++ standard library, explicitly required to NOT define
macros named bool, true, or false, so the conditional compilation will
occur inside of stdbool.h, not your own code.
 
My copy of n4567.pdf says that _Pragma is spelled the same in C++ as it
is in C. Is that out-of-date?
 
<complex.h> does the same kind of thing for _Complex, and <stdalign.h>
does it for _Alignas and _Alignof. <stdatomic.h>, <stdnoreturn.h>, and
<threads.h> could do the same thing for _Atomic, _Noreturn, and
_Thread_local, but they are not included in n4567.pdf, which might just
be due to it being out of date. You might be able to take the same
approach in your own code for _Static_assert. I haven't reviewed those
features to confirm whether there would be any problems with, for
instance, using _Static_assert in C and static_assert in C++ with the
same arguments.
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Sep 02 06:38PM +0100

On Sun, 2 Sep 2018 12:28:01 -0400
> features to confirm whether there would be any problems with, for
> instance, using _Static_assert in C and static_assert in C++ with the
> same arguments.
 
I think you are perhaps missing the point I was making. I was not
commenting on the extent to which C++ has equivalents to _Bool,
_Complex, _Imaginery, _Alignas, _Alignof, _Atomic, _Noreturn,
_Static_assert and _Thread_local (it does have equivalents, albeit
bool is a macro in C stdbool.h, and a type in C++ stdbool.h and
cstdbool); it was that the fact that C++ doesn't support these names
(and doesn't have compound literals, designated initializers and the
restrict qualifier and is incompatible in other ways) means that VLAs
are not "pretty much the only real issue preventing C++ being a proper
superset of C". Given what you say about _Pragma I will have to look
that one up (I can't do that right now).
 
If you were suggesting C++ stdbool.h has to provide _Bool, that is
wrong. g++ provides it in C++ as an extension. But perhaps you meant
something else.
boltar@cylonHQ.com: Sep 02 06:57PM

On Fri, 31 Aug 2018 20:28:18 -0400
>> Indeed it doesn't, I don't need any attachment shite with usenet.
 
>Perhaps some day you may wish to reconsider your refusal to upgrade to 21st
>century technology.
 
Usenet doesn't require attachments. Anyone who uses them on this service
is an idiot and simply wastes everyone elses bandwidth. If you want to post
binaries to usenet then take a time machine back to 1990 and head to one
of the alt.binaries groups.
 
>That would be more than 20 years ago, according to my math.
 
Well done. Whats your next trick, telling us what the month is?
 
>ANSI C, using flex for lexical analysis, and bison for an LALR(1) parser;
>producing m68k assembly code.
 
>Ok, so now that we've exchanged our mutual credentials, now what?
 
I wasn't boasting, simply making a point. You however obviously are.
Though admitting you had to use tools to write your parser and lexical analyser
instead of being able to doing it yourself doesn't exactly paint you as a
master coder. I've written at least 15 parsers of various languages both
common and internal company ones and never had to resort to lex, yacc or
bison once.
"Öö Tiib" <ootiib@hot.ee>: Sep 02 12:53PM -0700

> Though admitting you had to use tools to write your parser and lexical
> analyser instead of being able to doing it yourself doesn't exactly
> paint you as a master coder.
 
Admitting to use tools like shovel to dig that hole you are in instead
of being able to doing it yourself does not exactly paint you as master
mole. Keep digging!
geza.herman@gmail.com: Sep 02 10:52AM -0700

Hi all,
 
Common wisdom is that we can use "using namespace" in .cpp files (sure, there are people who disagree with this), but we should not use it in header files.
 
The only safe solution I know which allows using directive in headers in a safe manner is this:
 
namespace MyLib {
 
namespace detail {
 
using namespace std;
 
void func() {
// use things from std here
}
 
}
 
using detail::func;
 
}
 
void userCode() {
MyLib::vector<int> a; // OK, this is not valid, symbols of "std" is not accessible here
}
 
 
So, "using namespace" is in a "detail" namespace, and afterwards we need to use using declarations to bring stuff from the "detail" namespace to "MyLib".
 
Now, as far as I know, the only reason to use a "detail" namespace in this case is to avoid "importing" everything from std into MyLib in a way that this importing is visible from outside (for users of MyLib).
 
So, If we don't use a detail namespace:
 
namespace MyLib {
 
using namespace std;
 
void func() {
// use things from std here
}
 
}
 
void userCode() {
MyLib::vector<int> a; // BAD, because this is valid, and we don't want it to be valid
}
 
So, in user code, using MyLib::vector valid, which is not we wanted, we don't want to pollute MyLib with symbols of std for the *users* of MyLib.
 
Now, what would happen, if we had a special "using namespace", which only "imports" symbols for code in the namespace it is put in? A "static using namespace":
 
namespace MyLib {
 
static using namespace std; // Note "static", that's the only difference
 
void func() {
// use things from std here
}
 
}
 
void userCode() {
MyLib::vector<int> a; // OK, this is not valid, because "using namespace std" is "static"
}
 
So, "static using namespace" would import symbols for MyLib only, and for user code (stuff outside MyLib) would not be affected by that.
 
What do you think about this idea? Is it reasonable? How big is the change to the standard?
 
Thanks,
Geza
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 02 08:26PM +0100

> }
 
> So, "static using namespace" would import symbols for MyLib only, and for user code (stuff outside MyLib) would not be affected by that.
 
> What do you think about this idea? Is it reasonable? How big is the change to the standard?
 
It is an egregious idea (see Alf's pathological coding style). It is only
five key strokes to type "std::" and it makes it obvious when we are using
something from stdlib. Not using the "std::" prefix actually makes code
harder to grok.
 
There is nothing wrong with the following code, it is easy to read and
doesn't rely on context to know what a symbol means:
 
{
std::vector<int> v { 1, 7, 42 };
std::cout << v[2] << std::endl;
}
 
/Flibble
 
--
"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."
"Öö Tiib" <ootiib@hot.ee>: Sep 02 12:47PM -0700


> What do you think about this idea? Is it reasonable? How big is the change
> to the standard?
 
I think that you need to start from reasons. Why most senior and expert level specialists dislike "using namespace std;" in header files? Why lot of
them dislike it even in cpp files?
 
Can you imagine where code bases use standard library? Is it really only
inside of implementation of "void func()"?
"😉 Good Guy 😉" <hello.world@example.com>: Sep 02 01:48AM +0100

> For a tutorial, what are the best and easiest books to read on C++ 11, C++ 14, and C++ 17?
 
> Thank you,
> Mike
 
First tell us how much do you know about C++? If you are just starting
then there is no point in selecting any version of C++. You just need to
get a good compiler and any latest book and start reading it from page
to page and do all the examples. New features of C++14 and C++17 will
come to you as you as you continue to do your research outside of the
book you are reading. There is another newsgroup where people will try
to help but you need to expect out-of-topics from time to time. There
are [many] trolls every where.
 
Why C++ in particular? Why not C# and Windows Forms? It is better than
C, or C++ and Microsoft docs are quite good. Also YouTubers spend all
their time doing videos on C# rather than C or C++.
 
If, however, you are already an accomplished C++ programmer than the
only way to read about latest developments in C++ is to read the
Standard document from the Standard Setters.
 
Please ask this question on: <comp.lang.c++> They can give links to
important documents on C++.
 
 
--
With over 950 million devices now running Windows 10, customer
satisfaction is higher than any previous version of windows.
ram@zedat.fu-berlin.de (Stefan Ram): Sep 02 02:09AM

>For a tutorial, what are the best and easiest books to read
>on C++ 11, C++ 14, and C++ 17?
 
to be read in the order given as given below by a beginner:
 
"Programming: Principles and Practice Using C++" by BJARNE STROUSTRUP
"C++ Primer", fifth edition by BARBARA MOO et al
"The C++ programming language", fourth edition by BJARNE STROUSTRUP
A Tour of C++ by BJARNE STROUSTRUP
C++17 - The Complete Guide - Nicolai Josuttis
"Effective Modern C++"
C++ Templates: The Complete Guide by DAVID VANDERVOORDE et al
The C++ Core Guidelines (online)
The C++ Standard Library: A Tutorial and Reference (2nd Edition)
 
Take care to always find and get the /newest editions/
of all books!
 
Then you can read older books, but be aware that some
advices of them now are obsolete. (But when you have read
the above source you will hopefully already often be able to
judge this by yourself.) Still they a worth to know:
 
"Effective C++"
"More Effective C++"
"Exceptional C++"
"More Exceptional C++"
"Modern C++-Design"
 
For example, I am not sure whether one of the more recent
books treads exception safety so extensively as the
"exceptional" books by Herb Sutter.
 
Also watch all the cppcon talks by Herb Sutter!
ram@zedat.fu-berlin.de (Stefan Ram): Sep 02 04:46PM

>My copy of n4567.pdf says that _Pragma is spelled the same in C++ as it
>is in C. Is that out-of-date?
 
Both David Bowie and Fidel Castro were still alive when
n4567 was published.
 
The most recent C++ draft I am aware of is n4762 as of
2018-07-07. It mentions »_Pragma«:
 
|14.9 Pragma operator [cpp.pragma.op]
|1 A unary operator expression of the form:
|_Pragma ( string-literal )
...
 
.
bitrex <user@example.net>: Sep 01 09:40PM -0400

On 09/01/2018 02:16 PM, David Brown wrote:
 
> The trick with Jehovah's Witnesses is to invite them in.  Watch how it
> confuses them - it is such an unlikely scenario that it is not part of
> their training, and they don't know how to handle it.
 
My Mom did that one time they just show up the next time with like six
guys in black suits in two Mercedes luxury sedans ready to whisk you
away to the convert center or w/e.
bitrex <user@example.net>: Sep 02 01:36AM -0400

On 09/01/2018 08:33 AM, Rick C. Hodgin wrote:
> The rapture is for the saints (believers in Jesus Christ). Those events
> described in Revelation regarding the tribulation are for those left behind.
 
If the rapture is only for the "saints" then Christ will be able to take
it easy, there will be little work to do in America. Why teleport anyone
when surely all of them could fit on some fashion of small aircraft.
 
I doubt anyone will even notice, they'll be too busy praying for divine
intervention and riches from some charlatan in a 50,000 seat football
stadium.
 
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Sep 01 10:42PM -0700

On 9/1/2018 10:36 PM, bitrex wrote:
 
> I doubt anyone will even notice, they'll be too busy praying for divine
> intervention and riches from some charlatan in a 50,000 seat football
> stadium.
 
;^)
 
My only problem with the rapture is that I always thought that God's
elect stand before and truthfully testify against satan in the flesh
using the pure word of God talking through them. I also think there is a
single unforgivable sin that an elect can possibly make. If they somehow
try to reject the words of God and inject their own words in their place
can be bad mojo.
 
 
 
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Sep 01 10:57PM -0700

On 9/1/2018 10:36 PM, bitrex wrote:
 
> I doubt anyone will even notice, they'll be too busy praying for divine
> intervention and riches from some charlatan in a 50,000 seat football
> stadium.
 
Imvho, that person cannot be satan because the beast is actually a
radically beautiful and hyper intelligent being, far beyond any human
capability. It preaches total peace, and demands no war. satan really
gets a kick out of playing the role of Christ. It almost kind of sounds
like a damn evil alien. satan is a really great biblical lawyer, but
twists certain things from time to time.
 
 
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 02 02:42AM -0700

On Sunday, September 2, 2018 at 1:36:30 AM UTC-4, bitrex wrote:
 
> I doubt anyone will even notice, they'll be too busy praying for divine
> intervention and riches from some charlatan in a 50,000 seat football
> stadium.
 
God doesn't call people to pursue worldliness, to seek avarice.
He calls them to holiness, purity, honesty, sincerity, and service
to His Kingdom.
 
Those taken in the rapture will include the saints who have died
previously in their faith, all the way back to Jesus' time on the
Earth. They will rise first, then those of us left alive will be
snatched away.
 
The rapture brings those who will be married to Jesus in eternity.
The Marriage Supper of the Lamb (Jesus) takes place during the seven
year tribulation. And those saints are the ones who return to the
Earth after the seven year period to subdue the Earth, and the re-
maining people thereof.
 
> > The knowledge of God /IS/ hidden from those who are perishing. Only those
> > who are being saved can receive the gospel message. The rest will conclude
> > the message is utter foolishness, until the day they leave this Earth.
 
This is all explained in the videos I posted. And in a studying
of the Bible.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 02 03:07AM -0700

On Sunday, September 2, 2018 at 1:42:54 AM UTC-4, Chris M. Thomasson wrote:
> >> who are being saved can receive the gospel message.  The rest will
> >> conclude
> >> the message is utter foolishness, until the day they leave this Earth.
 
Satan was judged by Christ at the cross. He is already a defeated
foe. He is cast into the lake of fire at the end of 7,000 years.
No witnesses from us, only direct condemnation by Jesus:
 
https://www.biblegateway.com/passage/?search=John+12%3A27-33&version=KJV
 
27 Now is my soul troubled; and what shall I say? Father,
save me from this hour: but for this cause came I unto
this hour.
28 Father, glorify thy name. Then came there a voice from
heaven, saying, I have both glorified it, and will
glorify it again.
29 The people therefore, that stood by, and heard it, said
that it thundered: others said, An angel spake to him.
30 Jesus answered and said, This voice came not because of
me, but for your sakes.
==> 31 Now is the judgment of this world: now shall the prince
of this world be cast out.
32 And I, if I be lifted up from the earth, will draw all
men unto me.
33 This he said, signifying what death he should die.
 
And Satan's doom. He's locked up after the tribulation, whereby
the Earth is restored to its pre-sin paradise state. After being
bound a thousand years, he is loosed for a short season, angry and
furious because he knows his time is up. He goes out to deceive
the people born during the thousand years, and deceives many. great
and massive army surrounds Jerusalem, as the fire of God comes down
from Heaven and consumes every one in the army that has risen up
against Jesus and His people:
 
https://www.biblegateway.com/passage/?search=Revelation+20&version=KJV
 
1 And I saw an angel come down from heaven, having the
key of the bottomless pit and a great chain in his hand.
2 And he laid hold on the dragon, that old serpent, which
is the Devil, and Satan, and bound him a thousand years,
3 And cast him into the bottomless pit, and shut him up,
and set a seal upon him, that he should deceive the
nations no more, till the thousand years should be
fulfilled: and after that he must be loosed a little
season.
4 And I saw thrones, and they sat upon them, and judgment
was given unto them: and I saw the souls of them that
were beheaded for the witness of Jesus, and for the word
of God, and which had not worshipped the beast, neither
his image, neither had received his mark upon their
foreheads, or in their hands; and they lived and reigned
with Christ a thousand years.
5 But the rest of the dead lived not again until the
thousand years were finished. This is the first
resurrection.
6 Blessed and holy is he that hath part in the first
resurrection: on such the second death hath no power,
but they shall be priests of God and of Christ, and
shall reign with him a thousand years.
==> 7 And when the thousand years are expired, Satan shall be
loosed out of his prison,
8 And shall go out to deceive the nations which are in the
four quarters of the earth, Gog, and Magog, to gather
them together to battle: the number of whom is as the
sand of the sea.
9 And they went up on the breadth of the earth, and
compassed the camp of the saints about, and the beloved
city: and fire came down from God out of heaven, and
devoured them.
10 And the devil that deceived them was cast into the lake
of fire and brimstone, where the beast and the false
prophet are, and shall be tormented day and night for
ever and ever.
 
After this are people judged:
 
11 And I saw a great white throne, and him that sat on it,
from whose face the earth and the heaven fled away; and
there was found no place for them.
12 And I saw the dead, small and great, stand before God;
and the books were opened: and another book was opened,
which is the book of life: and the dead were judged out
of those things which were written in the books,
according to their works.
13 And the sea gave up the dead which were in it; and
death and hell delivered up the dead which were in
them: and they were judged every man according to their
works.
14 And death and hell were cast into the lake of fire.
This is the second death.
==> 15 And whosoever was not found written in the book of life
was cast into the lake of fire.
 
I would save each of you from that judgment by pointing you to Jesus
so you can ask Him to forgive your sin and be saved.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 02 03:15AM -0700

On Sunday, September 2, 2018 at 1:57:45 AM UTC-4, Chris M. Thomasson wrote:
 
> Imvho, that person cannot be satan because the beast is actually a
> radically beautiful and hyper intelligent being, far beyond any human
> capability. It preaches total peace, and demands no war.
 
Satan is only evil, the father of lies, the cause of all war.
 
> gets a kick out of playing the role of Christ. It almost kind of sounds
> like a damn evil alien. satan is a really great biblical lawyer, but
> twists certain things from time to time.
 
He twists everything to deceive us into believing lies that sound
close enough to the truth that we'll accept them as though they
are the truth. They are not.
 
It is only Jesus Christ who is truth. He and He alone, which is
why we must study His written word, for it alone is of Him, and leads
us to Him to ask forgiveness for our sin to be saved.
 
> >> who are being saved can receive the gospel message.  The rest will
> >> conclude
> >> the message is utter foolishness, until the day they leave this Earth.
 
Satan has no redeeming qualities, but is wholly evil top to bottom.
All who put their faith in him have already lost their soul. But
all who turn toward Christ and ask forgiveness achieve total victory
over him.
 
Satan has already lost. His time is almost up.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 02 04:00PM +0100

On 02/09/2018 06:36, bitrex wrote:
 
>> The knowledge of God /IS/ hidden from those who are perishing.  Only those
>> who are being saved can receive the gospel message.  The rest will conclude
>> the message is utter foolishness, until the day they leave this Earth.
 
If God is able microwave a burrito so that it is too hot even for God to
eat then surely God isn't omnipotent as the burrito is too hot even for
God to eat.
 
God is a category error.
 
--
 
Thank you,
Rick C. Hodgin
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 02 06:37AM +0200

On 02.09.2018 00:27, Mr Flibble wrote:
 
> I am sorry Alf but many members of the group agree that your coding
> style is pathological in nature.
 
That's clearly intended as a personal attack on me, but ends up being a
personal attack on an unspecified "many" of the clc++ residents.
 
I've gotten used to your postings about sausages, your tirade of attacks
on the religious nutcases here, exceeding their original amount of noise
usually ten or twenty times, your personal attacks east and west and
whatever directions, your usually very foul language, etc., Leigh.
 
And mostly I just ignore it, kill the noise threads, sometimes killfile
people, for clearly you're out on a FISHING EXPEDITION where you want
some reaction. Just like, any reaction. So here is one; you're welcome.
 
 
Cheers!,
 
- Alf (laughing, just out of bed :-D )
Juha Nieminen <nospam@thanks.invalid>: Sep 02 07:17AM

>>> #include <stdio.h>
 
>> Are you serious?
 
> Apparently it helped Stefan.
 
Including stdef.h (instead of cstdef) and stdio.h (instead of cstdio)
helped him, in your opinion?
 
I'm not even sure if stdef.h and stdio.h are even in the standard
anymore. (Even if they are, they are definitely not recommended.)
 
>> a whopping -87 characters, without making the code any easier to
>> read or understand (but, arguably, the exact opposite):
 
> In my view it's idiotic to focus on numbers of characters.
 
You are missing the point. Citing the exact numbers is not the main
point. It's just a way of saying that not only is the use of 'using'
in order to not have to write the 'std::' prefix later rather pointless,
but ironically instead of saving trouble of writing more code, on the
contrary it only makes you write *more* code, not less, and thus is
a double fail.
 
Code does not become more readable by avoiding the 'std::' prefix.
On the contrary, it becomes *less* readable (because references to
standard library names are not being visually marked as such, making
them visually indistinguishable from custom names). And, as said,
ironically, with short code like this it only makes the code *longer*
(which kind of defeats the purpose of giving a short example), for
absolutely no benefit.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 02 09:49AM +0200

On 02.09.2018 09:17, Juha Nieminen wrote:
 
>> Apparently it helped Stefan.
 
> Including stdef.h (instead of cstdef) and stdio.h (instead of cstdio)
> helped him, in your opinion?
 
You're stating that you have some strong opinions ...
 
 
> I'm not even sure if stdef.h and stdio.h are even in the standard
> anymore. (Even if they are, they are definitely not recommended.)
 
... AND that you don't know what you're talking about.
 
 
 
> You are missing the point. Citing the exact numbers is not the main
> point. It's just a way of saying that not only is the use of 'using'
> in order to not have to write the 'std::' prefix later rather pointless,
 
Again you're have a strong opinion, and then make clear that you have no
idea what you're talking about.
 
 
> but ironically instead of saving trouble of writing more code, on the
> contrary it only makes you write *more* code, not less, and thus is
> a double fail.
 
You stated that the text size is "not the main point" (well it shouldn't
be a point at all unless the size differences are extreme), and now you
contradict that statement by focusing on the "trouble of writing more
code" as the main point.
 
That's your third direct self-contradiction in a very short stretch of
commentary.
 
 
> On the contrary, it becomes *less* readable (because references to
> standard library names are not being visually marked as such, making
> them visually indistinguishable from custom names).
 
Here you're into partially subjective territory. Unfortunately the
subjective aspects of it appears to be all that you notice, except the
in-your-face incorrect assertion that "references to standard library
names are not being visually marked as such". They're explicitly listed,
which is one way, plus your editor or IDE marks them, that's another.
 
 
> ironically, with short code like this it only makes the code *longer*
> (which kind of defeats the purpose of giving a short example), for
> absolutely no benefit.
 
Uh. That's not an issue for me.
 
Count your characters and be happy, but don't demand that I do that, please.
 
 
Cheers!,
 
- Alf
Ian Collins <ian-news@hotmail.com>: Sep 02 08:12PM +1200

On 02/09/18 19:17, Juha Nieminen wrote:
> helped him, in your opinion?
 
> I'm not even sure if stdef.h and stdio.h are even in the standard
> anymore. (Even if they are, they are definitely not recommended.)
 
They are and they are still recommended in more than a few coding
standards (including ours). If you are going to use C standard library
functions, you may as will use the C headers. I for one consider the
C++ wrappers a mistake.
 
--
Ian.
Melzzzzz <Melzzzzz@zzzzz.com>: Sep 02 08:31AM

> standards (including ours). If you are going to use C standard library
> functions, you may as will use the C headers. I for one consider the
> C++ wrappers a mistake.
 
Somewhere I saw that cheader are not favored any more... header.h is in
;)
 
--
press any key to continue or any other to quit...
"Öö Tiib" <ootiib@hot.ee>: Sep 02 03:38AM -0700

On Sunday, 2 September 2018 11:31:34 UTC+3, Melzzzzz wrote:
> > C++ wrappers a mistake.
 
> Somewhere I saw that cheader are not favored any more... header.h is in
> ;)
 
Team has to agree if and what they use from C standard library and
how. If they decide to use <cheaders> then they should also use
`std::int32_t` and `std::ptrdiff_t` qualified because <cheaders> are
not required to define global namespace versions. Couple using
declarations or verbosity of `std::int32_t` are matter of taste.
Is it `std::get` or `my::impl::get`? That is bike-shedding of low
importance, consistency is more important.
 
OTOH functions with a lot of (like 7 or 8) parameters are IMHO not
matter of taste. These tend to actually make code harder to read and
to reason about. This thread was about how to implement such
annoying functions with low run-time overhead.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 02 03:57PM +0100

On 02/09/2018 05:37, Alf P. Steinbach wrote:
> reaction. Just like, any reaction. So here is one; you're welcome.
 
> Cheers!,
 
> - Alf (laughing, just out of bed :-D )
 
That is all well and good but it doesn't change the fact that your coding
style is pathological in nature.
 
/Flibble
 
--
"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: