Open Happypig375 opened 3 years ago
I'm ok with improving this in principle, but part of the problem is determining an appropriate additional level of completeness.
There's code in the F# test suites (tests\fsharp\tools\eval) completing most of these cases, even without using LINQ statement execution, but problems arise with "let rec" and some other constructs.
So I'll approve in principle but you should address this if you write an RFC
In the meantime there are other quotation evaluators around and they can be used
It is especially unexpected when
fails with
when
System.Linq.Expressions.Expression.Block
is available.VarSet
is also not convertible despite the existence ofSystem.Linq.Expressions.Expression.Assign
.Ditto
PropertySet
,FieldSet
,TryWith
,TryFinally
,ForIntegerRangeLoop
, andWhileLoop
.The existing way of approaching this problem in F# is hand-building expressions without using quotations.
Are there expressions that are unconvertible from quotations to expressions instead of just not being implemented?
raise
andreraise
should be treated as special functions and be converted to special expressions just like conversion operators as well.Pros and Cons
The advantages of making this adjustment to F# are
The disadvantages of making this adjustment to F# are none?
Extra information
Estimated cost (XS, S, M, L, XL, XXL): S to M
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the :+1: emoji on this issue. These counts are used to generally order the suggestions by engagement.