<div dir="ltr"><div>Hi,</div><div><br></div><div>I think there was a misunderstanding Tim. The idea is not necessarily to let developers write code with this many arguments, the IDE could actually enforces the programmer not to write methods with too many arguments. It&#39;s really about non programmers, like code generating tools such as SmaCC. <br></div><div><br></div><div>In Java for example, the &quot;Clean code&quot; code convention limits the number of arguments per method to 3, the &quot;Code complete&quot; code convention limits it to 7, but Java can compile methods up to 255 arguments for code generators.</div><div><br></div><div>If you want to limit the number of arguments the programmer can write, enforce it in the IDE according to your code convention. <u>Please talk about the maximum number of arguments a developer can write in another thread, this is non related to the implementation discussed here.</u></div><div><br></div><div>As Jan said, there are already too many limitations in Smalltalk to write proper code generators. We&#39;ve worked on those limitations already:<br></div><div>- the SistaV1 bytecode set will go to production in Pharo 6 (likely Squeak at some point too) and it removes an important part of the limitations (jump sizes up to 65k instructions instead of 1024, ...). </div><div>- Spur removed other limitations (methods with up to  32k literals instead of 255, behaviors with up to 65k inst vars instead of 255).</div><div><br></div><div>The important limitations remaining are the max frame size (56), which in practice limits the number of temps to around 55, whereas we could have 64 temps or more, and the number of arguments of methods and blocks. This scheme is about solving those problems. There are 0.5% of methods using a large frame so we could grow from 56 to 128 or 256 without any significant problems. For arguments bytecode calling convention looks so much simpler than VM support.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 20, 2016 at 8:30 AM, Marcus Denker <span dir="ltr">&lt;<a href="mailto:marcus.denker@inria.fr" target="_blank">marcus.denker@inria.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On 19 Jun 2016, at 11:35, Tudor Girba &lt;<a href="mailto:tudor@tudorgirba.com">tudor@tudorgirba.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; Does anyone want to pick this up on the Pharo image side?<br>
&gt;<br>
&gt; I took a brief look at this and while playing I noticed that the errors when we send more than 15 arguments seem a bit strange. Take a look at this snippet:<br>
&gt; <a href="http://ws.stfx.eu/958BXP5GR136" rel="noreferrer" target="_blank">http://ws.stfx.eu/958BXP5GR136</a><br>
&gt; (you can paste it in Spotter to get the playground)<br>
&gt;<br>
&gt; In summary:<br>
&gt; - If we compile a method with a signature containing more than 15 arguments we get:<br>
&gt;       &quot;SyntaxErrorNotification: Too many arguments’”.<br>
&gt; This is good.<br>
&gt;<br>
&gt; - If we compile a method with a message send containing between 16-31 arguments we get:<br>
&gt;       &quot;&#39;InMidstOfFileinNotification’”.<br>
&gt; Ok-ish.<br>
&gt;<br>
&gt; - If we compile a method with a message send containing more than 31 arguments we get:<br>
&gt;       &quot;&#39;Error: genSend:numArgs: numArgs index 32 is out of range 0 to 31’&quot;<br>
&gt; This is wrong.<br>
&gt;<br>
&gt;<br>
&gt; Did I misunderstand something?<br>
&gt;<br>
<br>
</span>The VM does not support it, and as nobody is using it, the error messages are not that perfect.<br>
(to have them nicer, someone would have seen it and be bothered to fix it…)<br>
<br>
What Clement proposes is to implement support for more than 15 arguments in the compiler.<br>
(which means that instead of error messages, it would compile, with the idea as he described<br>
in the mail).<br>
<span class="HOEnZb"><font color="#888888"><br>
        Marcus<br>
<br>
<br>
</font></span></blockquote></div><br></div>