Self-Motivation
David Goggins
Former Navy Seal
Career Development
Bryan Cranston
Actor
Critical Thinking
Liv Boeree
International Poker Champion
Emotional Intelligence
Amaryllis Fox
Former CIA Clandestine Operative
Management
Chris Hadfield
Retired Canadian Astronaut & Author
Learn
from the world's big
thinkers
Start Learning

Why the Programming Language C Is Obsolete

Question: What is the difference between C and C++?
Bjarne Stroustrup:  C has the basic mechanisms for expressing computations.  It has iterations, it has data types, it has functions and that’s it.  It doesn’t get into the game of expressing abstractions.  So if I want a matrix in C, I would have to say, I want an array and then I want a whole bunch of arrays and when I want to get the third element I have to program my way down to the third element of the fourth row or something like that.  

In C++ you can define something, call it a matrix, you define a subscript operator. If you don’t want rectangular matrixes you can get pentadiagonal matrices, triangular matrices that’s the kind of stuff that people... the expert in that field are interested in.  And you build that set of concepts and then you program it directly.  It’s easier to program, it’s easier to debug and sometimes it’s even easier to optimize for performance when you are expressing the notions at the higher level, at the level where an expert in the field operates, rather than trying to have the expert in the field, say the physicist, also be an expert in dealing with the hardware, with the computer.  There are fields still where you have to have a physicist and a computer scientist to get the work done, but we would like to minimize those because the skill sets are not the same.  So you want to lift from the hardware towards the human level.  

Question:
Is C obsolete?

Bjarne Stroustrup: This is somewhat controversial.  I think it is obsolete.  I think the languages should have been merged into one, so that C would have been a subset of C++ instead of nearly a subset of C++. And then people could have used whatever parts of the C++ tool set they needed.  As it is now, there are still enough incompatibilities that you have to remember which language you’re writing in, and I don’t think that is necessary.  It appears to be a historical necessity, but it is not a technical necessity.  

I’ve argued for compatibility, very strong compatibility, all the time.  I mean, I started working on C++ three doors down from Dennis Ritchie and we were talking every day.  The competition and tension that has been between C and C++ over the decades certainly didn’t come from home.  

Dennis Ritchie wrote that first book that Brian Carnahan, now I’ll have dinner with Brian next week.  We’re still very good friends as we’ve always been, but sometimes the programmers of the languages don’t quite see it that way.  It should have been one language.

Recorded August 12, 2010

Interviewed by Max Miller

C should have been integrated as a subset of C++, says Stroustrup.

Radical innovation: Unlocking the future of human invention

Ready to see the future? Nanotronics CEO Matthew Putman talks innovation and the solutions that are right under our noses.

Big Think LIVE

Innovation in manufacturing has crawled since the 1950s. That's about to speed up.

Keep reading Show less

Quantum particles timed as they tunnel through a solid

A clever new study definitively measures how long it takes for quantum particles to pass through a barrier.

Image source: carlos castilla/Shutterstock
  • Quantum particles can tunnel through seemingly impassable barriers, popping up on the other side.
  • Quantum tunneling is not a new discovery, but there's a lot that's unknown about it.
  • By super-cooling rubidium particles, researchers use their spinning as a magnetic timer.

When it comes to weird behavior, there's nothing quite like the quantum world. On top of that world-class head scratcher entanglement, there's also quantum tunneling — the mysterious process in which particles somehow find their way through what should be impenetrable barriers.

Exactly why or even how quantum tunneling happens is unknown: Do particles just pop over to the other side instantaneously in the same way entangled particles interact? Or do they progressively tunnel through? Previous research has been conflicting.

That quantum tunneling occurs has not been a matter of debate since it was discovered in the 1920s. When IBM famously wrote their name on a nickel substrate using 35 xenon atoms, they used a scanning tunneling microscope to see what they were doing. And tunnel diodes are fast-switching semiconductors that derive their negative resistance from quantum tunneling.

Nonetheless, "Quantum tunneling is one of the most puzzling of quantum phenomena," says Aephraim Steinberg of the Quantum Information Science Program at Canadian Institute for Advanced Research in Toronto to Live Science. Speaking with Scientific American he explains, "It's as though the particle dug a tunnel under the hill and appeared on the other."

