3 ms·
_expressive power_ What is that anyway? Can you measure it in something other than line counts? I'm wary of line-counts-as-metric. It seems to be a disease of
by mynameishere 19y ago
_expressive power_
What is that anyway? Can you measure it in something other than line counts? I'm wary of line-counts-as-metric. It seems to be a disease of PHBs and functional programmers oddly enough.
_severely crippled_
No pointers. What else?
There was nothing innovative about Java, but the advantages had nothing to do with "expressiveness" or "power" as I understand them. The advantages were:
1. No malloc(), no free(). If you've ever done large-scale C programming, you'll spend half your time bugging around with memory.
2. Platform independence. Well, you said it. I test on Windows and deploy to linux, and the only real problem has to do with the stupid C: and slash direction on Windows.
3. Don't discount Sun's advocacy. C++ is a pain in the ass, and where you're not optimizing for CPU cycles and real-time performance (where the garbage collector is a problem) it just isn't needed. But to break its inertia something a little more real-world than Lisp macros is needed. So...corporate advocacy has its advantages.
4. Massive libraries. They blow here and there, but put stdlib.h et al to shame.
5. All-in-one. It doesn't do anything perfectly, but a large system can be done all in Java. This is convenient because you don't need fifty different tool sets, can move serialized objects around between subsystems, etc.
_making interviewing process very exhausting_
Since you've avoided Java in your career, I suspect you made that up.
Edit: Btw, since I'm bitching about downmods, I'll just add that I'm not downmodding anyone here.
- palish 19y agoExpressive power is a few things. Either: - Pointers OR - Garbage-collected reference-counted objects Plus - Closures (incredibly important to have these) Plus - Compile-time macros Plus - Recursion Shawn
- pg 19y agoExpressive power corresponds to shortness of programs, but LOC is not the best measure of that. Roughly, expressive power is 1 over the size of the parse tree.
- aston 19y agoI find it entertaining that even pg's most mundane posts get upmoddage like no other. I assume this is why he took himself off the "leaders" listing.
- vlad 19y agoWhen he went on vacation and stopped posting for a week, the site seemed to slow down. So, obviously, people know what they're doing when they mod up. :)
- tx 19y agoI really do not want to start a war here, especially because I am not a big fan of C++. Quite the opposite. But I can answer some of your questions in case you genuinely want to hear what I have to say :-) On expressiveness: I meant things like foreach loops, ruby blocks, python's list comprehensions, in-place on-demand functions, switch statements with strings, pattern matching, list goes on. Java is not much ahead of C++ in that regard. Not a real upgrade. BTW garbage collection is not really a "feature" of the language. And no, these days people (quality C++ folks) do not spend any time debugging memory leaks. World has changed since early Unix days: smart containers, smart pointers and automatic unit tests largely eliminated memory leaks issues. I honestly do not remember when was the last time I used new() or alloc(). About being crippled compared to C++: do not even get me started. Lack of templates (until relatively recently and they're still not a real thing), lack of multiple inheritance nor mix-ins to replace them, no true functions of any kind, no choice of memory allocation: heap vs stack, this silly "everything is an object" idiom... Again, quality libraries is something I asked to ignore, because it is really not a part of the language. And you are absolutely right here: Java folks have been enjoying the available pool of tools: an order of magnitude bigger than C/C++ guys ever had. And, finally, on platform independence. Java does not run on Windows or Linux. It runs on one platform: JVM, which is conceptually is no different from C++ plus some kind of OS abstration layer, similar to what Mozilla/Apache teams have. Basic idea is always the same: language + runtime. Call it JVM or Library or VMWare host. Yes, I can always develop for Linux and run it under a virtual machine on any host OS, This solution arguably even better than "language VM", since you're taking everything you need to run from one host OS to another.
- Tichy 19y agoI feel the "platform independence" makes a huge difference, though. I develop on a windows machine, and I can just deploy the binaries on the Linux-Server. I don't have any version headaches for deploying on various platforms. Maybe that is just a small thing and no big deal for make-wizards, but for me it is enough to avoid other settings like the plague. I ran into problems like that when I tried Ruby, btw. It seems there are different versions for Windows which are not compatible with each other (ie Cygwin version or Visual C++ version).