help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] FileOut with class pragmas


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] FileOut with class pragmas
Date: Tue, 4 Jun 2013 11:14:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 03, 2013 at 10:55:23PM +0200, Paolo Bonzini wrote:

> > I think this is because I am not changing classPragmas to add my new
> > class pragmas.
> 
> Yes.

I stumbled across another issue. In the GSM 04.08 specs Information
Elements (attributes) have a minimum and maximum length. I have used
something like the below to handle that.

Object subclass: Foo [
    Foo class >> valueSize: min max: max [
    ]

    <valueSize: 1 max: 3>
]

this can not be expressed with the current classPragmas. So if I would
return #valueSize from the classPragmas then the 'max' would be lost
and if I return #valueSize:max: then it can not perform this selector?

Any idea how to resolve that?



> > Is this something we could/should warning about?
> 
> Not for all pragmas; some (import:, shape:) are filed out automatically.
>  But these are just a few, they could be special cased out.  Otherwise
> it seems like a useful warning.

I will add this as another linter (but I think the STInST ast doesn't
have enough information for the pragmas to detect it).


holger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]