------art_23740_30101208.1146531137562
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

True, I need to check variables before and after calling the block and work
out the differences.
And it is a bit whimsical.. can you think of a better word than "the" for a
DSL?

On 5/2/06, Ross Bamford <rossrt / roscopeco.co.uk> wrote:
>
> On Tue, 2006-05-02 at 09:27 +0900, chiaro scuro wrote:
> > Not sure about the ATs. even if I don't mind them that much... if I
> unfocus
> > my eyes they look like bullet points ;-)
> >
> > I have got this one working.. see if you can guess how..
> >
> > recipe "eggs and bacon" do
> >   eggs = [2,:big]
> >   bacon = 3
> > the end
> >
> > I posted my solution here:
> >
> http://liquiddevelopment.blogspot.com/2006/04/way-of-meta-part-iv-hijacking-local.html
> >
>
> Without looking, I'd guess def the; binding; end ? (Quick look, done
> with alias, same difference I guess).
>
> It's a clever solution but it'd make the DSL sound a bit whimsical for
> my taste. Plus, I'd be either forgetting to put 'the' or resenting that
> I had to... :)
>
> Also, I think it might give unexpected results in some situations, e.g:
>
> some_other_var = :oops
>
> shopping_list "english breakfast" do
>   tomatoes = 2, :green
>   sausages = 3
>   eggs = 2, :big
>   bacon = 4
> the end
>
> shopping_list "banana milkshake" do
>   milk = 1
>   bananas = 2
> the end
>
> Gives output:
>
> to make english breakfast you should buy:
> * 2 green tomatoes
> * 3 sausages
> * oops some_other_var
> * 4 bacon
> * 2 big eggs
>
> to make banana milkshake you should buy:
> * 2 bananas
> * 1 milk
> * oops some_other_var
>
> Granted in a DSL this is less likely to occur, but guaranteed to leave
> users scratching their heads if (when?) it does. Generally I prefer if I
> can preserve normal, predictable behaviour for those times when you (or
> some power user of your system) might need it.
>
> --
> Ross Bamford - rosco / roscopeco.REMOVE.co.uk
>
>
>


--
Chiaroscuro
---
Liquid Development: http://liquiddevelopment.blogspot.com/

------art_23740_30101208.1146531137562--