<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 14, 2014 at 7:56 PM, Argyrios Kyrtzidis <span dir="ltr"><<a href="mailto:kyrtzidis@apple.com" target="_blank">kyrtzidis@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Feb 14, 2014, at 10:49 AM, Ben Langmuir <<a href="mailto:blangmuir@apple.com">blangmuir@apple.com</a>> wrote:<br>
<br>
><br>
> On Feb 14, 2014, at 10:14 AM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
><br>
>>> There is no significant difference on the client side (instead of calling a<br>
>>> method on the AFS, it calls a method on the FileDescriptor), it may simplify<br>
>>> a bit some functions to just accept a FileDescriptor if they only need such<br>
>>> a thing (instead of always passing an AFS + FD), and the multiplex<br>
>>> implementation becomes simpler.<br>
>><br>
>> The only issue I have with it is that code using the virtual fs then<br>
>> becomes quiet a bit different from code that is not using it. Code not<br>
>> using it has a FD that is a simple POD that is copied by value. Code<br>
>> using the virtual fs has a much more complex object that needs to be<br>
>> passed by pointer.<br>
><br>
> I felt the same way originally, but these are both cases of passing by reference since the int is just a handle to a more complex object inside the operating system :)  The syntax of method calls is obviously very different though.<br>

><br>
>><br>
>> A filesystem could even use a virtual FD implementation if it wanted<br>
>> to. Just make the FD it receives an index into a table. That way using<br>
>> a virtual file per file object is an implementation detail of that<br>
>> file system.<br>
>><br>
>> In the end, I guess it is a question of preference. Since I have no<br>
>> better objections than "it looks odd", it is fine to go that way if<br>
>> people actually using the feature prefer it. Maybe then just call it a<br>
>> FileObject instead of a FileDescriptor to avoid confusion with the<br>
>> simple ints we are used to?<br>
><br>
> Good point, any objections to just calling it ‘File’?<br>
<br>
</div></div>This seems too generic, maybe ‘AbstractFile’ ?<br></blockquote><div><br></div><div>When we are at naming, I'll take the liberty to make a very different proposal:</div><div>File, FileSystem for the interfaces, LocalFile / LocalFileSystem instead of RealFileSystem for the standard implementation. I personally dislike Abstract or Interface in the names, as it distracts from the rest of the name (but I fully understand that this is more taste than a real concern ;)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> Ben<br>
><br>
>><br>
>> Cheers,<br>
>> Rafael<br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>