|
In the early days of Atmel devices C++ was very clumsy and not many people used it, they used C mostly. I kind of led a crusade for C++ and thank heavens in the last couple of years it has become very mature.
Disclaimer; I was in no way responsible of its maturity, just thankful for it.
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
Yeah, you kind of need C++11 at least or it's not that grown up. I really like a lot of the features they are adding to the language this century and I'm excited about C++20. With C# other than yield/async/await/var all the other additions have been pretty useless and marginally annoying to me.
Real programmers use butterflies
|
|
|
|
|
Yeah 11 was a great update and like you im anxious to see 20 hit the streets.
I've been tied up remodeling our house for 4 months now and it will probably be a couple more before I can get back to any kind of tinkering. Don't even have my computer here and have a brand new CNC machine assembled on my work bench at the old townhouse that I've not even had a chance to use. I've got a ton of projects lined up and raren' to get to it.
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
I really like 17 - solely because inline static initialization is a very nice addition.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
Good old binary compilation. You can get the latest features in your code by switching to a newer compiler without waiting for the latest "framework"/virtual machine to be deployed everywhere. I mean, well the stdlib and STL stuff notwithstanding.
Real programmers use butterflies
|
|
|
|
|
Part of the clumsiness might have been Embedded C++: no exceptions, no templates, no RTTI. The rationale was a concern over code bloat, but they should have taken the whole language and let individual development teams manage any bloat.
|
|
|
|
|
I agree with that regarding templates. But with structured exception handling you have potentially OS level interop you may have to do depending if your "OS"/CPU supports it or is "exception aware" and that can be architecture dependent. Also, I can't imagine even trying to do SEH on my little 8bit ATmega2560. I can see there being barriers to implementing an SEH mechanism depending on platform and depending on how it is implemented, but maybe I'm wrong.
I've never actually used RTTI, so I wouldn't miss it.
Templates only bloat your code depending on how you use them. It's fine - even desirable to use them on embedded because things like fixed length buffers usually require some sort of max value tied to a block of memory somewhere that was fixed size at compile time. I do that very thing with templates on a lot of my classes for the arduino.
template<const size_t S> class StringBuilder { ... }; like that, where S is the size of your fixed buffer.
Real programmers use butterflies
|
|
|
|
|
I wouldn't miss RTTI either.
True C++ exceptions shouldn't be a problem. But a platform that didn't support POSIX signals would be degenerate for nasty exceptions, so you'd have to design accordingly. Even the full C++ standard says that those are basically undefined behavior.
|
|
|
|
|
Yeah. I'm not really holding the lack of SEH support on embedded against anyone, is my point. Maybe it could be done on some, but it's probably hit or miss if it will even work "properly"
I love C++ and even if I can use some of it over plain old C i'll take it. C++ is a beautiful language, in whole or part.
It's truly my favorite. I missed it during my C# sabbatical but I forgot how much I loved it until I came back to it.
Also VS Code makes working with C++ in linux a joy. Kudos to Microsoft.
Real programmers use butterflies
|
|
|
|
|
One can hope that herbceptions will help there, but proposed treatment for out-of-memory errors is a bit questionable.
|
|
|
|
|
Out of memory will always be a problem without a separate stack, as in sigaltstack .
These guys are still clueless. The standard should mandate the ability to turn a POSIX signal into an exception in a signal handler. Not all platforms could support it, but so what. This also says something about the inane fetish for noexcept .
I would write a proposal but have better ways to spend time than debating pedants in the C++ standards community.
|
|
|
|
|
I traded my Ferrari for a golf cart because the Ferrari couldn't carry my gold clubs.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
And OP's analogy is "I traded my golf cart for a Ferrari because I didn't need to carry golf clubs."
|
|
|
|
|
I'm cosigning this.
Real programmers use butterflies
|
|
|
|
|
You'll be sorry when our loan is called!
|
|
|
|
|
Not the way I would look at it but to each their own.
Real programmers use butterflies
|
|
|
|
|
|
|
But why does it hurt?
Real programmers use butterflies
|
|
|
|
|
Because the UK mail delivery service still thinks it's 1940 ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: UK mail delivery service still thinks it's 1940
In the 1940s and -50s, they still had two postal deliveries a day, down from four in the early 1900s. Now, you're lucky to get two deliveries a week!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: Now, you're lucky to get two deliveries a week!
And most of that is adverts the postie stuffs through your letterbox ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: And most of that is adverts the postie stuffs through your letterbox
I love the way you folks talk.
Translated to AVE "And most of it is ads the mailman stuffs into the mailbox"
Real programmers use butterflies
|
|
|
|
|
That's one of the weird things about 'murica: you stick your mail in a box on a stick by the road!
So anyone who feels like a quick browse through it, or to take the good bits can just stroll along and help himself ... very odd.
Throughout Europe the letterbox is almost universally on the front door so the post is keep safer and more private. (There is even a European standard height-from-the-ground regulation ...)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Ours is a slot in the garage door, with mail falling into a custom designed Amazon cardboard box. A trash can is close by.
I would hate for someone to read the posts offering me prearranged funeral services.
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|