Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: How could have I factored this better? Date: Fri, 20 May 2016 17:49:01 -0700 Organization: A noiseless patient Spider Lines: 16 Message-ID: <87wpmock1u.fsf@jester.gateway.pace.com> References: <5e60dbda-f34b-4be0-bfac-d32ddc67062f@googlegroups.com> <871t4we4e3.fsf@jester.gateway.pace.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="52eac348160ce62b68e4635eee7cc854"; logging-data="11822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/au8LfiiLOoO9mIWY8fsLO" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:boClQ10GxCFKTwcLWYKTn34CXiA= sha1:eVL836iOkawNcYkywlIesFUWq54= Xref: csiph.com comp.lang.forth:47376 "Elizabeth D. Rather" writes: > I don't see that the locals contributed anything. In fact, this is > shorter, and avoids the need for code to manage the locals frame. I'm not sure what you mean about "code to manage the locals frame" but yeah, your version of solid-box-stars should work ok. I'd take a little issue with it only checking one of the args, since as you say, inputs should be checked when they are supplied in the first place. Therefore, those checks have the nature of assertions, that signal that something has gone expectedly wrong. Checking just one of the args on the observation that the other one is checked in another place in the code is sort of ok since the other place is just 2 lines away. But in general, we put assertions in code because experience tells us that our observations and reasoning aren't always reliable. So if both of those words have preconditions and we're into checking such things, it seems ok to me to check in both places.