From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id A1CE72244E for ; Thu, 4 Apr 2024 05:37:39 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id CCA9341611; Thu, 4 Apr 2024 13:37:37 +1000 (AEST) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by minnie.tuhs.org (Postfix) with ESMTPS id 345E3400FD for ; Thu, 4 Apr 2024 13:37:27 +1000 (AEST) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6e74aa08d15so418811b3a.1 for ; Wed, 03 Apr 2024 20:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712201846; x=1712806646; darn=tuhs.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=068sxzIJAo011jR9dz+CbGsy9W/O6ciVYCPWmjhQOpU=; b=NKKchzgaXps46OxaUb8HjonVFVsypbkWL5ef10k8LvLocOApk2ueAbldTCtQukn5Fg 2OVcyyHRuxuFOlMwqhRfCcdeeoO5dMB0uktg/i/WyQGKkBqELwNXXr7tRirsgfNA+BbE +9+9rSzZ608GdtRpAq/xIn+vLC0tDgVHHe8+MgJ1cFwTnw8e5bkL8b5zwHKec1/DocOB 5pzszmHOsURCFhzvkI7hrIaRclPGnO+r029/H2KcYJJlWi5TIAR+4N3IXsrdyfcSytL0 omWSMiudTHZmZnWTu0vyb1Pu7BrgTK2ZIvFrxfgA4T5OEg9UzRNoQ0lgzHZABJJrgAVr u96g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712201846; x=1712806646; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=068sxzIJAo011jR9dz+CbGsy9W/O6ciVYCPWmjhQOpU=; b=BOdvBJOGgh7MdkExoN7XU395x4v4FpljnXh6AGowFWHbh19xhy/Zrfj9qyEUjjkLvT j/nSnURaWOr/yLOzeBuTr8rHBN+D7Co5FnV4pjIkrACC9IP80EZdXL6Dtsv3TrAZMjFQ 1UBgEihgAJlmyHvSMum5Ap6Y+Y4jKiNtMfPO2YvcLNIq8ook/w/DBto+HP+LJRzQu2yc uZg0+SrQZ68VgDd2FfSOz0Fa0Rc26bvvvK06jVo5d19krhB3IvPo1iJQgcWr48yNJGEU 5GSwRXB/7YQNgwJgZqhOM9GZh5Z7LDex3KC+c+hucqoFAZB9Bw/65MFakB1Pqk4aRxOG FdjA== X-Gm-Message-State: AOJu0Yzd51wkWDpsQnGOFGTbkWjBPuZkcfrSLV+KlgKggjFRQ9c8V/O2 sfD7T+VLLoYnN/oei39ORNq1TKA8DH3IBXspND4AiyW/4HZKcGYEeog9aK+N X-Google-Smtp-Source: AGHT+IGVa1pEhlnFltcr6xOFaRGZ2EPuQtXJVx6JiNatviN4tCQyviKYTAuQ3FBCGocxvNYkUtoVhw== X-Received: by 2002:a05:6a00:2195:b0:6e5:faca:3683 with SMTP id h21-20020a056a00219500b006e5faca3683mr1715128pfi.26.1712201846150; Wed, 03 Apr 2024 20:37:26 -0700 (PDT) Received: from [192.168.1.90] (115-188-180-163-adsl.sparkbb.co.nz. [115.188.180.163]) by smtp.gmail.com with ESMTPSA id c25-20020aa78819000000b006e69cb93585sm12539568pfo.83.2024.04.03.20.37.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 20:37:25 -0700 (PDT) Message-ID: <516a4019-d987-4ca4-ac62-bd6b40841f93@gmail.com> Date: Thu, 4 Apr 2024 16:37:23 +1300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: coff@tuhs.org References: <1d3f129c-eafe-4fb2-9ea2-d949f3813c88@technologists.com> Content-Language: en-US From: Wesley Parish In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: JH5NKTYNNXOKJSNBU6CSQZXSSYCITQ5I X-Message-ID-Hash: JH5NKTYNNXOKJSNBU6CSQZXSSYCITQ5I X-MailFrom: wobblygong@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Of PL/I List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I learn C by reading Tanenbaum and Comer's OS books, and I cannot imagine how putting variable declarations anywhere other than the top of the function they belong to, would make sense. Unless they are global, in which case they go in a suitably global header file. Wesley Parish On 4/04/24 06:30, segaloco via COFF wrote: > On Wednesday, April 3rd, 2024 at 9:18 AM, Paul Winalski wrote: > >> In the PL/I shops I worked at it was required that all declarations be at the beginning of the scope block. >> >> -Paul W. > I get (friendly) flack for this from some of my coworkers, context is we're a C# and Java(Type)Script shop. They poke fun at how I write these languages like a C programmer but I don't ever hear anyone complaining about the readability of my code :) > > Declarations anywhere else but the top of blocks irks me, even if the language is totally fine with it. The only exception is asm, putting all the data and bss at the bottom of assembly units instead. > > - Matt G.