Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:C++ is C (Score 1) 641

Interestingly, I've found many C libraries actually use a very OOP-like interfaces - just without the "objects". For instance, you'll first call some sort of create() function to get a pointer to a struct that contains state data or perhaps a handle. You then pass this pointer or handle to "member" functions - essentially, a function that operates on or modifies the state of that data. Then you release the allocated context struct via some destroy() function. That's pretty close to what a class and it's member functions do - the only difference is that C++ member function pass the handle or context pointer implicitly as a hidden first parameter. The create() and destroy() functions are the constructor and destructor respectively.

Granted, it gets a bit more complicated when you start dealing with inheritance and various access permissions, but that's really the heart of OOP - packages of data and groups of functions that operate on that data. C++ certainly wasn't my first language - I knew BASIC and Pascal before that, but the basic premise of OOP clicked with me. It definitely did take a while before I was *good* at designing classes though. For all of my career, we used C++ at work, so I was learning and improving all the time, and there were always colleagues who I could ask for advice. If you don't have anyone who is showing you the ropes, I can see how that would be tough.

Comment Re:You don't know C++ properly until you know C (Score 2) 641

I'm not sure I agree. I learned C++ first and then C a year or two later, and I can manage raw pointers just fine, thank you. I just think you're crazy if you do it willingly when there are much better alternatives available.

I've seen plenty of C turned C++ programmers who essentially treat classes like a giant package for wrapping up loosely related functions into horrifying kitchen-sink classes. They don't know how to create proper interfaces, and pass all sorts of raw pointers around, managing memory manually, even though there's often no reason for doing so. In short, they've never dropped the habits they acquired from C. And frankly, bad C++ is arguably worse than bad C.

One could argue that this is a result of learning C before C++, but honestly, it's really just a matter of programmer skill and/or competence. A C programmer should be able to learn the ins and outs of OOP and generics / templates, and a C++ programmer should be able to drop down to low-level pointer-intensive code if they need to. If not, it just means that they stopped trying to learn new things - nothing more than that. Or, maybe no one ever took the time to point out better methods of writing code.

Anyhow, C is a dangerous, crusty language, but it's not going away anytime soon due to it's sheer pervasiveness, utility, and efficiency. It's essentially the common denominator of languages, which is why so many libraries are written in C. Just about any language can interop with C (or it generally doesn't get off the ground). Moreover, entire operating systems are written in C, meaning it's going to stay relevant as long as those OSes are around, and I don't see them fading away in the near future.

Comment Re:"This problem of freeriders is something... (Score 1) 205

Where exactly does this money come from? If the government simply prints it, congrats, you've just massively devalued the dollar through inflation. Anyone who works would have their income skyrocket because of this (in dollar amounts, not in purchasing power), and the net result would be that little would change in terms of real purchasing power. If you actually taxed the folks who worked to siphon money over to those that didn't, the increased taxes would reduce the incentive to work and improve one's economic outlook, and cause a significant drain on the economy. If you borrow the money, you can get a free ride for a few years until we can no longer afford to pay the interest, and then our economy would implode because of the inevitable default or hyperinflation cycle.

You can't just supply the entire populous with an income out of thin air. Economics has it's own laws, just like physics, and you can't simply ignore them by creating value from nothing. Either you devalue money so much as to make it worthless, or you utterly destroy your national economy with massive increases in confiscation of personal income and/or property through taxation. Or, you borrow and just postpone the inevitable for a few years until interest payments catch up with you.

Comment Re:Still not legal, right? (Score 1) 92

Trucking is going away soon? I think self-driving vehicles are farther away than most people think, and mass deployment is even further away. Hand delivery will be required for packages larger than 5 lbs for a while. Don't tell me a robot is going to climb out of the truck and carry that package to my doorstep too? And you think all the smaller warehouses and distribution centers in the US (or world) will suddenly find the collective billions of free dollars needed to convert all their operations to complete automation? I'm guessing those systems don't come cheap.

