|
The only thing that's really bad about macros is that you can't step into them with the debugger (at least you couldn't as late as 2007 when I last used C++). Other than that, this guy's a retard.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I fundamentally disagree. Macros in C/C++ are fraught with problems, and great care is needed to ensure they work correctly. Other languages have better macro facilities (hygienic macros), but the problems caused by C++ macros are both well-documented and subtle.
There are real issues that have led to real bugs in real codebases, and should not be trivialised.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
I tend to agree at the high level with him. I have seen macros go full retard with complexity that screams function. I'm okay with simple stuff, but as John says, debugging is a $itch.
So John, can you elaborate why you think he's retarded?
cg
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Well, macros aren't meant for full-on coding,they're intended to ease typing when a given expression is needed in many places, but doesn't itself warrant the creation of a function. I've seen people go overboard with them (an old boss wanted me to have begin and end macros to redefine the C++ curly braces when we moved from pascal to C++).
Railing about macros is pointless and a waste of everybody's time.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Okay, I'm in agreement.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
I've never liked macros. I use them for simple defines of used with multiple types, such as MILLISECONDS_PER_SECOND and in version headers.
(constexpr is your friend.)
|
|
|
|
|
Google has launched Season of Docs, a program which aims to improve documentation for open source projects. It will do this by building a mentoring relationship between open source contributors and technical writers, helping to create stronger and more comprehensive documentation for various open source technologies. Open source programs have docs?
|
|
|
|
|
So winter is coming.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
IT operations teams are focusing their efforts on securing their networks and applications from outside threats, but the greatest threat to an organization may be its own users. Because the careful ones don't get caught
|
|
|
|
|
Ye Gods!
This is amazingly new and eye-opening news!
After years of data that shows that careless end users are an organization’s biggest security threat, someone has finally figured out that careless end users are an organization’s biggest security threat!
My gast is well and truly flabbered!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
My mission of bringing only the newest, and most mind-shattering news, is completed.
TTFN - Kent
|
|
|
|
|
Well done!
Time for a coffee break!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
As the great philosopher Rick Cook once stated Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
modified 23-Mar-19 8:27am.
|
|
|
|
|
A new experiment reveals signs our brains may respond to changes in Earth’s magnetic field, but it’s unclear whether it impacts behavior It just means some people have iron filings where their brains should be
|
|
|
|
|
Magneto is dead! Long Live Magneto!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Sorry, could you repeat that?
My ears were full of paperclips, again.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Wikipedia Co-Founder Larry Sanger launched a sharp attack at technology giants saying that tech giants ‘demand a great deal of information and control.’ He, therefore, asked consumers to stop their engagement with the Silicon Valley giants from stem to stern. "I wish I knew how to quit you."
|
|
|
|
|
But he's wikipedia, so you can't trust a word he says.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
With Windows Virtual Desktop, you can deploy and scale your Windows desktops and apps on Azure in minutes and enjoy built-in security. VT100, with added Windows!
|
|
|
|
|
This will make a huge difference to my lifestyle.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: This will make a huge difference to my lifestyle.
self.reasonsToRollEyes++;
"Error NumericOverflowException"?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Researchers from Microsoft and the University of Washington have demonstrated the first fully automated system to store and retrieve data in manufactured DNA — a key step in moving the technology out of the research lab and into commercial datacenters. Don't sell your hard-drive just yet
|
|
|
|
|
But I don't want to have to keep my computer in the fridge!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Hundreds of millions of Facebook users had their account passwords stored in plain text and searchable by thousands of Facebook employees — in some cases going back to 2012 MarkZ skipped that course on encryption
It was either that or, "well, of course they did". Words escape me.
|
|
|
|
|
But they locked the door of the server room, every night, so everything's fine.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|