And presumably "*" is overloaded? And how do you know whether a pointer is smart or not? Presumably you look at the #includes? Right. What if someone uses a different smart pointer library/template/whatever?
And what about new and delete and arrays, vectors, and all that jazz?
So why don't they just make pointers behave like that in the first place? Oh, because that would break backwards compatibility with C source (you are meant to have swallowed the pill and be compiling all your C code in your C++ compiler, and modify it where its broken)... even although the language isn't a strict superset of C and you can't rely on the behaviour of the compiled code to be the same...
So why don't you just forget C++, keep your "old" C code, and use a better high-level language for the OOP stuff, calling the low-level C stuff where required?
But, but, but...
C++ is getting more like Religion as time goes on.
There are two types of people in this world: those that pretend to understand C++ and those that don't pretend that they don't.
If you think C++ is hard to learn wait until you have to learn how a complex piece of software is written. On anything other than small or toy applications...
I've been a software engineer for over a decade now and worked for some very large companies on huge projects (tens of millions of lines on top of the OS), and I've yet to see any "well written" C++. None. It's all been ugly, convoluted, bloated, unsafe, incomprehensible garbage.
A very substantial amount of time and effort is invested in just trying to pick apart the C++ spaghetti. The C tends to be pretty bad too, but not in the same ballpark as the C++.
Not everyone is a Herb Sutter, Andrew Koenig or Bjarne Stroustrup, and they are few and far between even in large and powerful companies.
C++ is very dated. There are better tools nowadays.
The Hobbit and Harry Potter are not science fiction: they're "Fantasy."
Mrs. Turgid teaches English at secondary level (12-18 years) and she says that Harry Potter isn't that great technically (in terms of the quality of the writing) but it has been immensely valuable in that it has go children reading books again.
She's a great Tolkein fan and reads LOTR once a year, every year. I've tried. When I was 10 I didn't make it past Bilbo's birthday (it was pointless, boring and nothing happened), and when the films came out in the 2ks I tried again and made it on to RotK but didn't finish it (no depth, just a series of rather hum-drum encounters and a load of nonsense about magic and superstition). It just doesn't float my boat. I'd read all the Asimov Robot books by the time I was 12 and gave up with SciFi after that (and fiction in general). I was more interested in inventing the future rather than reading about someone else's idea of what it might be like in 1000 years...
Over the years, I have been very lucky to learn and work in environments where I have acquired knowledge through curiosity that helps me to have a certain degree of personal freedom over these fascist corporate restrictions.
I'm a pretty darn good C coder, I know a bit of assembly, I've worked on everything from web GUIs down to protected-mode boot loaders and I'm reasonably good with vi/vim.
I was fortunate to cut my teeth on an 8-bit Z80 micro in the early 80s.
I'm not scared of DRM, I'm not scared of flashing BIOS chips, I'm not scared of setting dip switches and jumpers, I can use a disassembler and know how to decipher hex. You won't find Windows on any of my computers.
I'm quietly confident nowadays that the various Free and Open Source movements have sufficient momentum and influence that despite what the most evil and absurd business interests try to do to deny our freedoms, for the sufficiently savvy and motivated, we will almost always be able to do what we want to.
Eternal vigilance is important, and we must keep out-innovating them. We must make sure that our politicians don't pass laws that let the greedy take our rights away.
These silly companies that try to lock us out often end up hurting themselves more. When you start treating your customers with contempt, as cattle to be corralled, milked and exploited, and incapable of independent thought, they leave.
Microsoft is getting increasingly desperate. I've been working as a Software Engineer now for over a decade and I haven't written a single line of code for, or sold a single product that runs Windows. It's all been Unix (Solaris) and Linux.
Google is the new Microsoft. Android is the new Windows.
I've been running AMD processors since 1999 when I bought a K6-2/400. I'm currently on a Phenom II X4 940 BE at 3.0GHz. I keep my Athlon XP 2000+ (1.67GHz) as a secondary machine and print server.
AMD stuff rules. Over the years, I've bought and used intel and AMD for work. The intel stuff isn't that bad nowadays, but the AMD stuff is better for me.
My current motherboard is an ASUS M4A77D which is probably a little over 18 months old (I'm getting too old to remember these things precisely) buy it doesn't have CoreBoot AFAIK. It has a conventional PeeCee BIOS.
I have a lot of old UltraSPARC boxes lying around and, of course, they have Open Firmware which means a FORTH system:-)
It would be really cool if mainstream motherboards came with it. UEFI from intel looks like yet another case of intel NIH sour grapes. They could easily have brought out an implementation of Open Firmware. In fact, they could have "leveraged" the open source implementation (OpenBIOS).
I suppose it better serves their (intel's) business needs to have a proprietary non-standard locked-down firmware implementation of their own.
I once did OS development on a storage appliance that used CoreBoot (then LinuxBIOS) to load Linux directly off of a raw flash disk. I modified it to use a bootloader called FILO so that the kernel could be on an ext2 filesystem, and you could choose from various configurations and root partition images.
A few years ago it struck me that it should be possible to implement a simple GUI or menu system in Open Firmware to hide the command line and I thought it would be a cool hack for a laugh, but I think someone beat me to it by several years...
I can see that there will be a flurry of unencumbered Free/Open Source BIOS/firware software being developed.
Perhaps for large corporate deployments, the manufacturer could be persuaded to to the BIOS configuration for you, or be paid to install something like OpenBIOS?
If I'd been 10 years younger I'd have been all indignant and worried, but these things have a habit of sorting themselves out.
Fortunately, being a pinko-Euro Commie I don't have to live amongst US politics first hand, however I suffer from their effects on the wider world. This Tea Party is amusing in a black comedy sort of way. It's amazing that something relatively main-stream that's even worse than Republicanism has taken off...
David Cameron is just making sure that as much money as possible gets into the hands of our Lords and Masters as is Right, Proper and the Natural Order of Things.
If you've been doing it all your life, it's not senility!:-)
I find that my memory recall has been getting steadily worse as I get older, for example, not being able to think of words in the middle of sentences, forgetting what things are called, mixing things up etc.
However, my ability to solve problems seems to have improved.
I get a lot more done, but I get very tired more often. The more tired I am, the more muddles up I get...
Actually, it was when I was about 14 or 15 years old that I noticed I was muddling things up. I am/was very good at maths, but I started to write numbers down in the wrong order, and there are many words I can't spell no matter how hard I try to learn them. When I'm tired, it's worse.
The other trick I learned is to write down all my crazy, distracting but cool and exciting ideas in a note book or on post-it notes to free up my mind to get back to the job I'm supposed to be concentrating on.
Text files, sed, grep and vi are very helpful too.
My problem has never been allowing the mind to wander, it's always been chasing the damn thing down and getting to to do something constructive. Think outside the box they say, but what if you were born without one?
There's a certain knack to it, but it's taken me well into my late 30s to be able to do it "on demand" and even then it's difficult sometimes.
When I was younger, I used to try to force myself to concentrate but it was always counterproductive. At best I used to get bad butterflies in the stomach, and at worst migraines and aching muscles.
With the experience of age, I've learned not to be so strict with myself, and kind of potter around the periphery of what I intend to do, maybe just reading and analysing very superficially. When I get it right, and if I am not interrupted too much (that's something other people are responsible for but you can hide away from them or make yourself unavailable), I drift as if by magic into "the zone." Very often I find that an hour and a half have gone by without noticing it, and I get much more done that I thought possible.
The trick is to start off with something very easy, something that doesn't even feel like work, or like it requires any effort. If you can start with something very untaxing, the mind kind of wanders in to the main task...
Oh, and the doctor has been giving me all sorts of pills for many years now, too.:-)
There's a good one for anxiety-type disorders called Hydroxyzine. It's actually an antihistamine. I don't have to take it very often.
You are today's winner!
What I meant to say was "pointers on the stack that point to objects dynamically allocated in freestore (on the heap)."
Oh, and another thing, I once read some punditry that freestore and the heap are different in the context of C++. What is that all about?
In my day, we had the heap and the stack and we smiled and liked it.
... despite "CloudFlare" it would seem.
Ah, right, of course.
And presumably "*" is overloaded? And how do you know whether a pointer is smart or not? Presumably you look at the #includes? Right. What if someone uses a different smart pointer library/template/whatever?
And what about new and delete and arrays, vectors, and all that jazz?
So why don't they just make pointers behave like that in the first place? Oh, because that would break backwards compatibility with C source (you are meant to have swallowed the pill and be compiling all your C code in your C++ compiler, and modify it where its broken)... even although the language isn't a strict superset of C and you can't rely on the behaviour of the compiled code to be the same...
So why don't you just forget C++, keep your "old" C code, and use a better high-level language for the OOP stuff, calling the low-level C stuff where required?
But, but, but...
C++ is getting more like Religion as time goes on.
There are two types of people in this world: those that pretend to understand C++ and those that don't pretend that they don't.
What if you have pointers to objects on the stack?
And what happens to your nice RAII objects on the stack when another method further down throws an exception?
Thanks. I'll remember that if I ever need to write a Qt app.
If you think C++ is hard to learn wait until you have to learn how a complex piece of software is written. On anything other than small or toy applications...
I've been a software engineer for over a decade now and worked for some very large companies on huge projects (tens of millions of lines on top of the OS), and I've yet to see any "well written" C++. None. It's all been ugly, convoluted, bloated, unsafe, incomprehensible garbage.
A very substantial amount of time and effort is invested in just trying to pick apart the C++ spaghetti. The C tends to be pretty bad too, but not in the same ballpark as the C++.
Not everyone is a Herb Sutter, Andrew Koenig or Bjarne Stroustrup, and they are few and far between even in large and powerful companies.
C++ is very dated. There are better tools nowadays.
Given that KDE and its applications are written in and married to C++ (and QT) I'm not surprised that few people want to contribute.
I know that C++ is the Big Thing and Right Thing in mainstream industry, but it is extremely complex with an enormous learning curve and huge demands on development resources, and developer time.
I, for one, certainly wouldn't contribute to a C++ project for fun. I only do it when I'm paid, and only if I can't avoid it.
I looked at the video, and I actually thought it was ironic, a clever satire on the current state of popular culture.
There is no way they were being serious. None.
Like I said, I'm not too good at reading and I tend to miss things out.
The Hobbit and Harry Potter are not science fiction: they're "Fantasy."
Mrs. Turgid teaches English at secondary level (12-18 years) and she says that Harry Potter isn't that great technically (in terms of the quality of the writing) but it has been immensely valuable in that it has go children reading books again.
She's a great Tolkein fan and reads LOTR once a year, every year. I've tried. When I was 10 I didn't make it past Bilbo's birthday (it was pointless, boring and nothing happened), and when the films came out in the 2ks I tried again and made it on to RotK but didn't finish it (no depth, just a series of rather hum-drum encounters and a load of nonsense about magic and superstition). It just doesn't float my boat. I'd read all the Asimov Robot books by the time I was 12 and gave up with SciFi after that (and fiction in general). I was more interested in inventing the future rather than reading about someone else's idea of what it might be like in 1000 years...
I'm not doing too well, as you can imagine.
Had they not folded, they most likely would have moved to HPPA, later moved to IA64 and would probably be in the process of moving again.
The few remaining polar bears are very thankful that IA64 didn't gain momentum...
If it were Cheryl Cole or Simon Cowell, they'd listen.
Send emails that contain as much information that you can cram in there from wikipedia.
No, use high-entropy random numbers ... much harder to compress/deduplicate :-)
Make sure you invest in all the storage companies first.
Oh, so you're a paedophile drug-dealing terrorist now, are you?
You're probably a pinko-commie too!
Half past two.
Second on the left, straight on past the police station and first right after the pedestrian crossing.
What, the summary doesn't scare you?
It depresses me.
Congratulations, you are now a 'grown up'.
I'm very old all of a sudden.
Over the years, I have been very lucky to learn and work in environments where I have acquired knowledge through curiosity that helps me to have a certain degree of personal freedom over these fascist corporate restrictions.
I'm a pretty darn good C coder, I know a bit of assembly, I've worked on everything from web GUIs down to protected-mode boot loaders and I'm reasonably good with vi/vim.
I was fortunate to cut my teeth on an 8-bit Z80 micro in the early 80s.
I'm not scared of DRM, I'm not scared of flashing BIOS chips, I'm not scared of setting dip switches and jumpers, I can use a disassembler and know how to decipher hex. You won't find Windows on any of my computers.
I'm quietly confident nowadays that the various Free and Open Source movements have sufficient momentum and influence that despite what the most evil and absurd business interests try to do to deny our freedoms, for the sufficiently savvy and motivated, we will almost always be able to do what we want to.
Eternal vigilance is important, and we must keep out-innovating them. We must make sure that our politicians don't pass laws that let the greedy take our rights away.
These silly companies that try to lock us out often end up hurting themselves more. When you start treating your customers with contempt, as cattle to be corralled, milked and exploited, and incapable of independent thought, they leave.
Microsoft is getting increasingly desperate. I've been working as a Software Engineer now for over a decade and I haven't written a single line of code for, or sold a single product that runs Windows. It's all been Unix (Solaris) and Linux.
Google is the new Microsoft. Android is the new Windows.
I've been running AMD processors since 1999 when I bought a K6-2/400. I'm currently on a Phenom II X4 940 BE at 3.0GHz. I keep my Athlon XP 2000+ (1.67GHz) as a secondary machine and print server.
AMD stuff rules. Over the years, I've bought and used intel and AMD for work. The intel stuff isn't that bad nowadays, but the AMD stuff is better for me.
My current motherboard is an ASUS M4A77D which is probably a little over 18 months old (I'm getting too old to remember these things precisely) buy it doesn't have CoreBoot AFAIK. It has a conventional PeeCee BIOS.
I have a lot of old UltraSPARC boxes lying around and, of course, they have Open Firmware which means a FORTH system :-)
It would be really cool if mainstream motherboards came with it. UEFI from intel looks like yet another case of intel NIH sour grapes. They could easily have brought out an implementation of Open Firmware. In fact, they could have "leveraged" the open source implementation (OpenBIOS).
I suppose it better serves their (intel's) business needs to have a proprietary non-standard locked-down firmware implementation of their own.
I once did OS development on a storage appliance that used CoreBoot (then LinuxBIOS) to load Linux directly off of a raw flash disk. I modified it to use a bootloader called FILO so that the kernel could be on an ext2 filesystem, and you could choose from various configurations and root partition images.
A few years ago it struck me that it should be possible to implement a simple GUI or menu system in Open Firmware to hide the command line and I thought it would be a cool hack for a laugh, but I think someone beat me to it by several years...
I can see that there will be a flurry of unencumbered Free/Open Source BIOS/firware software being developed.
Perhaps for large corporate deployments, the manufacturer could be persuaded to to the BIOS configuration for you, or be paid to install something like OpenBIOS?
If I'd been 10 years younger I'd have been all indignant and worried, but these things have a habit of sorting themselves out.
Fortunately, being a pinko-Euro Commie I don't have to live amongst US politics first hand, however I suffer from their effects on the wider world. This Tea Party is amusing in a black comedy sort of way. It's amazing that something relatively main-stream that's even worse than Republicanism has taken off...
David Cameron is just making sure that as much money as possible gets into the hands of our Lords and Masters as is Right, Proper and the Natural Order of Things.
If you've been doing it all your life, it's not senility! :-)
I find that my memory recall has been getting steadily worse as I get older, for example, not being able to think of words in the middle of sentences, forgetting what things are called, mixing things up etc.
However, my ability to solve problems seems to have improved.
I get a lot more done, but I get very tired more often. The more tired I am, the more muddles up I get...
Actually, it was when I was about 14 or 15 years old that I noticed I was muddling things up. I am/was very good at maths, but I started to write numbers down in the wrong order, and there are many words I can't spell no matter how hard I try to learn them. When I'm tired, it's worse.
The other trick I learned is to write down all my crazy, distracting but cool and exciting ideas in a note book or on post-it notes to free up my mind to get back to the job I'm supposed to be concentrating on.
Text files, sed, grep and vi are very helpful too.
My problem has never been allowing the mind to wander, it's always been chasing the damn thing down and getting to to do something constructive. Think outside the box they say, but what if you were born without one?
There's a certain knack to it, but it's taken me well into my late 30s to be able to do it "on demand" and even then it's difficult sometimes.
When I was younger, I used to try to force myself to concentrate but it was always counterproductive. At best I used to get bad butterflies in the stomach, and at worst migraines and aching muscles.
With the experience of age, I've learned not to be so strict with myself, and kind of potter around the periphery of what I intend to do, maybe just reading and analysing very superficially. When I get it right, and if I am not interrupted too much (that's something other people are responsible for but you can hide away from them or make yourself unavailable), I drift as if by magic into "the zone." Very often I find that an hour and a half have gone by without noticing it, and I get much more done that I thought possible.
The trick is to start off with something very easy, something that doesn't even feel like work, or like it requires any effort. If you can start with something very untaxing, the mind kind of wanders in to the main task...
Oh, and the doctor has been giving me all sorts of pills for many years now, too. :-)
There's a good one for anxiety-type disorders called Hydroxyzine. It's actually an antihistamine. I don't have to take it very often.
God uses a Z80 when he can't get a 6809. The 6502 was a pile of rubbish. By 1802, do you mean those Soviet things?