Forgot your password?
typodupeerror

Comment Re:Yes (Score 5, Informative) 603

Why do you need to separately declare and then define every piece of your API? Because that's how C worked, and C did it that way because of the limitations of compilers in 1977. It's totally unnecessary in a modern language, and it makes your code way less clean. But that's how C++ works.

You don't have to. You can define all your code inside of the class, like in Java. It's up to the compiler/linker to store that mess somewhere. But for non-template code, it's more efficient (speed and memory) to have this separated, for both compiling and linking.

Why are templates designed in a way that makes you put the entire implementation in the header file? That was totally unnecessary, and it leads to clunky code. But that's how C++ works.

Because the compiling of the template is totally depending of the template arguments. Last time I've looked into Java, there were no templates (or even variadic templates), so this is really not comparable.

How come if a parent class doesn't mark its destructor as virtual, all subclasses will (silently) fail to get cleaned up correctly? This is just bad design. It's probably caused countless bugs over the years.

Only if the subclasses have virtual functions, then you should also make the destructor virtual. There are good reasons to have non-virtual destructors in parent classes. Why should I pay for a feature, if I don't need it? Here static code analysis helps.

The language is full of inconsistencies because no one ever bothered to fix them. Why is "this" a pointer instead of a reference?

Is this really an inconsitency? For me, pointers are no problem, they are an additional grade of freedom for expressing what I want. Yes, references are internally only pointers with the same speed and they normally don't have the value 0 (as long as you did not mess them up), but last is also true for 'this'. So it really doesn't matter.

Why does exception.what() return a char* instead of a string&?

Good question, but nearly irrelevant in well designed programs, that try to avoid exceptions during normal program flow. However, if you want to concatenate constant strings at compile time to get better error messages, there are tricks with variadic templates. With gcc, this even works with __PRETTY_FUNCTION__.

There are tons of minor points like this that could easily have been better if someone had bothered to think about consistency. But no one did. You can avoid the worst parts of C++, but what remains is still a poor substitute for a well designed language.

Perhaps. This language is for professionals. It is huge and there are pitfalls. But it gives you the neccessary freedom to express *exactly* what you want. C had been designed as a shortcut for Assembler and this is still true for C++; there is no virtual machine in between. If you write business applications, well, then use something else, but I do embedded development in the automotive sector and here C++ is exactly what I want.

Windows

Submission + - Acer bosses: Windows 7 launches October 23rd, 2009

Sockatume writes: On the 30th of April 2009, Acer's vice-president for Europe discussed a new product, launching this September, which would support Windows 7's touch features. Asked whether this confirmed the Windows 7 release date as September 2009, he coyly remarked that "when it's in store it won't have Windows 7 pre-loaded." Microsoft would probably prefer that he stopped there, but he added: "We won't be actually selling [Windows 7] a day before the 23rd October." Their Managing Director for the UK helpfully clarified that while their product will ship with Windows Vista at launch, because it is on sale less than 30 days before the Windows 7 release date, it will be eligable for the "upgrade program" to get a free upgrade to the new OS. Whoops.
Red Hat Software

Submission + - Linux in every seat on the Airbus 380 (networkworld.com)

jpatokal writes: "Singapore Airlines will be rolling out the A380 "superjumbo" on October 26th, and a surprise awaits in the seat of every passenger: their personal Linux PC, running Red Hat. In addition to running the in-flight entertainment, passengers can also use a full copy of StarOffice, and there's a USB slot for importing/exporting documents or plugging in your own keyboard/mouse. Screen size is 10.6" (1280x768) in economy, 15.4" in business and a whopping 23" in first class. The system is already available on their current B777-300ER planes and will also be outfitted on the upcoming B787 Dreamliners."
Wine

Submission + - Wine 0.9.44 released (winehq.org)

jshriverWVU writes: "This is release 0.9.44 of Wine, a free implementation of Windows on Unix. What's new in this release: — Better heuristics for making windows managed. — Automatic detection of timezone parameters. — Improvements to the builtin WordPad. — Better signatures support in crypt32. — Still more gdiplus functions. — Lots of bug fixes."
Power

Submission + - U Delaware breaks solar power efficiency record (renewableenergyaccess.com) 1

mdsolar writes: "Renewable Energy Access is reporting that a consortium led by researchers at the University of Delaware has achieved 42.8% efficiency with a silicon solar cell. The method uses lower concentration (factor of 20 magnification) than the previous record holder Boeing-Spectrolab made cell (40.7% efficiency) so that it may have a broader range of applications since tolerances for pointing the device will be larger. They are now partnering with DuPont to build engineering and manufacturing prototypes under DARPA's Very High Efficiency Solar Cell program which supports work towards achieving 50% efficiency. It is expected that these cells can help improve the military battery logistics pipeline, providing "soldiers with more power at reduced weight." They expect to be in production in 2010. On a roof, such cells would require less than half the surface area to produce the same amount of power as today's standard solar panels. This might leave room for panels to power plugin hybrids for cases where roof area is too limited to do this with standard panels."
Sony

Submission + - Blue Blu-ray?

TopSpin writes: According to this story, at Japan's recent euphemistically named Adult Treasure Expo 2007, adult filmmakers said Sony had begun offering technical support — which was later confirmed by Sony PR, which stated that Sony would offer support to any filmmaker working on the format, no matter their industry. Apparently, Blu-ray is now the preferred media for Japanese porn.
Censorship

Submission + - Linus Torvalds Explains Scheduler Decision (kerneltrap.org)

Firedog writes: There's been a lot of recent debate over why Linus Torvalds chose the new CFS process scheduler written by Ingo Molnar over the SD process scheduler written by Con Kolivas, ranging from discussing the quality of the code to favoritism and outright conspiracy theories. KernelTrap is now reporting Linus Torvalds' official stance as to why he chose the code that he did. "People who think SD was 'perfect' were simply ignoring reality," Linus is quoted as saying, going on to explain that he selected the Completely Fair Scheduler because it had a maintainer who has proven himself willing and able to address problems as they are discovered. In the end, the relevance to normal Linux users is two part: one is the question as to whether or not the Linux development model is working, and the other is that with the recently released 2.6.23 kernel we should all notice an improved desktop experience.
Microsoft

Submission + - How Microsoft beat Linux in China (com.com)

kripkenstein writes: An analysis on TechRepublic details how Microsoft beat Linux in China, and the consequences of that victory:

Linux has turned out to be little more than a key bargaining chip in a high stakes game of commerce between the Chinese government and the world's largest software maker
[...]
The fact that [...] Linux failed to gain a major foothold in China is yet another blow to desktop Linux. After nearly eight years of being on the verge of a breakthrough, Linux seems more destined than ever to be a force in the server room but little more than a narrow niche and an anomaly on the desktop.
With the soon-to-be largest economy standardized on Windows desktops, desktop Linux does seem to have an uphill battle ahead of it.

Operating Systems

Submission + - Cross-OS file system that sucks less?

An anonymous reader writes: I recently got an external harddisk with USB 2.0/Firewire/Firewire 800/eSATA to be used for backup and file exchange — my desktop runs Linux (with a Windows partition for games but no data worth saving), and the laptop is a MacBook Pro.

So the question popped up: what kind of filesystem is best for this kind of situation? Is there a filesystem that works good under Linux, MacOS X and Windows? Linux has HFS+ support but apparently doesn't support journaling and there's also an issue with the case-insensitivity of HFS+.

Are we stuck with shitty VFAT forever or are there efforts underway to bring a modern filesystem (I'm thinking something like ZFS, BeFS, or XFS) to all platforms our there? Or are there other clever solutions like storing ISO images and loop-mounting those?
Space

Submission + - New carbon-based paper stronger than nanotubes (sciencemag.org)

LynnwoodRooster writes: "Science Magazine reports that a group from Northwestern University in Illinois has a new process for creating carbon-based paper that's stronger than nanotubes, and incredibly easy to use to make sheets of any desired sizes. Huge implications for aircraft, automobiles, and the ever-sought-after space elevator? Forget that, I want to make some new speaker cones with this technology..."
Security

Submission + - Researchers Crack *All* CA State Voting Machines

ewhac writes: "The San Francisco Chronicle is reporting that computer security researchers throughout the University of California system managed to crack the security on every voting machine they tested that has been approved for use in the state. The researchers are unwilling to say how vulnerable the machines are, as the tests were conducted in an environment highly advantageous to the testers. They had complete access to the devices' source code and unlimited time to try and crack the machines. No malicious code was found in any of the machines, but Matt Bishop, who led the team from UC Davis, was surprised by the weakness of the security measures employed. The tests were ordered by Secretary of State Debra Bowen, who has until Friday of next week to decide whether to decertify any of the machines for use in the upcoming Presidential primary election."
Patents

Submission + - A simple plan to defeat dumb patents (blogspot.com)

Steve Jones writes: "With the EU being rumoured to look at software patents again I thought I'd have a look at the root of the problem — the US Patent Office — and work out if there is a simple way to defeat dumb patents, and I think there is... The big thing, as everyone knows, that defeats a patent is prior art, at the Patent Office they have the definition of Prior Art which includes the phrase

"known or used by others in this country, or was patented or described in a printed publication in this or a foreign country"


Which made me think. If every time we have an idea that we think is "obvious" but not done before, or something we think would be interesting (e.g. Using a PVR for targeted ads) but don't have the money to create, then we should always blog about that idea, tag it as "prior art" via Technorati thus giving people an RSS feed.

My argument is that by doing this we can, rightly claim, that the ideas have been described in the 21st Century version of a printed publication, and even if that is challenged, it is undeniable that by using the RSS feed it can be proven that people in a given country could have "known" about it.

I'm fed up thinking "bloody hell I did that ten years ago" or "I thought about doing that, its a bit obvious" when companies with as little intention as I had in developing the idea up start putting the squeeze on businesses and developers. What I've always lacked is the visible proof to submit against a claim. This is a simple suggestion about using the power of the web to create a massive prior art database. IANAL, but surely it can't be this simple?"

Slashdot Top Deals

The first myth of management is that it exists. The second myth of management is that success equals skill. -- Robert Heller

Working...