From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Newbie question # 2
Date: Thu, 6 Aug 2020 23:08:00 +0300 [thread overview]
Message-ID: <hp3691Flt48U1@mid.individual.net> (raw)
In-Reply-To: <7348444d-f3a1-4bd2-823c-7c67052c0a5co@googlegroups.com>
On 2020-08-06 22:45, Ian Douglas wrote:
> On Thursday, 6 August 2020 21:20:15 UTC+2, Niklas Holsti wrote:
>>
>> Ada does not have such a feature.
>
> I figured as much, probably "unsafe programming practice" at the end of the day.
I wouldn't say so. I think "namelist" input is a perfectly reasonable
function to have in some programs, and is not particularly unsafe in any
way -- if the programmer can limit the set of variables that can be
named and changed by such input, which is the case in Fortran (and also
in our various suggestions for implementing it in Ada).
PHP is (I believe) an interpreted language, so the symbol table is
around at run-time, which makes it easy for PHP to support variables
that refer to any other variable by its symbolic name. This can make
"namelist" input in PHP unsafe, since the input can change any variable
-- including variables that the programmer did not intend to be
changeable in this way.
Ada is usually compiled, and the symbol table is not present when the
compiled program runs, so it would be harder to implement a "namelist"
input/output feature. But not impossible, as Fortran shows.
--
Niklas Holsti
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2020-08-06 20:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 18:40 Newbie question # 2 Ian Douglas
2020-08-06 18:56 ` Simon Wright
2020-08-06 19:41 ` Ian Douglas
2020-08-06 21:10 ` Simon Wright
2020-08-07 11:28 ` Ian Douglas
2020-08-06 19:20 ` Niklas Holsti
2020-08-06 19:45 ` Ian Douglas
2020-08-06 20:08 ` Niklas Holsti [this message]
2020-08-06 19:41 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox