Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment Re:C++ not crap (Score 1) 270

You count it as a negative that C++ is evolving, on the basis that the new features might break things. And yet, you're ready to accept an entirely new language, which is like starting over.

While it's true that newer versions of C++ _can_ require modifications to older C++ code, that is the exception rather than the rule. Furthermore, when old C++ code needs to be changed to be compatible with a newer C++ variant, the reason is generally that the old C++ code was bad in some way. Well-written code tends to not require changes.

Why move from C to C++? Think of C as being C++91 (the first year of Linux). We then have: C++91, C++98, C++03, C++11, C++14, C++17, C++20. At each iteration (not counting 03), there have been significant new features added which eliminate redundancy, reduce line count, increase safety, increase the speed of coding, and most importantly, reduce bugginess. That's why.

Comment C++ not crap (Score 2, Insightful) 270

Which C++ is "crap"? 98? 03? 11? 14? 17? 20?

The great beauty of C++ is that it "is C". Can you do, in C, something you can't do in C++? Not that I'm aware of.

With each new iteration, C++ provides improved support for abstraction, and thereby, reduction of redundancy and preemption of bugs. All this, without sacrificing the fact that it still "is C" when you want it to be.

I'm intrigued by Rust, and see myself potentially migrating to it. However, C++ is, in no sense, "crap".

Comment Re:I never understood the cruelty argument (Score 1) 315

You are focusing only on the cruelty of animal death. How about the cruelty of the animal's life?

In short: ask yourself how you would feel, living the life and experiencing the death of a typical industrial food animal, vs living a natural life and suffering a natural death. Your share of the difference is the moral load you are carrying by participating in the industrial food animal business. You could make the same comparison to evaluate your moral load when you hunt, or when animals are raised for food in a more traditional (and natural) context. I expect you'll find the moral load of these is far lower.

Comment C++ - a romance (Score 1) 370

Over my 30+ year programming career, the languages I've used have modulated somewhat. At first, it was all C (in the real world - not counting college). Well, that and various assembly languages. I had a brief flirtation with an early, buggy, version of Ada. Eventually, I reached a breaking point, where the complexity of my projects exceeded the capacity of C. I dived headlong into C++, which became my base language. Around this time I also started doing significant amounts of Bash scripting - pretty much bypassing Perl entirely. Next came PHP - in a particularly nasty combination with embedded C. I came to understand the severe limits of interpretive (dynamically typed) languages, in building complex systems. Eventually, I replaced the whole stillborn monster with a tight C++ design. Along with the PHP came JavaScript. There's no substitute for JavaScript, so it hung around. Next came Java and Android. Very nice. But a little too fancy for my tastes. In the final wave came Python, along with TensorFlow. But still, to this day, the bulk of my programming is in my go-to combination of C++ with some Bash glue.

Comment Needed: heroes (Score 5, Insightful) 898

Do you not hear what this person is saying? What dozens upon dozens of highly-knowledgeable people with decades of experience at the highest levels of government have been blaring from the rooftops, with ever-increasing urgency? Our current President - morally unfit, erratic, unstable, with a love for authoritarianism, and disdain for our Constitution - poses a grave danger to our Republic. To our freedom. We are in a full-blown constitutional crisis. People who value our democracy are fighting to save it. The United States, as a country, desperately needs more democracy-loving heroes like McCain.

Comment Re:Wow (Score 1) 240

If something exists, then I think it is reasonable to say there is a way to prove that it exists. If we accept the idea that things can exist, which cannot be proven to exist, then what does it mean to "exist"? How does the concept of "exist" differ from the concept of "doesn't exist"?

Comment Re:Not gonna happen (Score 1) 595

It's simple. Using C++, it's possible to more quickly write fast, bug-free code. Those three factors together. The resulting code is more malleable: the code (assuming it is well-written) is robust to refactoring.

Yes, for shorter programs, a weakly typed language like Python will get you results more quickly. Python certainly has its place for rapid prototyping. However, once you get to a moderate level of complexity (several thousand lines, say), programming without a static type system is like mountaineering without safety ropes.

C++ is faster than Java and C#. On the other hand, it's possible to write better development tools, and better-integrated libraries, for Java & C#, due to reflection.

C++ is as fast as C. The only real advantage of C over C++ is the smaller code footprint.

All of this means that C++ is the language of choice for complex, performant code.

I'm excited by the promise of Rust. Being better than C++ is a high hurdle to jump. Does Rust pull it off? I hope so.

Comment Re:Who defines what is hateful (Score 1, Insightful) 136

You mean hateful words like the following...?

"Whoever does any work on [the Sabbath] must be put to death."

"... in the cities of the nations the LORD your God is giving you as an inheritance, do not leave alive anything that breathes."

"Whoever is captured will be thrust through; all who are caught will fall by the sword. Their infants will be dashed to pieces before their eyes; their houses will be looted and their wives ravished."

"Now kill all the boys. And kill every woman who has slept with a man, but save for yourselves every girl who has never slept with a man."

"If anyone comes to me [Jesus] and does not hate his father and mother, his wife and children, his brothers and sisters—yes, even his own life—he cannot be my disciple."

"They will fall by the sword; their little ones will be dashed to the ground, their pregnant women ripped open."

"We completely destroyed them, as we had done with Sihon king of Heshbon, destroying every city—men, women and children."

"If your very own brother, or your son or daughter, or the wife you love, or your closest friend secretly entices you, saying, "Let us go and worship other gods" (gods that neither you nor your fathers have known, gods of the peoples around you, whether near or far, from one end of the land to the other), do not yield to him or listen to him. Show him no pity. Do not spare him or shield him. You must certainly put him to death."

Comment Re:C++ is superior: more strongly typed (Score 1) 407

Are you referring to dynamic typing? In my (perhaps simplistic) view of the world, there is dynamic typing and static typing. "Strong" typing, to me, is static typing.

What other kind of typing is there? I'd be interested to hear about Common Lisp's class system, which seems to be in-between static and dynamic somehow.

I agree with you about C++'s weakness (one example) - that you need to use a pointer (uggghh!) in order to get polymorphism. That's an example of why C++ doesn't score a 10/10 on the scale.

Slashdot Top Deals

"Well, social relevance is a schtick, like mysteries, social relevance, science fiction..." -- Art Spiegelman

Working...