News for hackers. Stuff that matters.
Re:Dart language by dextorious on Monday October 10, 2011 @10:17AM (#3093832)
Well, for one you can probably make your own "+=" for strings, if not available, since Dart has operator overloading.

Also, System.getProperty("line.separator") does not translate to n"\n".

The first makes your program more portable. Of course it could be made accesible easier, eg as a constant System.NEWLINE or something.

[UPDATE] Downvote? Really? Because someone thinks "\n" is the same as "line.separator"?

Re:Dart language by jeltz on Monday October 10, 2011 @11:41AM (#3094233)
Indeed they do not translate into the same thing. But neither makes your program more or less portable in itself. It all depends on what you want to use it for. Some files and protocols should always have \n some always \r\n while in some cases it should be the system line separator. I think Python, Perl, C, and Ruby have fixed that quite well by making the IO library do the conversions. I do not remember if it is the same in Java.
Re:Dart language by d0mine on Monday October 10, 2011 @08:53PM (#3096579)
I didn't downvote, but see universal newline support in Python http://www.python.org/dev/peps/pep-0278/
Re:Dart language by nmcfarl on Monday October 10, 2011 @10:50AM (#3093992)
Of course they could have taken perl's tact and defined "\n" to mean System.NEWLINE not 0x0A.

That would have been an improvement right there.