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

Igor Stasenko siguctua at gmail.com
Wed May 18 02:54:18 UTC 2011


On 18 May 2011 04:42, Tony Garnock-Jones <tonyg at ccs.neu.edu> wrote:
> On 2011-05-17 10:04 PM, Randal L. Schwartz wrote:
>>
>> I hope the 32K limit for method source is still in place.  It's sad to
>> think anyone would ever want to go beyond that.
>
> Humans might balk at writing such long methods, but compilers frequently
> find themselves in a position where writing very long methods can make a lot
> of sense.
>

hmm.. can you provide some example?

i could understand why compilers could generate big code, like
unrolling the loops to gain better performance.
But if we are talking about source code of a single method (and taking
the context into mind that we're talking about smalltalk),
then i really cannot find any good situation where methods with big
source code is preferable to a number of short methods.
If we don't count an obvious abuses, like encoding binary data into
large literal arrays, which turning a method into dumb data storage,
and really considering that there could be some complex algorithms,
which for some reason is preferable to put into a single method body.

So i'd like to hear what are those algorithms and what is the gains
comparing to implementing it using a number of shorter methods.


> Tony


-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list