|
So you'd say it really put other eclipses in the shade then?
|
|
|
|
|
|
They're awesome. Misused, but awesome.
|
|
|
|
|
I'm not sure if they're considered "poor style", but C/C++ macros are very powerful. I've worked on projects where they were used to essentially provide a DSL. That was many years ago, but I have fond memories of the C preprocessor and C++ templates (the 'real' thing). Still miss both in Java/C#.
|
|
|
|
|
In fact Macros are really powerful tool. It is one of the best way by which one can talk to the underlying compiler and by which the compiler can talk to you. Yes compiler can talk to you by the means of Predefined Macros.
If we look at the "Preprocessor Definitions" of Visual Studio editor of a C++ project, there are a lots of things configured which can be done otherwise using #define macros.
Following are some of the application areas of macros.
1. Platform based API declarations. Platform can be different Operating Systems, it can be 32 bit or 64 bit.
2. Generation of conditional code.
3. Switching between UNICODE and Multi-byte.
4. Prevention of multiple times inclusion of header files. Achieved using #ifndef,#define,#endif.
5. API generation when used in conjunction with template meta programming.
|
|
|
|
|
I always thought macros were the function-like things, the rest being preprocessor definitions. Apparently everything substituted by the preprocessor is called a macro. https://gcc.gnu.org/onlinedocs/cpp/Macros.html[^]
I personally dislike function-like macros, except for the really simple ones like min and max. They are a real horror to debug.
|
|
|
|
|
Poor style? Macros are extremely powerful and used in the right way are faster and can be more useful than templates, classes and functions.
Using defines for constants - that's poor style and should be avoided if possible. Const and enums are scoped and reduce namespace pollution - other than misuse of similarly named constants (MAX_CHARS is a perfect name for a lot of max chars things, in different classes may have diffwerent meaning and values. If it is a scoped const you avoid potential deadly pitfalls).
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
"When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey
|
|
|
|
|
To wear out the motorbike tyres in less than a hour is poor riding style, still in motoGP...
|
|
|
|
|
Well so what? They don't have to use "Good Style", whatever that is.
|
|
|
|
|
swampwiz wrote: I have always been told that the macro in C/C++ is considered to be poor style Beware absolutes. They are never right.
|
|
|
|
|
Pete O'Hanlon wrote: Beware absolutes. They are never right.
What, never?! Yes, never!
What, never?! Well... hardly ever.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Like most things, they only become poor style when abused / misused.
Jeremy Falcon
|
|
|
|
|
Are your streets full of pedestrian iZombies ? [^]
"By now, everyone knows that talking or texting while driving can get you killed. But the fact that 3,154 people died and an estimated 424,000 were hurt in 2013 is evidence that a great many people are willing to ignore the advice to keep their attention on the road."
"Some data suggests that at any given moment on the streets of America, 60 percent of pedestrians are distracted while walking, meaning either on the phone or doing something on their phone," said Alan S. Hilibrand of the American Academy of Orthopaedic Surgeons. "It’s a bit of a startling number."" I live in one of the smallest nations in the world to be in the top five for the highest vehicle death/accident rates, but that was happening with the advent of mobile-phone usage becoming the national blood-sport.
Since, so often, the words "public sidewalk" are an oxymoron here for death-trap, and "walking" is not a modal cultural pastime here, I don't encounter that many pedestrian zombies except once in a while in the tourist zones, and most of the tourists are dazed anyway (that's what they come to Amazing Thailand for). As happens elsewhere, some tourists lost in the raptures of selfie-snapping come to bloody grief.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
modified 27-Sep-15 23:38pm.
|
|
|
|
|
We probably need "Safe selfie" rules like what Russia is proposing. It is amazing that we now need rules to tell people that hey don't do this you will die.
I think we are the only smart enough race that has developed technologies to make ourselves stupid.
|
|
|
|
|
Aside, in my language Kannada, there's a proverb like this: 'Speech is like silver. Silence is golden'. Now, looks like everyone is in pursuit of 'gold' by using their 'silver'.
For example, I overheard a conversation by a seemingly-busy-manager tracking his project status over phone while driving to work; his face showed tension. I was in the adjacent vehicle at the traffic signal. This, IMHO, is too much.
|
|
|
|
|
Silence is Golden, duct tape is silver.
I believe that proverb (yours, not mine) is spread all over the world. Apparently it existed already in ancient Egypt, but the origin might be even older
|
|
|
|
|
Werner Herzog has made a short film called From One Second To The Next [^], which I think would work well as part of all driver training courses.
It's a series of interviews of people connected to incidents that involved the use of mobile phones while driving. The interviews are with victims, victims' families, police and people who were using their mobile phones when they hit someone else.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 28-Sep-15 3:42am.
|
|
|
|
|
Driver education has been rendered almost useless by car makers. Drivers now believe themselves to be totally immune from all harm once they are sitting in cars with claims that fall just short of being able to bring you back from the dead. If we want an end to the trail of death, injury and destruction for which motor vehicles are responsible then a ban on all safety measures not pertaining to roadworthiness and the compulsory fitting of very sharp blades on all sides of the driver is what's required! There is far too little risk of death to drivers for them ever to be safe to be let out onto roads!
|
|
|
|
|
When I took my motorcycle test one of the instructors said that instead of airbags cars should have a spike protruding from the centre of the steering wheel.
I agree that the unfortunate consequence of making cars safer is that it makes idiots believe that they can take more risks. Last year one of these idiot drove into the back of me and it hurt, I just hope it hurt his insurance policy renewal premium.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Thanks for all the replies to my previous post[^], much appreciated!
After more online research, I see that the main problem is what everyone pointed out - being too verbose. I had the impression that recruiters and HR use some kind of software (applicant tracking system) to weed out what they wanted based on keywords in the text, and the actual length was not that relevant (within reason). That led me to include a little of everything I've done to get past the filters.
I think I'm going to use a professional service. There are a *lot* of them out there, and selecting one is going to be hard. Luckily there also is advice on how to select one. For instance, they have to be familiar with the latest formats and selection methods & criteria. There is also an association of professional resume writers which looks like a good place to start (no links, it appears at the top of a Google search).
OT - wouldn't it be nice if old posts could be made to "bubble up" in the forum when new replies are posted? The current method is also fine, but occasional posters would benefit more if new posts were immediately visible. Or was that already discussed ages ago?
|
|
|
|
|
There used to be a drop down at the top of the forums that filtered by the posted on date. So one could use it to find posts posted within, say, the last day. I have no idea why it was removed.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Yes, that may be useful, but would only be good if you are actively searching for an old topic. It won't help reopen old discussions.
|
|
|
|
|
Member 12000837 wrote:
OT - wouldn't it be nice if old posts could be made to "bubble up" in the forum when new replies are posted?
NO! Facebook does that and I hate it! It makes it much harder to find new posts between all the old shite when posts are constantly changing order...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Member 12000837 wrote: OT - wouldn't it be nice if old posts could be made to "bubble up" in the forum when new replies are posted? Given the amount of crap that is posted on some topics, definitely not. The same old rubbish would sit at the top rather than being allowed to naturally fade away.
|
|
|
|
|
I have heard a lot of trash talk towards ReactJS lately. With the release of TSX (JSX for Typescript), people are saying that React is just a fad, and will die out in not time. It is kind of dissuading me from using ReactJS in an upcoming web-app project. What is the opinion of this community. Should I use React, or is it really that bad? I don't want to use Angular, because I still feel like the shift to Angular 2.0 is going to be hard.
|
|
|
|