[M3devel] cm3: what are *.mc files

Hendrik Boom hendrik at topoi.pooq.com
Sat Jun 13 13:40:59 CEST 2015


On Sat, Jun 13, 2015 at 10:40:40AM +0200, Elmar Stellnberger wrote:
> Am 12.06.15 um 22:10 schrieb Jay:
> >No guarantees on any of this imho. Nor the extension. The files
> >are usually temporary. What are the magic bytes for .c? What is
> >the purpose here? We could add 4 ignored bytes or even a guid but
> >it'd be a waste.
> human readable text files do not need any magic
> but binaries do (though auto-generated text files
> by a program will need a header, too).
> 
> A cm3 and middle end version numbers for a
> compatibilty check if not also a creation timestamp
> after the magic would be very beneficial, too.
> 
> It is unprofessional and a bad habit to emit a binary
> stream without a header and versioning information.
> Have you never used a ready compiled cm3cg for
> compiling a new frontend? - There should be a
> middle end version number to check whether this
> is prone to fail (and possibly one trying to force
> application of cm3cg on a newer intermediate code
> stream. ).

Not to mention the possibility of having a compatibility mode for an 
old file format, in case it's not too much work.

-- hendrik



More information about the M3devel mailing list