[Info-vax] First ship poll: When will the first native x86-64 compilers ship ?

Arne Vajhøj arne at vajhoej.dk
Thu Apr 14 21:55:10 EDT 2022


On 4/14/2022 9:43 PM, Arne Vajhøj wrote:
> On 4/14/2022 7:58 PM, Single Stage to Orbit wrote:
>> On Thu, 2022-04-14 at 18:59 -0400, Arne Vajhøj wrote:
>>>>> C# allows something similar since version 7 (non-static) / 8
>>>>> (static).
>>>>
>>>> That's nested classes, completely different kettle of fish.
>>>
>>> No.
>>>
>>> Nested classes has been in C# since version 1 (because
>>> it was in Java).
>>>
>>> C# version 7 and 8 added nested methods.
>>
>> Oh? That's news to me but yes, I just checked and indeed it does have
>> nested methods. But I'm not a C# coder though.
> 
> Honestly I have never understood why they added it.
> 
> I think it has solid benefits for a language like
> Pascal.
> 
> But it is not quite so obvious for a language
> with namespaces, classes and public/internal/private
> visibility available.

And now we are in the linguistic mode.

VB.NET does not have nested methods/functions/subs.

But VB.NET lambdas can do practically the same.

Example:

Module Module1
     Function M1()
         Dim M = Function() As Integer
                     Return 1
                 End Function
         Return M() + 1
     End Function
     Function M2()
         Dim M = Function() As Integer
                     Return 2
                 End Function
         Return M() + 2
     End Function
     Sub Main()
         Console.WriteLine("{0} {1}", M1(), M2())
         Console.ReadKey()
     End Sub
End Module

Arne




More information about the Info-vax mailing list