[M3devel] what to do about file sizes being 32bits?

Tony Hosking hosking at cs.purdue.edu
Fri Jan 8 17:36:18 CET 2010


I am opposing LONGINT now (somewhat as a devil's advocate) because we introduced it simply to solve one very small problem: file sizes larger than INTEGER.  Perhaps we would have been better off sticking with a double-INTEGER record with lo/hi fields to represent file sizes?

Its introduction has added significant complication to the compiler, which I am frequently stumbling over (not to mention deep questions of typing in the language, as evidenced by the controversy over assignability between INTEGER and LONGINT).

On 8 Jan 2010, at 05:44, Olaf Wagner wrote:

> Quoting Tony Hosking <hosking at cs.purdue.edu>:
> 
>> On 7 Jan 2010, at 08:52, Olaf Wagner wrote:
>> 
>>> Well, I don't think that should be any practical problem right now,
>> 
>>> shouldn't it? But 32 bit offsets have been overcome for years even
>>> on 32 bit systems, so I definitely think we should keep the LONGINT
>>> type and even try to incompatibly change the internal file length
>>> type (with due care and consideration of course).
>> 
>> I think I am now persuaded LONGINT should stay.  But, I don't  understand what "incompatibly change the internal file length
>> type (with due care and consideration of course)" means?
> 
> I only just got round to reading all those mails.
> 
> I meant changing the file lengths and offsets in all our libraries,
> like Rd/Wr. Basically what Jay has started on right away ;-)
> 
> I agree that this should be done in a feature branch though.
> Changes should be reviewed.
> Regression tests need to be run on all platforms.
> 
> And of course we should all more or less agree that we want to do that.
> I think it has been a mistake that we haven't been able to support
> long file sizes in a consistent way throughout our code. Of course this
> problem will vanish in some years when everybody is using 64 bit platforms.
> But for embedded programming for example 32 bit processors may remain
> useful and in use much longer.
> 
> I'm not sure if we should support assignability between INTEGER and
> LONGINT, as Rodney's original proposal did. Probably yes, but I must
> admit that I've been too little engaged in language theory for years now
> so that I cannot really oversee the impacts.
> 
> Files with sizes larger than 4 GB get more and more common. Just think
> of DVD images for example. And I don't think that it will be really
> appreciated by users of M3 applications that they immediately crash
> just because one has opened a directory browser based on the distributed
> libraries :-)
> 
> Just my opinion of course. I don't really understand why you are so
> drastically opposing LONGINT suddenly. Probably I haven't been able to
> follow some of the arguments.
> 
> Olaf
> -- 
> Olaf Wagner -- elego Software Solutions GmbH
>               Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
>   http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
> 




More information about the M3devel mailing list