[M3devel] license..
Mika Nystrom
mika at async.caltech.edu
Thu Jan 24 16:58:21 CET 2008
Henning Thielemann writes:
>
>On Thu, 24 Jan 2008 hendrik at topoi.pooq.com wrote:
>
>> On Wed, Jan 23, 2008 at 03:20:47PM +0000, Jay wrote:
>> >
>> > I'm not against licensing and all, but I dislike big banners *everywhere*, in every file.
>> > One little file per directory I guess ok, still kind of obnoxious.
>> > It's not up to me obviously, it's up to the original author.
>> > We have it far from the worst, I realize. I have seen some humungous per-file banners.
>> > The banners are often the vast majority of the file...
>> > (all the more reason to smush files together :) )
>>
>> One of the things I hate about Eiffel is that every class has to be in
>> its own file.
>>
>> Java is almost as bad. It doesn't formally have this restriction, but
>> except for a few very local classes, you pretty well have to follow it
>> anyway.
>>
>> I really like the way you can put multiple classes into one file in
>> Modula 3.
>
>But you should not do so, because qualification gives more natural names
>if the module name reflects the name of its main type. In anticipation of
>generic modules it is also a good idea to call the main type T. I found it
>good style, also in other programming languages, to setup one module per
>(important) data type. Sooner or later there are enough functions in the
>module to justify this separate unit.
It would be Really Nice to be able to instantiate more than one
generic in a single file, I think....
(As it is, using lots of generics in M3 involves writing lots of
Quake code.)
Mika
P.S. I do not believe the language specification makes any reference
whatever to the concent of source "files". There is no reason you
couldn't have a single file containing:
INTERFACE A; TYPE T = RECORD x : SomeType END; END A.
INTERFACE B; IMPORT A; TYPE T = A.T; END B.
(Two modules in one file.)
The stylistic matter of whether to declare more than one type
in an interface is a separate issue, I think.
More information about the M3devel
mailing list