A little of coordination for Rosettacode

Jos van Uden usenet at fwend.com
Mon Mar 4 15:57:15 PST 2013


On 4-3-2013 23:04, bearophile wrote:
> Now and then this thread becomes very useful for some coordination and discussion.
>
> Regarding this Task:
> http://rosettacode.org/wiki/Take_notes_on_the_command_line#D
>
> Fwend has recently modified it with this note:
>
>> the file only needs to be created before append; filename can be written as one word in English, no need for camel case)<
>
> Sorry, I didn't know "filename" a single English word :-)
> http://dictionary.cambridge.org/dictionary/business-english/filename?q=filename
>
>
> Regarding the other problem, the last part of the Task says:
>
>> If NOTES.TXT doesn't already exist in the current directory then a new NOTES.TXT file should be created.<
>
> If no text file exists in the directory and I run the current program with no arguments, it generates no file to me. So I think the current program is wrong. That's why I added a File(fileName, "w");. What do you think?

It depends on how you interpret it. The task describes two actions:
display and append. The question is: does the last sentence refer to
the append action or to both display and append. I choose to think it
refers to the append action because that makes more sense.

As for http://rosettacode.org/wiki/Simple_database

You removed the struct that I used to encapsulate the functions.

Aren't these functions now exposed to other modules? I wanted
them to only be callable from main. The input validation relies
on that.

At first I had declared them all private, but then I thought it
would be convenient to put a struct around them and declare it
private. Maybe there's a better way.



More information about the Digitalmars-d-learn mailing list