[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gforth] If then else in interpreted mode
From: |
Marcos Cruz |
Subject: |
Re: [gforth] If then else in interpreted mode |
Date: |
Thu, 2 May 2013 13:04:57 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
En/Je/On 2013-05-01 18:48, Josh Grams escribió / skribis / wrote :
> > : jyf 0<> abs ;
> Yikes! How about:
> : jif 0<> 1 and ;
Why do you prefer '1 and'? Maybe it's more readable or portable in your
opinion? Just feeling curious, since I would always write 'abs' in that
case.
> >Usually in Forth a calculation can be used instead of a condition.
>
> Well, that's true in a lot of languages, it's just that most other
> language communities condemn it as bad style, and it's more acceptable in
> the Forth culture.
You're right. But I think Forth makes it easier and more natural,
because the numbers you need are "right there". I'd even say it's part
of its spirit. But that's only my opinion and my taste; Forth can be
written in many different styles.
Marcos
--
http://programandala.net