<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 15, 2012 at 3:42 PM, Sean P. DeNigris <span dir="ltr">&lt;<a href="mailto:sean@clipperadams.com" target="_blank">sean@clipperadams.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">H. Hirzel wrote<br>

<div class="im">&gt; As Chris points out, the difference is minimal.<br>
&gt;<br>
&gt; Sean, it looks like you need better examples to show how you perceive<br>
&gt; the benefits of the FileSystem design<br>
<br>
</div>While you ignored the point of my followup post, which is that beauty and<br>
simplicity lead to more than the sum of a few keywords, here are a few basic<br>
examples...<br>
<br>
Example #1:<br>
file := FileDirectory directoryEntryFor: &#39;/path/to/file&#39;.<br>
FileDirectory extensionFor: file name.<br>
<br>
vs.<br>
<br>
file2 := &#39;/path/to/file&#39; asFileReference.<br>
file2 extension.<br>
<br>
#2:<br>
(FileDirectory on: &#39;path&#39;) entryAt: &#39;nohup.out&#39;.<br>
vs.<br>
&#39;path&#39; asFileReference / &#39;filename&#39;<br>
<br>
&quot;Most operations routed through one massive FD class&quot; vs. &quot;immediate access<br>
to the domain object you want&quot;; not to mention the appreciated absence of<br>
parens.<br>
<br>
No difference??<br>
<br></blockquote><div>But with</div><div><br></div><div>String methods for *FileSystem-utilities</div><div>/ aPath</div><div>      ^self asFileReference / aPath</div><div><br></div><div>you get</div><div><br></div><div>    &#39;path&#39; / &#39;filename&#39;</div>
<div><br></div><div>and that&#39;s *really* nice. </div><div><br></div><div>Does anyone think that &#39;123&#39; / &#39;45&#39; is good??</div><div><br></div><div>This is a compromise:</div><div><br></div><div>/ arg</div>
<div>    self size = 0 ifTrue: [self error: &#39;cannot coerce the empty string].</div><div>    ^(&#39;+-01234456789&#39; incudes: self first)</div><div>        ifTrue: [arg adaptToString: self andSend: #/]</div><div>        ifFalse: [self asFileReference / arg]</div>
<div><br></div><div>the issue here being whether FileSystem wants &#39;.profile&#39; or &#39;.hg&#39; et al or math wants &#39;.123&#39;.</div><div><br></div><div>If FileSystem provides path-name checking then the above could include a specific legality check instead of the naive discrimination.</div>
<div></div></div><div><br></div><div>Personally I find the prospect of a concise file scripting api much more appealing than lazy numeric conversion.  The absence of the former is why so much of my life involves bash scripts.  The latter isn&#39;t necessary if one starts off with numbers in the first place, and being literals they&#39;re as easy, no, easier than denoting numbers using strings (1 + 1 is shorter than &#39;1&#39; + 1).</div>
<div><br></div><div>I hope Squeak integrates FileSystem in 4.4 for 4.5.</div>-- <br>best,<div>Eliot</div>
</div></div>