-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at an F# Trill sample #5
base: master
Are you sure you want to change the base?
Conversation
Add optional parameters to toStreamable Map some overloads to F# functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably factor out the helper methods in a different file, otherwise it looks like a good start.
I would also argue that instead of creating TrillSamples/HelloWorldFS/
, the structure should be: TrillSamples/FSharp/HelloWorld
I agree about the separate file, however, I wanted to keep it all together
for my Microsoft colleagues less familiar with F#.
I am in two minds about the FSharp/* folder structure. To me, it makes F# a
second class citizen to C#, and I am less than enthusiastic about
apartheid. If the C# samples were in a CSharp folder the equal separate
argument could be made, but that too is disturbing. :)
…On Wed, 2 Jan 2019 at 23:49, Fredrik Eilertsen ***@***.***> wrote:
***@***.**** commented on this pull request.
You should probably factor out the helper methods in a different file,
otherwise it looks like a good start.
I would also argue that instead of creating TrillSamples/HelloWorldFS/,
the structure should be: TrillSamples/FSharp/HelloWorld
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5KcHBQbTaYmnJu_KlqfIfJfWDPQSKOks5u_bYNgaJpZM4ZfXTz>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on that, they should probably be separated in "CSharp" and FSharp".
This is used around the Microsoft repos, like https://github.com/Microsoft/FASTER
@cybertyche I have a simple port to F# of some of the HelloWorld sample.
I created a module of functions that map some of the main Streamable functions. These take F# functions and are in a form that is more suitable for currying. Where Trill takes
Expression
I have used F# lambdas as the F# Co piker seems to do a mapping for us. This defeats some of the optimizations in Trill, of course, but it is just the first pass. We may like to take a look at directly supporting quotations here. For now I have punted on optional parameters, etc.Note, that since this was written in Rider on MacOS I had to disable the .NET Framework projects in the solution. However, I do not expect this PR to be merged. It is only to start a discussion.