Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:JavaScript rules! (Score 1) 241

- "JavaScript is the only class less, prototype based programming language in wide use."
That's not really have any value in and out itself.
- "So it is an extremely powerful language with arguable a bit painful syntax (to exploit those features)."
There are many powerful languages with good syntax.
- "90% of JavaScript just looks like C, so no idea why people hate it."
Because of the many many bugs.
- "OH!! You mean the integration in the browser? Yeah ... never did any browser side JS, and likely never will."
Browser integration is the only reason JS is popular.

Comment Re:Arguing over the subjective (Score 1) 523

Yes, and that's the problem. Then flush() will throw an exception because (for example) the disk was full, your program will just exit and the user's data are gone. In reality, you should write something like

                ofstream myfile( "example.txt" );
                myfile -- "Writing this to a file.\n";
                ofstream flush(); // catch exception, warn the user, maybe try a redo
                ofstream close(); // catch exception, warn the user
                return 0;

Comment Re:Arguing over the subjective (Score 1) 523

For almost all kinds of problems, the fact that C++ destruction can automatically release resources, so you can safely return from anywhere in a function instead of having goto fail all over the place is a significant win for C++.

Too bad that that's not true. Dtors cannot throw exceptions, that means that dtors are only useful for releasing memory resources.
Dtors are useless for releasing anything else, because all other resources can throw an exception upon release.
For example, for the classical file stream example Dtors are useless.


    ofstream myfile;
    myfile.open ("example.txt");
    myfile

You see that the ofstream have a method close() and is not using the Dtors of C++. That's because see my point above.

Comment Re:Microsoft Java (Score 2) 115

I don't get your post. JNI was in Java since day one (or very early on), and via JNI you can access everything that is platform specific. MS or anyone else can just use JNI to bundle a Jar file for Java to allow access to DirectX and platform specific APIs. Java is not some magic, but it's basically a level above C/C++. The architecture is basically, Java>C>OS>Driver>Hardware. So, MS could have just bundled it's own Java+Windows specific modules.

And to put an browser in Java is also easy. https://www.teamdev.com/jxbrow...
What difference does it make if it's the Chrome engine or some engine written in Java?

Comment Re:License (Score 1) 255

You have cherry picked one comment from Richard Stallman, which was just his personal ideology. David Edelsohn replied this:
https://gcc.gnu.org/ml/gcc/201...

GCC is working toward re-factoring its code base toward a more
compositional approach for "toolification". One can look at
presentations from the recent GNU Cauldron 2013 for discussion of the
topic. David Malcolm also has created patches for the GCC backend to be used as a JIT.
The assertions that FSF policy prevents technical development and
innovation simply is not true.

Maybe GCC was "deliberately obtuse", but as I see it, steps are taken to change that and enhance GCC for tool chains and to be used a library just as LVMM is.

Comment My answers (Score 1) 208

"reverse a linked list in place,"
> use a double linked list. no need for any reversing.
"balance a binary search tree,"
> use self-balancing binary search tree
"find the missing number in an array"
> disallow empty slots in the array, throw a runtime exception if the caller passed null into the array

Comment Re: Causes cancer (Score 1) 428

That's why people who advocate healthy food are seen as dicks. Come down from your condescending high horse and maybe more people would listen to you. Do you really think you are going to help people by insulting them like "But go ahead and munch on Doritos and Mt. Dew if you prefer - a goatee should compensate."? Most people will just think that you are a dick. Or "experience real food.", like you are the expert who decides what is "real" food and what isn't.

Comment Re:Hate in 3, 2, 1... (Score 2) 128

Groovy is an example how to do it right. In Groovy, I don't need semicolons and even parenthesis are optional, but there is no pitfalls you can fall into like in JavaScript. That is because the Groovy compiler don't try to be intelligent and try to guess your intent.

In Groovy I can write
func "a", "b"
func "a" bar "b" baz "c"
func { closure }
return [func: "something"]

Comment Re: And we care because...why? (Score 1) 280

That's a no brainer. Because if a job is open people will take it. But woman have more options than man. For example, marrying a man who goes into STEM, or make money off looks (which includes everything from ads, to modeling, to porn, to marrying), or go into services or nursery or kindergarten or teacher jobs.

Comment Re:Their work is being wasted. (Score 0) 142

Utter BS. The user land of Linux gets better and better. I remember the time about 14 years ego when I had to put some obscure data of my monitor in the Xorg.conf to get any graphic output, and when I could only have sound from one application. PulseAudio, KDE and Gnome all improved my experience of Linux, and now systemd which also improves my experience. For example, to add the Emacs-Daemon I just had to put a 14 lines systemd-service file in .local/share/systemd/user/emacsd.service and run systemctl --user enable emacsd, without root privileges.

Just look what a mess Sysvinit scripts are for the same task:
http://www.emacswiki.org/emacs...
For the same task in systemd for Sysvinit I need an over 150 lines bash script, root privileges, and the Sysvinit have several bugs that needs to be fixed. And for what? Just to start a user daemon.

Slashdot Top Deals

To do nothing is to be nothing.

Working...