Slashdot Mirror


User: kohaku

kohaku's activity in the archive.

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

Comments · 118

  1. Re:Finally on An Early Look At What's Coming In PHP V6 · · Score: 1

    No, there's nothing preventing you from including that header file multiple times for different types.

    Okay, I missed that. However, once you start doing things like including generic functions/classes in other generics, and doing compile-time calculations you're going to have headaches, namely because the C preprocessor only does a single pass on the code.
    Back to code length: the C preprocessor version forces you to define multiple constants and include a header for each specialization of the template. Given that C++ can also infer template arguments from function arguments, I would have thought the C++ would be shorter.

    The only difference is that with preprocessor macros, you create the class explicitly up front with its own name so the instantiation syntax is cleaner.

    My opinion is the complete opposite of this- explicitly having to specialize a template with a bunch of defines and an include each time seems fugly. Perhaps we'll just have to agree to disagree on that one :-)

  2. Re:Finally on An Early Look At What's Coming In PHP V6 · · Score: 1

    I have a couple of issues with that code. First, If I want to create multiple CustomArrays of differing base types, in C++ I can do
    CustomArray<int> ints;
    CustomArray<char> chars;

    With the C preprocessor, I can only do a single define, and I'm stuck with that single base type. Secondly, That's a _lot_ more code, and it's a _lot_ uglier...
    Lastly, about the foreach loop- I can see where you're coming from about it being 'glued on', but i've never really found it to be much of a hindrance. Apparently C++0x has something similar, though.

  3. Re:Finally on An Early Look At What's Coming In PHP V6 · · Score: 1
    C++ can't have been what you describe, because of one of the design goals: maintaining backwards-compatibility with C. As soon as you start making arrays behave differently, you break a lot of code. C++'s strength is that it has powerful high-level language features while allowing C's (relatively) low-level stuff.
    As for C++'s STL libraries being difficult to use, I have to disagree again. Let's take vector as an example. Elements are accessed the same way as regular arrays (square bracket notation), and the notation for using templates (i.e. vector<int> ints;) is really not difficult. Actually writing template functions is a little harder, though. I am frankly amazed you think the C preprocessor is equivalent in usefulness to templates, so in case i'm being stupid here, would you explain how you implement a generic container using the preprocessor? For that matter, what do you find nicer about the C preprocessor than templates? Littering source code with #defines and #ifdefs surely can't be neater...?

    As for OO in PHP, I don't see why you think dynamic typing decreases the value of object-oriented programming.

    It's not that I think dynamic typing decreases the value of OO, but that I think OO decreases the value of dynamic typing.

    Dynamic typing just makes it a little easier to shoot yourself in the foot by not throwing up an error when you make the assignment or function call in the first place.

    Which is why I really don't see the value of forced dynamic typing- it makes code less clear, puts 'compile'-time errors at runtime, and generally reduces performance all around.

  4. Re:Finally on An Early Look At What's Coming In PHP V6 · · Score: 1

    [PHP is] remarkably close to what C++ should have been ...

    Wow. Really? Somehow I feel you've never done any development for high-performance applications before.
    Variable length arrays? Try STL's vector or map. C++'s arrays are backwards compatible with C's, but that's not to say it's not sensible behaviour- growable arrays have a fairly big overhead.
    Also, I'm not sure where your gripes with C++'s string manipulation come from, but I suspect you really haven't looked into the STL libraries very much. I often see C++ coders rewriting even basic things like vector or some of the algorithms (poorly) just because they didn't know about them
    Preach PHP all you want, but don't try to tell me that it's better designed than C++. It's simply not true.
    A side note, what's the point of OO in dynamically typed languages? It kinda defeats the point of inheritance & polymorphism...

  5. Re:I will quit twitter on Apple Rumored To Want To Buy Twitter · · Score: 1

    It's about owning a large user base, not about the technology. Google didn't buy Youtube because it was unique or had some technically brilliant product/code. That said, it's still dumb.

  6. Re:How long for video on e-Ink? on Amazon Wins First Kindle Patent; Bigger Screen Expected Soon · · Score: 1

    Oh, so you're still using a CRT with your desktop?

  7. Re:Any lawyers here on Hospital Equipment Infected With Conficker · · Score: 1

    There are a bunch of consumer products that i'd hesitate to classify as 'embedded' nowadays. Specifically, mobile phones, handheld consoles, etc. They're not running a RTOS, and they're wielding a pretty hefty amount of power. In any case, you shouldn't run windows on anything life-critical unless you want "blue screen of death" to be a literal term.

  8. Re:The title of the book.... on What We Can Do About Massive Solar Flares · · Score: 5, Funny

    Many Mayan scholars simply think that the Mayans were simply going to reset the calendar on that day back to zero.

    Referred to in Mayan texts as "The Great Mayan Integer Overflow".

  9. Re:how bout them apples on Antarctic Ice Is Growing, Not Melting Away, At Davis Station · · Score: 1

    For the record, i'd like to provide a short list of things that aren't cogent scientific arguments:

    1) Political arguments

  10. Re:The real question on Robo-Arm Signatures Are Legal, Gov't Buys One · · Score: 2, Funny

    Hah, well this won't affect me: my signature comes out different every time!

  11. Re:am i missing something? on Game Companies Face Hard Economic Choices · · Score: 1

    Assuming 2 project managers, that's 164 warm bodies, and 2 cold, dead, unfeeling bastards.
    What do you mean i've got a chip on my shoulder?

  12. Re:Why should I care about foreign court orders? on UK Libel Law Is a Global Threat To Web Free Speech · · Score: 1

    Whenever a government is allowed to get away with something like this, it's a global problem. Should I not care about Darfur, simply because I don't live there? (Not to equate this with genocide, but I hope I made my point)

  13. Re:Why should I care about foreign court orders? on UK Libel Law Is a Global Threat To Web Free Speech · · Score: 2, Insightful

    Believe it or not, some slashdotters actually live in the UK!

  14. Re:Missiles reach SPACE you know. on US Pentagon Plans For a Spy Blimp · · Score: 2

    That link really hit home. We're going to have to start doing something about this.

  15. Re:Um, what? on So Amazing, So Illegal · · Score: 1

    Yeah but they're marked up like 100x the original price. I think it's the packaging.

  16. Re:And on Fermilab Not Dead Yet, Discovers Rare Single Top Quark · · Score: 4, Insightful

    No, no, no! This is not a healthy line of thought! There is absolutely no way you can predict with certainty the future benefits of any scientific research. Even electricity was of uncertain value. The very point of public funding is for research whose benefits aren't obvious, but whose results are a benefit to science as a whole. You say that you believe it is possible to 'evaluate potential research'. How do you go about doing that? What are your criteria? Does research which has no practical application whatsoever but advances understanding of the whole get swept under the carpet?
    One might argue that without establishments such as the Royal Society, a lot of great scientists in Great Britain might never have been able to publish.

  17. Re:TMobile G1 on Best Wi-Fi Portable Browsing Device? · · Score: 1

    Even though the question specifically excluded CELL PHONES ...

    Naw, what (s)he said was (and I quote):

    (most importantly) no cellphone-style activation and service fees

    An unlocked, sim-free G1 would meet these requirements. It's still pricey though.

  18. Re:Ono-Sendai, or Zeiss? on Bionic Eye Gives Blind Man Sight · · Score: 2, Funny

    I only do eyes!

  19. Re:Terrifying! on UK Government Wants To Bypass Data Protection Act · · Score: 5, Informative

    Phillip Pullman also did a great piece in the Times related to, although not specifically about, this recently. Oddly, it got pulled by the Times with no explanation. I wonder why?

  20. Re:We have our Sarkozy in Chile, too on French President Busted For Copyright Violation · · Score: 1

    Nobody visit those URLs! They have viruses!
    Love,
    The RIAA.

  21. Re:goes further on Creative Commons Releases "Zero" License · · Score: 1

    I'd quite like to read that, do you have a link?

  22. Re:Not so hippocritical on Ballmer Pleads For Openness To Compete With Apple · · Score: 1

    Your nintendo analogy doesn't quite fit. Let's say Nintendo bundle a free FPS game* with the Wii. Now let's say they terms for licensing games are that it _cannot_ be an FPS: it can't compete with theirs. That's a monopolistic practice no matter how you look at it. As for the barriers to entry: they may be small for most apps, but they're infinitely high for a browser. All i'm saying is that the practice of forcing the end user to use certain apps is a monopolistic practice.

    * Yes this category is much wider than 'browser', but it's the closest example I can think of.

  23. Re:Not so hippocritical on Ballmer Pleads For Openness To Compete With Apple · · Score: 1

    In this case, it's not a question of shipping with other software, but even allowing it to compete! Microsoft's monopoly stems from the bundling, sure, but they never went out and deliberately prevented Mozilla or Opera from creating and publishing their own browsers. You keep spouting the line "The rules are different when you're a monopoly": yes it's true, but as i've said twice now, just because a company isn't a monopoly doesn't mean a practice can't be monopolistic.

  24. Re:Not so hippocritical on Ballmer Pleads For Openness To Compete With Apple · · Score: 2, Insightful

    Hence "It's just a question of scale". Just because Ballmer's being a hypocrite doesn't mean he isn't right.

  25. Re:Not so hippocritical on Ballmer Pleads For Openness To Compete With Apple · · Score: 2, Insightful

    Yeah, but maybe Opera does. The whole point is that Apple is artificially stifling competition. Saying "It's apple's toy" is equivalent to saying Microsoft should be able to disallow the installation of any web browser but IE; it's just a question of scale.