On Fri, 27 Aug 2010 18:03:19 -0400, Simen kjaeraas
simen.kja...@gmail.com wrote:
On Fri, 27 Aug 2010 22:28:56 +0200, Steven Schveighoffer
schvei...@yahoo.com wrote:
No, the code does this:
f.writeln(hello);
f.writeln(world);
The example is supposed to demonstrate how to re-open the file
On 27/08/10 9:25 PM, Andrei Alexandrescu wrote:
On 8/27/10 13:18 PDT, Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped
message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2
On 2010-08-27 22:25, Andrei Alexandrescu wrote:
On 8/27/10 13:18 PDT, Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped
message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
Andrei
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as hard to
write error-checking code in as C. Even Java's less verbose! – DK
Andrei Alexandrescu:
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
Yes, it looks nice, File looks well designed, its design is almost equal to the
Python one (despite in that page they have used a different code strategy in
Andrei Alexandrescu:
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
I find it stupid that they have closed this quite interesting thread. Even if
the purpose of the stackoverflow site is a bit of difference, they have shown
I'm assuming the file.open() function will close any open file. When does your
suggestion close the file?
bearophile Wrote:
Regarding this:
auto f = File(fileio.txt, w);
...
f.open(fileio.txt, r);
It is correct, because it first calls detach(), but what is the purpose of
the open()
They keep closing informational topics like these. And yet topics like
Jon Skeet facts stay open. It's ridiculous.
On Fri, Aug 27, 2010 at 3:43 PM, bearophile bearophileh...@lycos.com wrote:
Andrei Alexandrescu:
D doesn't look half bad:
Jesse Phillips:
I'm assuming the file.open() function will close any open file. When does
your suggestion close the file?
If you write:
auto f = File(foo.txt, w);
f = File(bar.txt, r);
I think the first file will be closed, thanks to the reference counter.
My complete version was:
import
On Friday, August 27, 2010 08:16:39 Andrej Mitrovic wrote:
They keep closing informational topics like these. And yet topics like
Jon Skeet facts stay open. It's ridiculous.
There's definitely some great stuff at stack overflow, and it's generally a
great
place to ask questions, but it does
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as hard
to write error-checking code in as C. Even Java's less verbose! – DK
Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as hard
to write error-checking code in as C. Even Java's
On 8/27/10 11:25 PDT, Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as hard
to write error-checking code in
Andrei Alexandrescu schrieb:
On 8/27/10 11:25 PDT, Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as hard
to
bearophile bearophileh...@lycos.com wrote in message
news:i58fdo$ru...@digitalmars.com...
Andrei Alexandrescu:
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
I find it stupid that they have closed this quite interesting
On Fri, 27 Aug 2010 14:27:27 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 11:25 PDT, Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
I wonder if Go will become another Wave from Google. :p
On Fri, Aug 27, 2010 at 8:25 PM, Walter Bright
newshou...@digitalmars.com wrote:
Here's the Go example. I think Go has made a serious error in centering
their design around error codes.
snip
I don't see the need of the open() method, it looks like noise in the File
API. Do you know its purpose?
If no one is able or has time to give me an answer I may file a bug report for
removal of that method.
Bye,
bearophile
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message
news:i580v8$2us...@digitalmars.com...
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
LOLCODE is my new favorite langauge. (Previously it was fuckfuck - like
On 8/27/10 12:09 PDT, bearophile wrote:
I don't see the need of the open() method, it looks like noise in the File API.
Do you know its purpose?
If no one is able or has time to give me an answer I may file a bug report for
removal of that method.
Bye,
bearophile
The open() method saves
Someone even made a Brainfuck compiler in LOLCODE. I don't have the
link, but google should help. :p
On Fri, Aug 27, 2010 at 9:12 PM, Nick Sabalausky a...@a.a wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message
news:i580v8$2us...@digitalmars.com...
D doesn't look half bad:
On 8/27/10 12:12 PDT, Nick Sabalausky wrote:
Andrei Alexandrescuseewebsiteforem...@erdani.org wrote in message
news:i580v8$2us...@digitalmars.com...
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
LOLCODE is my new favorite
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
On 8/27/10 11:25 PDT, Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
Note that D's version doesn't follow the rules, you were supposed to
re-open the
On 8/27/10 11:29 PDT, Walter Bright wrote:
Walter Bright wrote:
Trass3r wrote:
D doesn't look half bad:
Yeah that comment about Go says it all:
It's rather amazing that given 30 years of evolution and language
design, they've still managed to invent a new language that's as
hard to write
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2 Linux, but I
have seen this problem before with other posts. Don't know what causes
it,
On 8/27/10 13:01 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
D doesn't look half bad:
http://stackoverflow.com/questions/3538156/file-i-o-in-every-programming-language-closed
Note that D's version doesn't
On 8/27/10 13:18 PDT, Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2 Linux, but I
have seen this problem before with
On Fri, 27 Aug 2010 16:18:26 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:01 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
D doesn't look half bad:
Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 16:18:26 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:01 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
D doesn't look half bad:
On Fri, 27 Aug 2010 16:35:49 -0400, Don nos...@nospam.com wrote:
Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 16:18:26 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:01 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei
On 8/27/10 13:28 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 16:18:26 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:01 PDT, Steven Schveighoffer wrote:
On Fri, 27 Aug 2010 05:36:32 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
D
On Fri, 27 Aug 2010 16:41:58 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:28 PDT, Steven Schveighoffer wrote:
No, the code does this:
f.writeln(hello);
f.writeln(world);
The example is supposed to demonstrate how to re-open the file for
appending and write
On 8/27/10 13:48 PDT, Steven Schveighoffer wrote:
Hm.. this still allocates. We can do better than the C++ example:
char[128] buf;
char[] line = buf[];
f.readln(line);
f.readln(line);
Which should not allocate at all in this case, and is completely safe if
it *does* have to allocate (like if
Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2 Linux, but I
have seen this problem before with other posts. Don't know
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Fri, 27 Aug 2010 16:41:58 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:28 PDT, Steven Schveighoffer wrote:
No, the code does this:
f.writeln(hello);
f.writeln(world);
The example
On Fri, 27 Aug 2010 17:16:37 -0400, dsimcha dsim...@yahoo.com wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Fri, 27 Aug 2010 16:41:58 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 8/27/10 13:28 PDT, Steven Schveighoffer wrote:
No, the code
On Fri, 27 Aug 2010 22:28:56 +0200, Steven Schveighoffer
schvei...@yahoo.com wrote:
No, the code does this:
f.writeln(hello);
f.writeln(world);
The example is supposed to demonstrate how to re-open the file for
appending and write world. Look at some of the other examples. Not
that
Nick Sabalausky a...@a.a wrote:
LOLCODE is my new favorite langauge. (Previously it was fuckfuck - like
brainfuck, but replaces the symbols with four-letter words)
LOLCODE is indeed a great language. Perhaps not the biggest on features
or standardization, but who cares when you can program in
On 27.08.2010 23:11, Stanislav Blinov wrote:
Actually, this was what caused me to wonder if anyone sees my messages
correctly (test: does anybody read my messages normally? in D.learn
newsgroup). Funny thing, I've posted my message via mailing list (and
got it back correctly with Thunderbird on
Andrei:
The open() method saves on reallocating the refcounted
structured stored inside the File.
Thank you for your answer.
So the API is designed a bit larger than necessary for performance reasons.
This the reformatted first part of the interesting implementation of File:
struct File {
42 matches
Mail list logo