I think people predicting complete end-to-end automation in the near future are vastly overestimating the limitation and cost of replacing or upgrading all of today's current infrastructure. Sure, it will undoubtedly happen eventually, but I think it will be a very gradual shift over many decades, not some revolution that takes place in a few years.

Comment Re:Still not legal, right? (Score 1) 92

Auto-navigating in the air seems to be vastly easier than on the ground. It's not the simple case of freeway driving you have to worry about - it's all the crazy edge cases that likely make it so damnably difficult. Commercial airliners can already pretty much fly themselves if they had to, and the military has had fully automated drones for quite some time now.

I'd take that bet, and would even spot you a decade.

Comment Re:Still not legal, right? (Score 3, Insightful) 92

These things only go the last part of the journey, and only with small, lightweight objects (about 5lbs or so). You're still going to need a massive delivery fleet to move everything to local warehouses from other states or countries, and for heavier or bulky items you'll still need traditional delivery vehicles. There are also going to be many areas or sites for which drone delivery simply isn't practical.

Moreover, I think this is not going to be a rapid transition either. It's likely to be something that's phased in over a few decades, not a few years, so you won't see a sudden effect on the economy.

Comment Re:How... (Score 1) 24

Are there now politically correct and non-politically correct ways to take samples of asteroids? Apparently so.

The word "bomb" is probably not the best choice, though. It might be better to describe it as "blasting" rather than "bombing". The technical differences are possibly minor in this case, but the semantic differences are significant.

Comment Re:I see nothing exciting here (Score 1) 390

It's sort of surprising to me that so many people with technical backgrounds like the SW series, given all of the science the movies completely disregard:

Because... many of us well understand that SW is really a fantasy set in outer space, and we're not looking for technical realism? Once you realize and accept this, you'll stop worrying about technical issues. I mean... come on... take a hint. There's a princess and the knights who rescue her. There are wizards with swords and magic powers. The film follows the classic "hero's journey" paradigm. Pure fantasy with a science fiction veneer.

Thank God Hollywood knows better than to follow the example of 2001. Nothing against it - it's a fine movie for a small subset of people who care about technical accuracy in space scenes rather than... well... fun. But that's not what Star Wars is about. 2001 is not the film to take your 7 year old son to. "Alien and intriguing" is not what Star Wars is trying to be.

Comment Re:It's just a political vendetta (Score 2) 237

Note in the article that they've all but admitted they're going to fine Google billions of dollars no matter what - hell, they've already figured out how much they want to extort. To me this sort of sounds like prep work to justify a shakedown yet to come.

Predecessor Joaquin Almunia tried and failed to settle the case. A series of concessions made by Google were rejected, leading Mr Almunia to suggest that the only option was a fine. This could be up to $5bn.

Comment Re:Environmentalists is why we still pump carbon (Score 1) 652

Links from that search you posted:

http://www.salon.com/2013/06/2...

Faced with the near-term catastrophe of climate change and the planet-poisoning effects of fossil fuels, is the environmental movement changing its tune on nuclear energy? It’s not a new question, and let’s be clear that the short answer is still no – or mostly no. You can’t find one major environmental organization, from activist groups like Greenpeace to mainstream conservation groups like the Nature Conservancy or the National Audubon Society, that has come out publicly in favor of nuclear power.

http://www.cnbc.com/id/1016079...

Currently, support for nuclear power among most environmentalists is tentative at best. But at least a few voices within the movement insist that soaring global demand for energy makes it imperative for climate change advocates to fully embrace atomic power.

http://www.voanews.com/content...

The four scientists say the risks of expanding nuclear energy are much smaller than those of continuing to rely on fossil fuel power plants, which they say treat the atmosphere "as a waste dump."

U.S. environmental advocacy group, the Natural Resources Defense Council, rejected the letter's emphasis on nuclear power. Spokesman Bob Deans says the world gains nothing from "substituting one set of environmental nightmares for another."

Interestingly, with the exception of the top link or two that shows a very minor environmental group or small numbers of environmentalists in favor of nuclear, most links demonstrate that the environmental movement is still very much anti-nuclear.

Slashdot Top Deals

Function reject.

Working...