Steinberg is a co-author of a study just published in the journal Nature that presents a series of clever experiments that allowed researchers to measure the amount of time it takes tunneling particles to find their way through a barrier. "And it is fantastic that we're now able to actually study it in this way."

Frozen rubidium atoms

Image source: Viktoriia Debopre/Shutterstock/Big Think

One of the difficulties in ascertaining the time it takes for tunneling to occur is knowing precisely when it's begun and when it's finished. The authors of the new study solved this by devising a system based on particles' precession.

Subatomic particles all have magnetic qualities, and they spin, or "precess," like a top when they encounter an external magnetic field. With this in mind, the authors of the study decided to construct a barrier with a magnetic field, causing any particles passing through it to precess as they did so. They wouldn't precess before entering the field or after, so by observing and timing the duration of the particles' precession, the researchers could definitively identify the length of time it took them to tunnel through the barrier.

To construct their barrier, the scientists cooled about 8,000 rubidium atoms to a billionth of a degree above absolute zero. In this state, they form a Bose-Einstein condensate, AKA the fifth-known form of matter. When in this state, atoms slow down and can be clumped together rather than flying around independently at high speeds. (We've written before about a Bose-Einstein experiment in space.)

Using a laser, the researchers pusehd about 2,000 rubidium atoms together in a barrier about 1.3 micrometers thick, endowing it with a pseudo-magnetic field. Compared to a single rubidium atom, this is a very thick wall, comparable to a half a mile deep if you yourself were a foot thick.

With the wall prepared, a second laser nudged individual rubidium atoms toward it. Most of the atoms simply bounced off the barrier, but about 3% of them went right through as hoped. Precise measurement of their precession produced the result: It took them 0.61 milliseconds to get through.

Reactions to the study

Scientists not involved in the research find its results compelling.

"This is a beautiful experiment," according to Igor Litvinyuk of Griffith University in Australia. "Just to do it is a heroic effort." Drew Alton of Augustana University, in South Dakota tells Live Science, "The experiment is a breathtaking technical achievement."

What makes the researchers' results so exceptional is their unambiguity. Says Chad Orzel at Union College in New York, "Their experiment is ingeniously constructed to make it difficult to interpret as anything other than what they say." He calls the research, "one of the best examples you'll see of a thought experiment made real." Litvinyuk agrees: "I see no holes in this."

As for the researchers themselves, enhancements to their experimental apparatus are underway to help them learn more. "We're working on a new measurement where we make the barrier thicker," Steinberg said. In addition, there's also the interesting question of whether or not that 0.61-millisecond trip occurs at a steady rate: "It will be very interesting to see if the atoms' speed is constant or not."

Self-driving cars to race for $1.5 million at Indianapolis Motor Speedway ​

So far, 30 student teams have entered the Indy Autonomous Challenge, scheduled for October 2021.

Indy Autonomous Challenge
Technology & Innovation
  • The Indy Autonomous Challenge will task student teams with developing self-driving software for race cars.
  • The competition requires cars to complete 20 laps within 25 minutes, meaning cars would need to average about 110 mph.
  • The organizers say they hope to advance the field of driverless cars and "inspire the next generation of STEM talent."
Keep reading Show less

Bubonic plague case reported in China

Health officials in China reported that a man was infected with bubonic plague, the infectious disease that caused the Black Death.

(Photo by Centers for Disease Control and Prevention/Getty Images)
Coronavirus
  • The case was reported in the city of Bayannur, which has issued a level-three plague prevention warning.
  • Modern antibiotics can effectively treat bubonic plague, which spreads mainly by fleas.
  • Chinese health officials are also monitoring a newly discovered type of swine flu that has the potential to develop into a pandemic virus.
Keep reading Show less

The dangers of the chemical imbalance theory of depression

A new Harvard study finds that the language you use affects patient outcome.

Image: solarseven / Shutterstock
Mind & Brain
  • A study at Harvard's McLean Hospital claims that using the language of chemical imbalances worsens patient outcomes.
  • Though psychiatry has largely abandoned DSM categories, professor Joseph E Davis writes that the field continues to strive for a "brain-based diagnostic system."
  • Chemical explanations of mental health appear to benefit pharmaceutical companies far more than patients.
Keep reading Show less
Quantcast