Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dave Froble Newsgroups: comp.os.vms Subject: Re: New VSI post on Youtube Date: Thu, 22 Aug 2024 23:06:35 -0400 Organization: A noiseless patient Spider Lines: 46 Message-ID: References: <66bcf876$0$717$14726298@news.sunsite.dk> <66bcfbe3$0$717$14726298@news.sunsite.dk> <66c397f6$0$716$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 23 Aug 2024 05:06:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3bca35999a53b64ba1709a3a5672cc52"; logging-data="826580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sQwBHypetlGDntvPyb3U+rikAD+O14gE=" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:aaMH67rwhllWBLFpf4t4+di5OPU= In-Reply-To: Bytes: 3254 On 8/22/2024 1:39 PM, Simon Clubley wrote: > On 2024-08-21, Dave Froble wrote: >> On 8/20/2024 1:34 PM, bill wrote: >>> On 8/20/2024 8:36 AM, Simon Clubley wrote: >>>> On 2024-08-20, chrisq wrote: >>>>> >>>>> I guess another complication is that some functions return >>>>> -1, which implies a signed variable. To fix all that would require a >>>>> complete rewrite of the library and probably most of the os and >>>>> applications as well, so it will never happen. Just have to write >>>>> unsigned equivalents, or slip functions with casts, but it's a lot >>>>> of additional work. >>>>> >>>> >>>> One thing I wish was available in all languages is the ability to return >>>> multiple values from a function call so you can return both a status and >>>> the value(s) in one assignment. Ie: "a, b, c = demo_function(param1, param2);". >>>> >>>> In languages with dynamic associative arrays (such as PHP), I simulate >>>> this by returning an associative array from a function call with both >>>> status and value fields. Makes coding _so_ much cleaner and robust. >>>> >>> >>> And probably much harder to understand in anything but the most >>> trivial usage. >>> >> >> Would that not be rather clear with adequate comments about what is being done? >> > > Look at the example Arne posted. Very clean and very easy to understand > without having to use comments (and I am actually a fan of the liberal > use of comments. :-) ). > > Simon. > I find it rather difficult to determine WHY something is being done, just from the code. -- David Froble Tel: 724-529-0450 Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com DFE Ultralights, Inc. 170 Grimplin Road Vanderbilt, PA 15486