Slashdot Mirror


User: u17

u17's activity in the archive.

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

Comments · 185

  1. Re:Question on Science Attempts To Explain Heaven · · Score: 1

    I would postulate that there are things in the world that we may suspect or know they exist, but can't reliably define, measure, or make predictions about them. Similarly, we may not be able to set up an experiment which lives up to scientific standards. If you ask a western scientist to investigate such a problem, he will laugh at you instead of treating the issue seriously. Most of the time he may be right, but you cannot be sure that this closed-mindnesness doesn't prevent him from making new scientific discoveries. I think this might be the issue that the grandparent is referring to.

  2. Re:The VM is decent. The language sucks. on The Struggle To Keep Java Relevant · · Score: 1

    I did not explain this sufficiently because to me it seemed obvious. "No lambdas" is closely related to "No function pointers", and the argument is similar. The advantage of lambdas as I see them is that you can specify the body of a callback function "in-line". You can already do something similar with anonymous inner classes, but only if you accept the boilerplate code you need to provide whenever you use them. The boilerplate code is especially annoying when you only want to define a single callback method.

    I agree with you that the ability to slap a method on an object does not lead to good code, but I view this as a different feature from lambdas.

    In comparison with the other bad points of Java, this point is perhaps not the most important, but having closures would certainly contribut towards eliminating some of the "ugliness" of the language.

  3. Re:I've.never.used.groovy.so.I.have.a.question. on The Struggle To Keep Java Relevant · · Score: 1

    So you disagree with my comment. Would you care to contribute anything to the discussion and explain why?

  4. Re:The VM is decent. The language sucks. on The Struggle To Keep Java Relevant · · Score: 4, Insightful
    A couple of reasons why Java sucks:
    1. No proper support for namespaces (see my other comment)
    2. No support for storing members in-place. If you want a Vector3d class, (i.e. an array of 3 doubles with an associated set of functions), and you want it to be fast, without referring to the members by pointers, you have to enumerate the members: {double x; double y; double z;}. If you wanted to have an array of doubles, you could only store a pointer to the array, and with an extra allocation: {double[] data = new double[3];}. For a Vector3d this is not so bad. But imagine the code for Matrix4x4d. This is a real shortcoming, if you look at Java3D, it actually uses a matrix with members defined like this: {double m00; double m01; double m02;... etc, 16 times}, instead of a double[][] array. If you do it this way then in functions you have to manually unroll loops, you can't just iterate over the values.
    3. No support for proper templates. The "generics" are only syntactic sugar. You can't have something like template <int N, int M> Matrix<N, M> for faster code. ArrayList<int> doesn't work. When you write "arraylist of integers", you expect an object with a tightly packed array if ints. But the only way to do this in Jave is to box them, and if you do, think of the waste: the array actually holds pointers and each Integer is separately, individually allocated. Additionally, each Integer not only holds an int, but also a mutex, which leads to the next problem.
    4. Every object has a mutex. WTF? Why endure such a huge waste, why increase the size of every object, when only very few of their mutexes are actually used?
    5. No operator overloading. OK, this can be abused like everthing else, but when you're working with a custom number class or with BigInteger, you don't want to clutter your code with method names that represent operators.
    6. No unsigned types. Of course there are conversion issues when mixing signed/unsigned in expressions. Normally you're fine with just signed, but what about, say, file formats that have uint64_t in them? Should you store them in BigIntegers?
    7. The standard library is a mess. They keep putting more and more stuff into it, never deprecating anything, and the result is pretty bad in many places. The library is over-engineered and in many places the implementation shines through the interface. They keep shooting themselves in the foot by having to maintain crap code like Swing for eternity. Coding in Swing is horrible when compared to, say, Gtk.
    8. Missing lambda functions/closures, 'nuff said
    9. No function pointers. This leads to one-function interfaces which only clutter your code whenever you use them.
    10. No typedefs. Especially when using generics, you don't want to type Map<String, List<Integer>> all the time, you want to type MyFancyMap instead.

    There are more things, these are just those that irk me most. I love the idea of applets, webstart, and portable bytecode, and I'd love to see Java succeed, but the language is so badly done I can't see this happening.

  5. Re:I've.never.used.groovy.so.I.have.a.question. on The Struggle To Keep Java Relevant · · Score: 2, Insightful

    For all practical purposes, Java doesn't have namespaces. If it did, you would not see class-name prefixes floating around all the time in java code. Say, javax.swing.[J]Button, org.odftoolkit.odfdom.dom.element.table.[Table]TableRow, etc. If the only way to resolve name clashes is to type out the full package-name of the class whenever you refer to it in a source file, then this is not using a namespace, and the presence of class-name prefixes only confirms that this is how developers view it. Compare to C++, where you can do "namespace thr = boost::thread;". With aliases like these, you don't have to worry about class name clashes at all, since you could easily translate something like "org::odftoolkit::odfdom::dom::element::table::" into "tbl::", making the use of namespaces convenient and practical. While I would love Java to be more popular, it's full of half-assed features like this, and it's no surprise to me at all that it's being pushed back into being a niche language for "enterprise" developers.

  6. Re:Queue joke... on NASA Summoned To Fix Prius Problems · · Score: 1

    Just one -- and knowing NASA, the solution will be to install a parachute-style aerobrake at the rear of the car ;-)

  7. Re:I try to avoid on What Aspects of Open Source Projects Do You Avoid? · · Score: 1

    I know, these quadratic means are truly awful to work with!

  8. Re:Timeline on What Is Time? One Researcher Shares His Exploration · · Score: 2, Interesting

    I do think that deja vus are brain fault events. I get them every now and again, and I've learnt to ask myself everytime I feel one: am I tired (not enough sleep)? So far, the answer has only been "yes". When I'm rested and thinking clearly, I never get a deja vu. To me this means that my brain experiences glitches when it's worn out of exhaustion.

  9. Re:Delicious on RHIC Finds Symmetry Transformations In Quark Soup · · Score: 1

    Maybe they meant 4 trillion Kelvin, that would explain it all!

  10. Re:Inkscape won't run on netbooks on GIMP 2.8 Will Sport a Redesigned UI · · Score: 1

    Does using a small font and choosing a Gtk theme with the smallest possible padding/margins help? I notice that in general most Gtk themes have a lot of padding between the text and the outer edges of the button (or other widgets).