Comments on Programming Scalaurn:uuid:9fdb66e1-8b49-33ad-b800-36c5769ccaca2009-08-11T20:58:58-07:00
<div>Internal DSLs <p id="para_in_contrast_if_your_dsl_steps">By contrast, if your DSL steps are stateless, chained method invocation works just fine. In this case, it doesn’t matter when you stop calling chained methods. If you chain methods that build up state, you’ll have to add some some sort of <code class="literal">done</code> method and trust the users to always use it at the end.</p>
<blockquote><p>Thanks.
</p>
— deanwampler (2009-07-12 22:02:41)
</blockquote>
</div>urn:uuid:6c428011-b861-3f41-b442-6c3e4e284c23deanwampler2009-07-12T22:02:41-07:00Comment on 'Internal DSLs'
<div>Internal DSLs <p id="para_in_contrast_if_your_dsl_steps">By contrast, if your DSL steps are stateless, chained method invocation works just fine. In this case, it doesn’t matter when you stop calling chained methods. If you chain methods that build up state, you’ll have to add some some sort of <code class="literal">done</code> method and trust the users to always use it at the end.</p>
<blockquote><p>add some some <- sort of
</p>
— robcd (2009-06-22 01:53:23)
</blockquote>
</div>urn:uuid:669ddb0c-7055-3f2d-b8e2-2f42e7261d46robcd2009-06-22T01:53:23-07:00Comment on 'Internal DSLs'
<div>Internal DSLs <p id="para_the_money_type_handles_arith">The <code class="literal">Money</code> type handles arithmetic, rounding to four decimal places, <span class="emphasis"><em>etc.</em></span> It ignores currency, except for the <code class="literal">toString</code> method. Proper financial arithmetic is notoriously difficult to do correctly for real-world transactions. This implementation is not perfectly accurate, but it’s close enough for our purposes. <a class="xref" href="apa.html#MoneyInJava">[MoneyInJava]</a> provides useful information on doing real money calculations.</p>
<blockquote><p>Thanks for the link, Steve. Will add a reference to it.
</p>
— deanwampler (2009-06-20 08:44:11)
</blockquote>
</div>urn:uuid:5c2fd77f-c19f-3bf0-b794-000aab51298cdeanwampler2009-06-20T08:44:11-07:00Comment on 'Internal DSLs'
<div>Internal DSLs <p id="para_the_money_type_handles_arith">The <code class="literal">Money</code> type handles arithmetic, rounding to four decimal places, <span class="emphasis"><em>etc.</em></span> It ignores currency, except for the <code class="literal">toString</code> method. Proper financial arithmetic is notoriously difficult to do correctly for real-world transactions. This implementation is not perfectly accurate, but it’s close enough for our purposes. <a class="xref" href="apa.html#MoneyInJava">[MoneyInJava]</a> provides useful information on doing real money calculations.</p>
<blockquote><p>Interested readers might like this reference: http://www.javaranch.com/journal/2003/07/MoneyInJava.html
</p>
— stevej (2009-06-14 10:48:08)
</blockquote>
</div>urn:uuid:a4707c36-c94d-343a-adfa-ba3799c7cd4fstevej2009-06-14T10:48:08-07:00Comment on 'Internal DSLs'