<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 14, 2010, at 8:23 AM, Tim Bradshaw wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 14 Apr 2010, at 14:58, Alexander Repenning wrote:<br><br><blockquote type="cite">2) sizeof as C/C++/Ojective-C inspired sizeof operator returning the number of RAW bytes with no meta information (no headers, no tag bits, ...) typically used to deal with FFIs. Mostly used in the context of allocating raw memory and accessing it with (%get-byte ...) kinds of functions.This is what we need to interface with OpenGL/ Cocoa and other APIs on Macs and PCs.<br></blockquote><br>How is this useful?  I want SIZEOF to tell me how many instances of an x I can fit in y bytes of memory, not some number which tells me something I can't see a use for.<br><br>For this version of sizeof, what would, say (sizeof (make-instance ...)) be useful for?<br><br>Perhaps your objection is that this thing should not be called sizeof because it's too reminiscent of the C function.<br></div></blockquote></div><div><br></div><div>both cases make sense and are useful. </div><div><br></div><div>I think the all inclusive case would deserve a different name - can't come up with a good one - or perhaps some keyword parameter, e.g.</div><div><br></div><div>(sizeof 3.14) => 4   ;; CCL32/64 Mac and PC</div><div>(sizeof 3.14 :raw-bytes-only nil) => 8 ;; CCL32</div><div><br></div><div><br></div><div>alex</div><div><br></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Prof. Alexander Repenning</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">University of Colorado</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Computer Science Department</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Boulder, CO 80309-430</p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></font></p><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></body></html>