From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Wed Jun 14 20:50:52 2023
Return-Path: <owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom9
Delivered-To: sc22wg5-dom9@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id A6DE03591B3; Wed, 14 Jun 2023 20:50:52 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 448 seconds by postgrey-1.34 at www5.open-std.org; Wed, 14 Jun 2023 20:50:52 CEST
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21])
	by www.open-std.org (Postfix) with ESMTP id 4B646359191
	for <sc22wg5@open-std.org>; Wed, 14 Jun 2023 20:50:52 +0200 (CEST)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
	by mailout.west.internal (Postfix) with ESMTP id BB5D332008FF;
	Wed, 14 Jun 2023 14:43:19 -0400 (EDT)
Received: from imap45 ([10.202.2.95])
  by compute6.internal (MEProxy); Wed, 14 Jun 2023 14:43:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=certik.us; h=cc
	:cc:content-transfer-encoding:content-type:content-type:date
	:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:sender:subject:subject:to:to; s=fm1; t=
	1686768199; x=1686854599; bh=r/YhtgNYZh8syf0CTrwYY5KGqVtP0sNvTuq
	zvNQUKqM=; b=DDIU97U4C3O+mRR4qCc63OknT29XOG04BHlNebcxKxwzkjg0Q7q
	znu9ZFKVHeg/rI1KOLW8S8Xviir4EfLyqyMmT2uBF7hJXf6r/0LzCKRNWvTPHSLN
	HOWyHnpIqzWI4SZzVBq5IIkzfD6Iuh6bSUp7KRnzzf9ekkeOqhHGqKHGF/VEKYOh
	irO4MLn8oJE1r07P02jlCldAMymTLYzoQN8QrFP0W6JRY211nSFPZ66Lr3neT7NT
	ucNwPX1RohD2fL8pdlzoxJdD4/K86I/FDxlVF2Ksj7tt0Vpm8HDgeKOqbmfokp+Y
	G6Md8Vn6TMtfSPd1+ClWDJ4l/mjUukLFjFA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:cc:content-transfer-encoding
	:content-type:content-type:date:date:feedback-id:feedback-id
	:from:from:in-reply-to:in-reply-to:message-id:mime-version
	:references:reply-to:sender:subject:subject:to:to:x-me-proxy
	:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
	1686768199; x=1686854599; bh=r/YhtgNYZh8syf0CTrwYY5KGqVtP0sNvTuq
	zvNQUKqM=; b=aMrHnMMoSHL9I6ZQdtZOo/vCpAb+usxaEEMpuHwwZTNa+1Wfw4n
	1S9IHP0iFKleB4VzOcSBMtshgWHMpVsc2tsW67l3asT4Oe5cvXy4j/m84cyJ3LEO
	UJZtOq0MjCBlpfPWFlSd0YbVRHPY9mqefFIVqkNNiFQnJ7Yi/kJ7QmbZk/aAj3UA
	pRvJ1JcTvCTLUhYD1KWzkR/JmTjjyWFWQ4glb+t5v+lSezDfNTC4eTRkSr7zUHGe
	daY9b4d/L0hdEINLyoQclx1l2k4jx3OXHmkpHsGBg3cSxATvNaQWpVVlhezorNXR
	HfybpfXJzQf93qlht9PdEdyu6/m8onCdcEg==
X-ME-Sender: <xms:RwqKZLeG36V0ph-m3V0oFt3dXAoObh3Byu_1RU0ekVfOx5RXd_gVDQ>
    <xme:RwqKZBPi3p0cTfzuCPD4sWBew90E4S3mYRLUz9d__aL-TCmakxiqss24RrTNi4OYk
    13DK1DlN7K3ut1PVw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgudeftdcutefuodetggdotefrod
    ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
    necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
    enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpefq
    nhgurhgvjhcuvegvrhhtvohkuceoohhnughrvghjsegtvghrthhikhdruhhsqeenucggtf
    frrghtthgvrhhnpefhteevvedttdejteevveffgeeigfduieejuefhfeeuudehiefgveeg
    geejffekieenucffohhmrghinhepjhefqdhfohhrthhrrghnrdhorhhgnecuvehluhhsth
    gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepohhnughrvghjsegtvghr
    thhikhdruhhs
X-ME-Proxy: <xmx:RwqKZEis51HU9an_E6BYvh-muk9SeViPhZoL-YZsNU8kBu-LuiVsGw>
    <xmx:RwqKZM92sIveZ7jY39mlmEznPFclzGf-bU5c-tTkpmEv1DghhSB98Q>
    <xmx:RwqKZHtU-ElnhHxOWNQwWqESw3GtuLrtC7K5TS_9giFGWZxN_s3Zyg>
    <xmx:RwqKZF0KkzkMwwrUrAkTONcSnWuiA36t_FG5Nm8blyMO59bQzcLB5A>
Feedback-ID: i39d145bb:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501)
	id EA775272007A; Wed, 14 Jun 2023 14:43:18 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.9.0-alpha0-492-g08e3be04ba-fm-20230607.003-g08e3be04
Mime-Version: 1.0
Message-Id: <31de89c2-b43c-4bf9-852a-c345f19a2621@app.fastmail.com>
In-Reply-To: 
 <DM6PR12MB31301883BCAFDD39368B8B5CCB5AA@DM6PR12MB3130.namprd12.prod.outlook.com>
References: 
 <DM6PR12MB31301883BCAFDD39368B8B5CCB5AA@DM6PR12MB3130.namprd12.prod.outlook.com>
Date: Wed, 14 Jun 2023 12:42:57 -0600
From: =?UTF-8?Q?Ond=C5=99ej_=C4=8Cert=C3=ADk?= <ondrej@certik.us>
To: "J3 Mailinglist" <j3@mailman.j3-fortran.org>,
 "WG5 List" <sc22wg5@open-std.org>
Cc: "Jeff Hammond" <jehammond@nvidia.com>
Subject: Re: [J3] [SC22WG5.6448] 23-196
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Hi,

Here is the paper: https://j3-fortran.org/doc/year/23/23-196.txt

I think the ideas and the approach there are reasonable. The main use ca=
se that seems to be missing is where you want to import the module, but =
not have any symbols from it imported, only those that you access via `m=
1%%f`. Example:

    Subroutine s
        Use m1, as_module: ! we have to find a better syntax
        ...
        m1%%f =3D 999 ! Allowed
        f =3D 999 ! Not allowed
=20
This use case is equivalent to Python's:

import m1
m1.f =3D 999 # Allowed
f =3D 999 # Not allowed

It's precisely this use case that has been frequently requested.

Ondrej

On Wed, Jun 14, 2023, at 9:47 AM, Jeff Hammond via J3 wrote:
> I like this paper and agree with the choice of %% syntax as well as=20
> prohibiting the bypass of use-only.  When I employ =E2=80=9Cuse, only=E2=
=80=9D, I am=20
> hoping that the compiler with be able to reduce compile and link-time=20
> because the other symbols are not visible, and %% bypass would break=20
> that.
>=20
> I am sharing my comments here because I don=E2=80=99t attend the relev=
ant subgroup.
>=20
> Jeff
