Getting the const-correctness of Object sorted once and for all

Steven Schveighoffer schveiguy at yahoo.com
Mon May 14 05:37:17 PDT 2012


On Sun, 13 May 2012 16:52:15 -0400, Dmitry Olshansky  
<dmitry.olsh at gmail.com> wrote:

> On 14.05.2012 0:48, Stewart Gordon wrote:
>> On 13/05/2012 20:42, Walter Bright wrote:
>> <snip>
>>> I'd like to see std.stream dumped. I don't see any reason for it to
>>> exist that std.stdio
>>> doesn't do (or should do).
>>
>> So std.stdio.File is the replacement for the std.stream stuff?
>>
>> How does/will it provide all the different kinds of stream that
>> std.stream provides, as well as the other kinds of stream that
>> applications will need?
>>
>
> I think I've seen proper replacement (or rather a draft of it). If only  
> Steven can be bothered to finish it :)

Yes, I know.

I hate starting things and then not finishing them.  Especially when I've  
got so much of it completed...

I'm going to make some time to finish this.  I need probably a good few  
days (of solid time).  Which means, based on my normal schedule, 2-3  
weeks.  Most of the difficult parts are complete, I have a working buffer  
implementation, fast unicode translation (meaning UTF-8, UTF-16, UTF-16LE,  
UTF-32, and UTF-32LE), and a path to use RAII for seamless integration  
with std.stdio.File.  I even have preliminary agreement from Andrei and  
Walter on a design (no guarantees they accept the final product, but I  
think I can massage it into acceptance).

The one last puzzle to solve is sharing.  File is this half-breed of  
sharing, because it contains a FILE *, which is a shared type, but File is  
not.  Then it does some casting to get around the problems.  We need a  
better solution than this, but shared is so difficult to use, I think I'm  
going to have to implement something similar.  It has been stipulated by  
Walter and Andrei that fixing this shared situation is a requirement for  
any new replacement.  I have some ideas, but I have to play around to see  
if they actually work and make sense.

-Steve


More information about the Digitalmars-d mailing list