Re: Function minimization and random numbers
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Wed, 06 Feb 2008 17:11:13 +0000
Jon Skeet [C# MVP] wrote:
Jon Harrop <usenet@xxxxxxxxxxxxxx> wrote:
Marc Gravell wrote:
Cheers for that; of course, it is double edged if "standard" .NET
consumers can't use the F# libs... but there we are ;-p
You can write libraries in F# that other languages can use but, of
course, you must avoid features (e.g. closures) that C# and VB lack.
In what way does C# lack closures? It supports them in the form of
delegates with captured variables etc. It may not be the same form that
F# uses, but that's not the same thing.
Closures represent all functions but .NET delegates do not because .NET
draws an unnecessary distinction between members and delegates, making them
incompatible. C# inherits this but F# goes to great lengths to remove this
artificial distinction.
You could turn everything into a delegate but, of course, this would not be
an alluring interface for C# users.
To provide first-class closures, .NET (or C#) might replace all members with
properties that return delegates. Then you could say "C# supports
first-class closures".
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
.
- Follow-Ups:
- Re: Function minimization and random numbers
- From: Jon Skeet [C# MVP]
- Re: Function minimization and random numbers
- References:
- Re: Function minimization and random numbers
- From: Jon Harrop
- Re: Function minimization and random numbers
- From: Marc Gravell
- Re: Function minimization and random numbers
- From: Jon Harrop
- Re: Function minimization and random numbers
- From: Marc Gravell
- Re: Function minimization and random numbers
- From: Jon Harrop
- Re: Function minimization and random numbers
- From: Jon Skeet [C# MVP]
- Re: Function minimization and random numbers
- Prev by Date: Re: Constructorname.classname is inaccessible due to its protectio
- Next by Date: Re: Remote object equality
- Previous by thread: Re: Function minimization and random numbers
- Next by thread: Re: Function minimization and random numbers
- Index(es):
Relevant Pages
|