Magnificent, I realized that I have to add the System.ValueTuple nuget reference, any other in any case?. Is there any issue deploying to the store with all the new stuff? Hope not.
Why would Item start at 1 and not 0?
Good, but looks like baby steps towards being a more functional language. I still can't understand what good are these features without things like records or algebraic data types. I guess time will tell.
Unless this has changed in the release version (I hope it hasn't) than it seems there is a mistake within pattern matching example where the variable 'i' is used outside its if level scope. The roslyn pattern matching spec says:
The scope of a pattern variable is as follows:
- If the pattern appears in the condition of an if statement, its scope is the condition and controlled statement of the if statement, but not its else clause.
If this is correct than the i variable should not be in scope after the if.
Looking more like F# every release! That's a good thing by the way, it means we're getting some of the goodness that F# devs had had for a while.
How about an overrideable assigment operator.. That would go a long way to insuring dimensional integrity of computations involving physical quantities -- acceleration = velocity / time.. where each dimension is represented by a value on the measurement vector length, time, mass, charge
@Jon: Item starts at 1 rather than 0 because of the legacy of System.Tuple types. System.ValueTuple is a very similar set of types, with the difference that they are structs. That said, in C# tuples, elements can be named, so I don't expect to see that people use Item1, Item2, etc frequently.
(string first, string last) person = GetAccount();
Moving forward, it will be impossible to know what variables are in scope.
Hi Mads, When are we going to get read-only (const) variables like C++ const or java final. Read-only variables is an important step towards functional programming (grass root level). It would also be good if C# supports const methods like C++ to create immutable types. What do you think?
Yeah, now is Erlang, you only miss receive -> and send !