Comments (10)
Actually XxxAsync usually means that a Task is returned, the convention for F# async is AsyncXxx
from fsharp.data.sqlclient.
Robert,
I followed same guidelines as (slides # 15-16)
http://view.officeapps.live.com/op/view.aspx?src=http%3a%2f%2fvideo.ch9.ms%2fsessions%2fbuild%2f2013%2f3-301.pptx
Video
http://channel9.msdn.com/Events/Build/2013/3-301#time=55m40s
Async prefix/post-fix is legacy from old days where there were 2 versions of method. Type system is expressive enough for user to figure out that return type is async computation.
from fsharp.data.sqlclient.
@ovatsus Completely correct, sorry.
@dmitry-a-morozov I've had that same notion, thinking always provide async only. Now, being exposed to it, it is pretty annoying, and I quickly changed my opinion. :)
Often you don't care about async. In the app I tried this TP on, I'm processing up to 95.000 mappings from street address to lat/lon coordinates every day. This is a simple console app, and Async is completely irrelevant here. Getting back an async in this case just distracts; 'now what do I do with this?'
from fsharp.data.sqlclient.
Robert,
Are you on F# 3.1?
from fsharp.data.sqlclient.
No, still 3.0. Why?
from fsharp.data.sqlclient.
You can write generic extension method that does sync execution.
But you need 3.1 for it to make sense otherwise it won't look anyhow better than Async.RunSynchronously
Follow me?
from fsharp.data.sqlclient.
You mean because type annotations are no longer necessary for extension methods? Pretty obscure to me, will not make anything look better. But I feel the resistance. I'm fine with closing the issue.
from fsharp.data.sqlclient.
Because you can combine extension method and inline constrains.
I'll send you example later (once I'll install VS 2013)
Don't close it yet. I want think about it.
from fsharp.data.sqlclient.
@ovatsus What's you take on this async/sync issue?
- Keep only one async Execute
- Have 2 methods AsyncExecute & Execute
- Add helper module method: let inline SqlCommand.execute = cmd.Execute() |> Async.RunSynchronously
from fsharp.data.sqlclient.
I'd say 2)
From: Dmitry
Sent: 18/10/2013 19:12
To: dmitry-a-morozov/FSharp.Data.SqlCommandTypeProvider
Cc: Gustavo Guerra
Subject: Re: [FSharp.Data.SqlCommandTypeProvider] Provide Synchronous Execute() (#5)
@ovatsus What's you take on this async/sync issue?
- Keep only one async Execute
- Have 2 methods AsyncExecute & Execute
- Add helper module method: let inline SqlCommand.execute = cmd.Execute() |> Async.RunSynchronously
Reply to this email directly or view it on GitHub:
#5 (comment)
from fsharp.data.sqlclient.
Related Issues (20)
- Dacpac support info HOT 3
- "F# Formatting" link is broken
- Can't build/run from the commandline, but can from Visual Studio 2019 HOT 2
- Question: Creating a provider without an access to DB HOT 3
- SqlEnumProvider breaks VS 2019 HOT 2
- Not platform detection Fable HOT 1
- Build is broken without full VS installation
- Fixed length binary columns in user defined table types fail when constructed HOT 8
- Cannot use User Defined Table Types with the SqlCommandProvider HOT 5
- .NET 6 support HOT 6
- One line summary of the bug HOT 2
- TVP Column Ordering is incorrect as of version 2.1.0
- Cannot use parameter name more than once in a script HOT 3
- System.Data.SqlClient is not supported on this platform. HOT 5
- Conversion failed when using User Defined Table Types HOT 1
- Any 2023 tricks for running on Windows? HOT 3
- NullReferenceException in SqlConnection.UseLocally HOT 1
- Support for 'Active Directory Interactive' authentication HOT 3
- dotnet SDK projects using FSharp.Core version 7.0.0 breaks at runtime HOT 3
- SQL LIKE operation doesn't recognize variable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.data.sqlclient.