I like that alternative.<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 6, 2012 at 7:26 PM, Spencer Salazar <span dir="ltr"><<a href="mailto:spencer@ccrma.stanford.edu" target="_blank">spencer@ccrma.stanford.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think being able to spork a block of code like this:<div><br></div><div>spork ~ {</div><div>// some code</div><div>}</div>
<div><br></div><div>spork ~ {</div><div>// some other code</div><div>}</div><div><br></div><div>would, to a lesser but still helpful degree, alleviate the issues this proposal is trying to address. It also has the benefit of recombining existing syntax rather than introducing new syntax. </div>
<div><br></div><div>spencer</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 4, 2012 at 6:58 AM, Tom Lieber <span dir="ltr"><<a href="mailto:tom@alltom.com" target="_blank">tom@alltom.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">So you could write this:<div><br></div><div><div> TubeBell b => dac;</div><div> ---</div>
<div> while(40::ms => now) {</div>
<div> 1 => b.noteOn;</div><div> 1600::ms => now;</div><div> 1 => b.noteOff;</div>
<div> }</div><div> ---</div><div> do {</div><div> Std.mtof(Std.rand2(0, 3) + 60) => b.freq;</div><div> } while(1640::ms => now);</div><div><br></div><div>and have it work like this:</div><div><br></div><div>
<div> TubeBell b => dac;</div><div><br></div><div> fun void part1() {</div><div> while(40::ms => now) {</div><div> 1 => b.noteOn;</div><div> 1600::ms => now;</div><div> 1 => b.noteOff;</div>
<div> }</div><div> }</div><div><br></div><div> fun void part2() {</div><div> do {</div><div> Std.mtof(Std.rand2(0, 3) + 60) => b.freq;</div><div> } while(1640::ms => now);</div><div> }</div>
<div><br></div><div> spork ~ part1();</div><div> spork ~ part2();</div><div> day => now;</div></div><span><font color="#888888"><div><br></div>-- <br>Tom Lieber<br><a href="http://AllTom.com/" target="_blank">http://AllTom.com/</a><br>
<a href="http://infinite-sketchpad.com/" target="_blank">http://infinite-sketchpad.com/</a><br>
</font></span></div>
<br></div></div>_______________________________________________<br>
chuck-dev mailing list<br>
<a href="mailto:chuck-dev@lists.cs.princeton.edu" target="_blank">chuck-dev@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
chuck-dev mailing list<br>
<a href="mailto:chuck-dev@lists.cs.princeton.edu">chuck-dev@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Tom Lieber<br><a href="http://AllTom.com/" target="_blank">http://AllTom.com/</a><br><a href="http://infinite-sketchpad.com/" target="_blank">http://infinite-sketchpad.com/</a><br>
</div>