|
Using header files the interface to the library can compile differently to how the library itself was compiled, usually depending upon preprocessor definitions and that sort of thing. My impression is that C++ modules guarantee that the user of a library sees the same interface, types, etc. that the compiler of the library saw.Jeremy Falcon wrote: when did using the pre-processor become discouraged in C++ I have a feeling some of this can be attributed to the open source movement. Preprocessor use is a 'code smell' in some circles, and its a metric that can be easily applied to an arbitrary body of code. There are probably tools out there to help you choose between open source packages based on certain metrics, including this one. The preprocessor has a history of being abused, creating inadvertent side-effects and difficult to find bugs. For this reason it's frowned upon in more modern code.
These prejudices ignore the cases where the preprocessor is used to simplify syntax, reduce ceremony, etc. and you know what-the- you are doing.
Software Zen: delete this;
|
|
|
|
|
Gary R. Wheeler wrote: Using header files the interface to the library can compile differently to how the library itself was compiled, usually depending upon preprocessor definitions and that sort of thing. My impression is that C++ modules guarantee that the user of a library sees the same interface, types, etc. that the compiler of the library saw. Yeah, I'm not sure on that either. It would seem that's the case. From what I've Googled the modules import stuff is already precompiled into a Abstract Syntax Tree (AST), which AFAIK is after the pre-processor kicks in.
Gary R. Wheeler wrote: For this reason it's frowned upon in more modern code. Yeah, and don't get me wrong... I'm all about modern. But having the compiler make choices on your code before it gets compiled can be very useful... as we all know. Looks like the good must suffer with the bad.
Jeremy Falcon
|
|
|
|
|
Are C++ templates just forms of macros or are they more?
They look like macros.
I don't use them just trying to understand them.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
|
thanx will do
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
|
I love that site. And yeah, that was my concern. It's usually the loudest voice that gets heard online, which may or may not be the actual truth of the matter. Question everything ya know. Don't get me wrong, it's cool that C++ is evolving... just want the truth of the matter to learn with.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: But, C++ modules... what's the big deal with them?
Seems like a really good question.
None of the replies that I have seen nor the links that I found actually answered the question as to why one would use them. Except for reduced compilation time. The links all go into depth on how to use them and the code for that but nothing about why a development show would use them.
Jeremy Falcon wrote: What's the benefit over using a static library with a pre-compiled header?
I wouldn't phrase it exactly like that. What is the advantage of these over a static library with a well defined (limited) public api which is exposed via an include file?
Presuming not much then, in that development shop, then managing modules as the same problem as the libraries. The process for delivering it into the rest of the applications would need its own process path (versions, builds, etc.) Not to mention correctly compartmentalizing the functionality. Seems like if a development shop already has that down then they might as well continue doing it that way. But then they might want to switch to modules.
But if the development shop does not have that process down then seems unlikely that this is going to help with anything.
|
|
|
|
|
formerly ,,, were under the delusion that we (Homo Sap) domesticated them [^]Quote: It also could be said that cats domesticated themselves; they were attracted to the rodents that feasted off the harvests of the earliest farmers. They chose us, not the other way around. In turn, those early farmers appreciated this welcome form of pest control. So, unlike dogs — which were domesticated earlier, initially for hunting — cats weren’t bred for various specific purposes. They arrived as a “ready-made” symbiotic species, so to speak. Hail Bastet, Maneki-neko !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Thousands of years ago cats were revered as Gods. We've forgotten, but they haven't.
|
|
|
|
|
Quote: Cats were not worshipped as gods themselves, but as vessels that the gods chose to inhabit, and whose likeness gods chose to adopt,” Skidmore explains. Through their ubiquitous presence in the art, fashion and home ornamentation of ancient Egypt, cats served as an everyday reminder of the power of the gods.
Did Ancient Egyptians Worship Cats? - HISTORY[^]
|
|
|
|
|
They were basically a living icon.
Also in the late period they killed huge numbers of cats to mummify, so they could deliver messages to a God for you. The number of cat mummies far exceeds the number of any other surviving ancient Egyptian object.
|
|
|
|
|
Still are, in our house 😸
Paul Sanders.
If I had more time, I would have written a shorter letter - Blaise Pascal.
Some of my best work is in the undo buffer.
|
|
|
|
|
Recent Maneki-neko appearance:
In the final couple episodes of Delicious Party Precure, maneki-neko from around the world fly to Oishiina Town to join the battle to rescue the world's food supply, helping the skyscraper-height maneki-neko statue that dominates the skyline.
|
|
|
|
|
We cannot be sure, but I've read that the primary role of the dogs was not hunting, but rather guarding. These watchdogs were giving our ancestors much needed sleep.
Advertise here – minimum three posts per day are guaranteed.
modified 30-Jan-23 10:53am.
|
|
|
|
|
Single Step Debugger wrote: We cannot be sure, but I've read that the primary role of the dogs was not hunting, but rather guarding.
Then they're slacking off.
What's the point of having a dog that barks only after you rang the doorbell? The doorbell does the job.
|
|
|
|
|
No matter how big and illuminated doorbells they had 30 000 years ago, the cave bears and sabretooth tigers kept ignoring them.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
That's because you insist on treating it like a pet, rather than expecting it to bark for its supper.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
BillWoodruff wrote: formerly ,,, were under the delusion that we (Homo Sap) domesticated them
I think they domesticated us.
PartsBin an Electronics Part Organizer - An updated version available!
JaxCoder.com
|
|
|
|
|
Speak for yourself; I'm still feral. If I had my way, I wouldn't have any animals in the house other than children.
(Unfortunately, my wife and daughters have been domesticated. They insist on having a dog. )
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
My cat comes to me when he wants brushing then bites me when he's had enough.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I knew this, but a lot of people don't, so it's trivia I share with people too. Silly, but interesting anyway. I collect information cruft like that, but then I know I have a fair amount of company in that respect.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Well, of course, dear, you are the judge, the standard, the ne plus ultra, the "stupor mundi," whose judgements of anything ... like serious interest, over years, in paleogenetics, cultural evolution, and inter-species symbiosis ... can determine what is "trivial" or "cruft."
Perhaps you should write Dr. Marcelo Sanchez-Villagra and let him know his acclaimed 2022 book on species domestication by humans [^] is just worthless, and his scientific career is a waste of time. Tell Google they made a mistake in making him a "Google Scholar."
Then, let Dr. Alice Roberts know her acclaimed recent book where she combines probing science with a story-teller;s gifts [^] is a waste.
Also write Dr. Svante Paabo, and tell him he didn't deserve the Nobel Prize last year for Neanderthal DNA genomic reconstruction.
Good taste deters me from rendering the simpler analysis Occam's Razor suggests.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 31-Jan-23 9:51am.
|
|
|
|
|
Wow. You dramatically misunderstood me to the point where I'm wondering if you deliberately read my posts in the worst possible light.
All I meant was I collect useless trivia.
To err is human. Fortune favors the monsters.
|
|
|
|