fsprojects / FSharp.Interop.Dynamic

DLR interop for F# -- works like dynamic keyword in C#
https://fsprojects.github.io/FSharp.Interop.Dynamic/
Apache License 2.0
95 stars 14 forks source link

Add More Operators #8

Closed jbtule closed 6 years ago

jbtule commented 7 years ago

As seen in https://github.com/pythonnet/pythonnet/issues/112 can't use plus operators.

However in Dynamitey, I do have support for every operator c# dynamic does using Dynamic.InvokeBinaryOperator So it wouldn't be hard to add, would just have to come up with operators that makes sense.

dsyme commented 7 years ago

Yes, an F# standard way of doing this would be great

I think you can feel free to reuse the NullableOperators? https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/linq.nullableoperators-module-%5Bfsharp%5D as long as you have an explicit open for say open FSharp.Interop.Dynamic.Operators

The NullableOperators are used incredibly rarely and only in LINQ queries after an explicit open. We really only added them for SQL completeness. I don't like what we did here particularly but, well, it is what it is and at least it is hidden away in normal usage

jbtule commented 6 years ago

on nuget 4.0.3-beta95