[Info-vax] First ship poll: When will the first native x86-64 compilers ship ?
Arne Vajhøj
arne at vajhoej.dk
Thu Apr 14 19:05:42 EDT 2022
On 4/14/2022 12:23 AM, Dave Froble wrote:
> On 4/13/2022 10:10 PM, Arne Vajhøj wrote:
>> On 4/13/2022 8:43 PM, Dave Froble wrote:
>>> On 4/13/2022 6:39 PM, Single Stage to Orbit wrote:
>>>> On Wed, 2022-04-13 at 14:42 -0400, Arne Vajhøj wrote:
>>>>> You forgot Pascal!
>>>>
>>>> Nice language, it must be the only one I'm aware of that allows nested
>>>> procedures and functions. I've not met another programming language
>>>> that allows that.
>>>
>>> Can you better define nested functions? Then I can decide if Basic
>>> allows such.
>>
>> Functions declared inside functions (and therefore only available
>> inside the declaring function).
>
> Ok, what is so neat about that?
>
> I cannot see the point, when if one wants to use a second function
> inside a first function, another external function should be callable.
> Haven't tried it recently. Maybe I should. Perhaps I should know what
> I'm talking about at least once a year.
>
> But I can see no reason to have a function defined inside another function.
First of all then it is not a "must have" only a "nice to have".
But it does provide some benefits for large programs.
It avoids name pollution as the names are not globally
available, so reduces the number of accidental name conflicts
to be resolved.
It makes fixing/enhancing the code less risky. With a
globally visible function you need to check if it is used
elsewhere and whether the fix/enhancement will work for them.
With a local function inside your main function, then you know
that nobody else is using it and you can do what you want to
do without fear of breaking something else.
Arne
More information about the Info-vax
mailing list