Slashdot Mirror


User: S.Gleissner

S.Gleissner's activity in the archive.

Stories
0
Comments
10
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 10

  1. Re:Yes on Is C++ a 'Really Terrible Language'? (gamesindustry.biz) · · Score: 5, Informative

    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.

  2. Re:Delta/Song already uses Linux on Airbus 380 To Have Linux In Every Seat · · Score: 3, Informative

    No, it was not a crash, as i wrote here.

  3. This is not the first Airbus with Linux on Airbus 380 To Have Linux In Every Seat · · Score: 5, Interesting

    Last year in february, i flew from Frankfurt, Germany to Johannesburg, South Africa with a brand new South African Airlines A340-400 Airbus. Just after boarding, the cabin crew resetted the In-Flight-Entertainment-System and several hundred screens in the seats showed a typical Linux booting screen with a small penguin in the upper left corner. They did not use a spash screen and it was possible to take a quick look at the booting messages... by the way, they made a network boot.

  4. Safe Pointers on Ultra-Stable Software Design in C++? · · Score: 1

    About 10 years ago i had a project on university, where i have implemented a "safe pointer" C++ template. The quite complex program (no GUI, portable) was for optimisations, it generated and deleted a lot of C++ objects.

    Every class in the project was derived from one base class, which enabled the ability to be a "safe object". All Pointers were in fact objects, generated by the template and the class the pointer pointed to. New objects were normally generated with "new", but there were no "delete" commands. The objects were deleted automaticaly when the safe pointers were deleted or overwritten. When more than one safe pointer was pointing to an object, the object was deleted when the last safe pointer was deleted or overwritten.

    Based on this safe pointers i wrote some list and tree classes. I never had any problems with memory leaks or uninitialized pointers. Yes, i think it is possible to write big and safe C++ programs, as long as you control the pointer problem.

  5. Infineon was first on $20 Cellphones Possible with TI's New Chip · · Score: 3, Informative

    Well... last month infineon introduced a mobile phone for under $20.
    (link in german)
    http://www.heise.de/newsticker/result.xhtml?url=/n ewsticker/meldung/61656&words=Infineon%20Handy

  6. Re:Star Trek 5: The final frontier on What's the Worst Movie You've Ever Seen? · · Score: 1
    and as for Generations, did you ever think that perhaps a ballistic rocket might have had a 2nd stage that had an impulse drive?

    ... but with impulse, the maximum speed of the rocket would have been below light speed. That rocket must have had a warp drive.
  7. Dead? And the smell?? on The Death of Bluetooth? · · Score: 1

    Sorry, but the internet connection over Bluetooth from my Linux notebook to my GSM/GPRS nokia phone isn't dead, so isn't my Bluetooth-headset. And it does not even smell funny!

  8. Re:THE REAL STORY on Justin Frankel Resigns From Nullsoft · · Score: 1

    > winamp is a nice piece of work..
    WASTE is a nice piece of work, too (yes, it works very well)... i just ask myself, where inside the secutity hole is...

  9. It's only a discussion... on Germany Wants To Put Time Limits On Porn · · Score: 1

    Come down, they only discuss it.

    They are talking about installing these mechanisms on german portals like www.t-online.de (the biggest german provider). Two clicks away from the front page, i've found a lot of softcore (really nice ;-) ). They want to restrict the linking to sex sites.

    We have a law here in germany, no softcore porno before 10 pm in free tv.

    Simon

  10. Re:another language? on CML2 Coming in Kernel 2.5 · · Score: 1

    > Why people keep inventing new pet laguages? Top 10 reasons why people are inventing new languages: 10. BASIC sucks. 9. C is too much limitated. 8. Assembler programs are too complicated - for most applications. 7. Perl... hmm, if You do not write scripts?? 6. PHP? Ok, if You don't program web servers. 5. Fortran: Hey, stoneage is over since several thousand years... 4. c# ? hohahahahaha 3. SQL can't do everything. 2. Java is too much standartisized. 1. Because they can. (c) simon@gleissner.com