[squeak-dev] Max source method length? Max string length? Max change set size?

Igor Stasenko siguctua at gmail.com
Wed May 18 03:28:38 UTC 2011


On 18 May 2011 04:58, Tony Garnock-Jones <tonyg at ccs.neu.edu> wrote:
> On 2011-05-17 10:54 PM, Igor Stasenko wrote:
>>
>> hmm.. can you provide some example?
>
> Module initialisation code is the case I've run into, where many "constant"
> objects (including symbols, functions, classes etc.) are computed,
> initialised and placed into a dictionary/namespace. A compiler from Scheme
> to .NET CLR I worked on a while ago frequently generated module
> initialisation methods with more than 64k of *bytecode*, which worked (a)
> slowly on one implementation (b) reasonably on another and (c) not at all on
> a third, causing it to dump core.
>

Aha, so you're talking not about code directly authored by humans but
rather indirectly/automatically generated code,
which like i said is a form of abuse because it actually turns a
source code into data storage (and of course sometimes
it is hard to invent something better, but it doesn't makes it less abuse ;).

I would not bother about limits, because it is not a big deal, in your
framework you could always detect if method's size surpasses certain
reasonable limit, then you can simply split it onto number of smaller
methods and then generate a root method to invoke them one by one in
order initialize things in specific order.

> (Another way of saying the same thing: The only three reasonable numbers are
> zero, one and infinity.)
>
> Tony
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list