#### Topic: F# hello wordl: why two operators instead of one?

let Greetings |> Started to look at a leisure in F# , and by itself got  questions. We tell, operation with collections://------ Lists------ let twoToFive = [2; 3; 4; 5]//Square brackets create a list with//semicolon delimiters. let oneToFive = 1:: twoToFive//:: creates list with new 1st element//The result is [1; 2; 3; 4; 5] let zeroToFive = [0; 1] twoToFive//concats two lists Internal  asks: and what for two operators:: and if it would be possible to leave and one of them? - The operator demands always to transform a single element into a collection from one element, like [1] twoToFive the cons-operator (two colons) also forbids to rearrange arguments in places (at the left always there should be a single element, and on the right - a collection). Actually, a question: in what situations there can be that ambiguity because of which and it was necessary to enter two different operators? Or it simply "was historically added"?

#### Re: F# hello wordl: why two operators instead of one?

Hello, Mr. Delphist, you wrote: MD> Actually, a question: in what situations there can be that ambiguity because of which and it was necessary to enter two different operators? Or it simply "was historically added"? The overload of methods F# like is impossible because of type system. Most likely it concerns and operators.

#### Re: F# hello wordl: why two operators instead of one?

Simply interesting: what at f# mission? For what it use, where does not approach c#?

#### Re: F# hello wordl: why two operators instead of one?

Hello, Mr. Delphist, you wrote: MD> Internal  asks: and what for two operators:: and if it would be possible to leave and one of them? These are operators simply different in sense. Everyone is convenient in the case.:: - adds in a list head one element. It  operation. 1:: [2; 3; 4]-> [1; 2; 3; 4] - concatenation of two lists. list1 list2 operation can be long as it is point-by-point from the end list1 adds elements to list2. Basically it is possible to express one through another, but for convenience it is better 2 separate.

#### Re: F# hello wordl: why two operators instead of one?

Hello, Mr. Delphist, you wrote: MD> MD>//------ Lists------ MD> let twoToFive = [2; 3; 4; 5]//Square brackets create a list with MD>//semicolon delimiters. MD> let oneToFive = 1:: twoToFive//:: creates list with new 1st element MD>//The result is [1; 2; 3; 4; 5] MD> let zeroToFive = [0; 1] twoToFive//concats two lists MD> MD> Internal  asks: and what for two operators:: and if it would be possible to leave and one of them? I at all  in F#, but, , am the considerable difference between the list of lists and the member list. I.e. [0; 1]; [2; 3; 4]] - absolutely-at all the same, as [0; 1; 2; 3; 4], and not the same that [0; 1]; 2; 3; 4]. , we have different operator for different functionality.

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T> it is simply interesting: what at f# mission? For what it use, where does not approach c#? The link

#### Re: F# hello wordl: why two operators instead of one?

T>> it is simply interesting: what at f# mission? For what it use, where does not approach c#? MH> thanks link, of course, but it would be desirable to hear about any examples from this real life: type, the code on C# was executed more slowly in  time or consumed in Y times more storages, or such extremal examples are not present?

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T> thanks, of course, but were to be heard about any examples from this real life: type, the code on C# was executed more slowly in  time or consumed in Y times more storages, or such extremal examples are not present? Such - naturally is not present. Both languages sit on one , and  - , that is is closer to C#. In productivity terms C# will be not always worse F#. And here in respect of expressiveness of the code is a question.

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T> thanks, of course, but were to be heard about any examples from this real life: type, the code on C# was executed more slowly in  time or consumed in Y times more storages, or such extremal examples are not present? Somehow I already stated the impressions from F# here the Author: MadHuman Date: 13.03 21:18 on productivity - C# it will be faster normal. If it is necessary to squeeze out . Speed - that is better si-sharp. f-sharp takes ability laconically to express thought, to do easier difficult things and by that a brain of one person the complex code is capable  more. The code becomes just more exact easier, and at the expense of it it is possible to implement and supervise (to hold in a head nuances) more difficult functional. From unwinding of recalled advantages (that I really feel that in practice): - the POWERFUL pattern-matching. It is simply lethal thing. - Simple operation with functions (it is convenient to build ,  them to declare  functions to transfer and ). - it is capable to deduce itself types of functions and arguments, there is no necessity to write frequently the long summaries of types. - the functional programming. - after time when  that wrote that and already forgot - faster anew  logic.

#### Re: F# hello wordl: why two operators instead of one?

T>> thanks, of course, but were to be heard about any examples from this real life: type, the code on C# was executed more slowly in  time or consumed in Y times more storages, or such extremal examples are not present? MH> somehow I already stated the impressions from F# here the Author: MadHuman Date: 13.03 21:18 MH> on productivity - C# it will be faster normal. If it is necessary to squeeze out . Speed - that is better si-sharp. MH> f-sharp takes ability laconically to express thought, to do easier difficult things and by that a brain of one person the complex code is capable  more. The code becomes just more exact easier, and at the expense of it it is possible to implement and supervise (to hold in a head nuances) more difficult functional. MH> from unwinding of recalled advantages (that I really feel that in practice): MH> - the POWERFUL pattern-matching. It is simply lethal thing. MH> - simple operation with functions (it is convenient to build ,  them to declare  functions to transfer and ). MH> - it is capable to deduce itself types of functions and arguments, there is no necessity to write frequently the long summaries of types. MH> - the functional programming. MH> - after time when  that wrote that and already forgot - faster anew  logic. More shortly if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more?

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T> is shorter, if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more? As a whole yes. But also in UI/frontenda, there can be difficult algorithms/subsystems then it is possible to carry out their implementation in the separate project on F#

#### Re: F# hello wordl: why two operators instead of one?

T>> is shorter, if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more? MH> as a whole yes. But also in UI/frontenda, there can be difficult algorithms/subsystems then it is possible to carry out their implementation in the separate project on F# and what, there is F# an implementation under WPF (MVVM) type Prism/Caliburn or something especial under asp.net?

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T>>> is shorter, if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more? MH>> as a whole yes. But also in UI/frontenda, there can be difficult algorithms/subsystems then it is possible to carry out their implementation in the separate project on F# T> and what, there is F# an implementation under WPF (MVVM) type Prism/Caliburn or something especial under asp.net? . At us in separate F# the project (dll the assembly as a result) that it makes sense to do all there - becomes. Then the assembly is connected to asp.net project and other and the functional from it is used. It is possible (there are templates of projects) that web-application on asp.net was on F# (controlers in particular), but we did not become . The main thing that difficult algorithms/subsystems is possibility to carry out implementation in the separate project on F#, and then to expose the convenient interface on usage for others. Thus because the main (big) part was on C# and then a functional part began to carry out in the separate project F#.

#### Re: F# hello wordl: why two operators instead of one?

Hello, Sinclair, you wrote: S> I at all  in F#, but, , am the considerable difference between the list of lists and the member list. S> I.e. [0; 1]; [2; 3; 4]] - absolutely-at all the same, as [0; 1; 2; 3; 4], and not the same that [0; 1]; 2; 3; 4]. S> Sootvetstvnno, we have different operator for different functionality. Aha, thanks are similar to that!

#### Re: F# hello wordl: why two operators instead of one?

Hello, Sinclair, you wrote: S> I at all  in F#, but, , am the considerable difference between the list of lists and the member list. S> I.e. [0; 1]; [2; 3; 4]] - absolutely-at all the same, as [0; 1; 2; 3; 4], and not the same that [0; 1]; 2; 3; 4]. S> Sootvetstvnno, we have different operator for different functionality. And and here the list of lists? There there is a concatenation of two lists and as a result the new list turns out. It is necessary to look at types, there the list of integer numbers should be. And:: it is the designer, in the list 2 designers:: and []. In Haskell it is by the way used: and:: it is used for the type summary, and in ML and therefore F# on the contrary.

#### Re: F# hello wordl: why two operators instead of one?

MD> Actually, a question: in what situations there can be that ambiguity because of which and it was necessary to enter two different operators? Or it simply "was historically added"? Take Yet Another Haskell Tutorial (YAHT) and Harrison Fild the Functional programming.:: it is the designer. See also 4.5.3 Recursive Datatypes in YAHT.

#### Re: F# hello wordl: why two operators instead of one?

Hello, HrorH, you wrote: HH> Take Yet Another Haskell Tutorial (YAHT) HH> and Harrison Fild the Functional programming. HH>:: it is the designer. See also 4.5.3 Recursive Datatypes in YAHT. And it is possible to explain a little in two simple words that gives the fact of what:: - the designer? And at once, and is not the designer? If yes, why?

#### Re: F# hello wordl: why two operators instead of one?

Hello, Michael Romanov, you wrote: HH>>:: it is the designer. See also 4.5.3 Recursive Datatypes in YAHT. > And it is possible to explain a little in two simple words that gives the fact of what:: - the designer? > And at once, and is not the designer? If yes, why? The list is defined as recursive type of the data (I apologize for syntax Nemerle): variant list [T] {| Cons {head: T; tail: list [T]} | Nil}:: is an abbreviation for the designer list [T].Cons. To the left of:: there is a value head, and on the right - tail.

#### Re: F# hello wordl: why two operators instead of one?

Hello, Michael Romanov, you wrote: > And it is possible to explain a little in two simple words that gives the fact of what:: - the designer? > And at once, and is not the designer? If yes, why? The list it is possible to present as recursive type of the data, there 2 designers:: and []. The designer [] creates the empty list, and:: takes an element and the list and returns the new list. For me these designers always were strange since it like functions, but at them are not present a body. They have purely syntactic sense, that is by means of them it is possible to build any construction Cons (1, Cons (2, Cons (3, []))), and further already all depends on those methods which will work with this construction. It is similar to determination on inductions, for example natural numbers it is possible to define c the help of zero, and function of addition of unit. By the way it is supposed what to prove any properties of this list also it is possible on an induction. Thus these 2 designers - a unique method to create the list (in the theory), remaining functions are defined through them. [1; 2; 3] it is syntactic sugar for Cons (1, Cons (2, Cons (3, []))). Defining recursive type we receive thus pattern matching possibility on designers. The list is , at concatenation of 2 lists, there is a list which physically has the general tail with the second list. But to tell the truth, if someone interests , it is better to esteem something, and it is better at once on Haskell (Still I can recall Gentle introduction here.) There you will not manage 2-mja words and questions at a forum (which  similar abandoned?), there a considerable quantity of different knowledge and areas.

#### Re: F# hello wordl: why two operators instead of one?

MH> . At us in separate F# the project (dll the assembly as a result) that it makes sense to do all there - becomes. Can describe briefly what logic in the project F#? Parsing, transfer of the data from one structure in another can.

#### Re: F# hello wordl: why two operators instead of one?

Hello, igor-booch, you wrote: IB> Can describe briefly what logic in the project F#? IB> parsing, transfer of the data from one structure in another Can. As a whole it. Though "transfer of the data from one structure in another" too can be included very wide determination and parsing in it if hardly was more specific, about the following: - there is a row text DSL, for adjustment of end-user certain aspects of system behavior (business-ruly, filters,  and ). It  in AST or any data structures. - big kol-in (likely hundreds) various functions under the analysis of these adjustments and their transformations. And here f#  (the advanced pattern-matching, any functional receptions). I can safely state that without f# current forces implement and supervise this functional we could not. There is still everyone, but these are trifles in comparison with item 2 on functional volume.

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T>>> is shorter, if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more? MH>> as a whole yes. But also in UI/frontenda, there can be difficult algorithms/subsystems then it is possible to carry out their implementation in the separate project on F# T> and what, there is F# an implementation under WPF (MVVM) type Prism/Caliburn or something especial under asp.net? There was any library for WPF, forgot for a long time a title - like not it http://fsprojects.github.io/FSharp.Desktop.UI/ and not it http://fsprojects.github.io/FsXaml/ other title was. Generally here there is any list: https://fsharp.org/community/projects/

#### Re: F# hello wordl: why two operators instead of one?

Hello, HrorH, you wrote: HH> For me these designers always were strange since it like functions, but at them are not present a body. It is simple operators. Operators "+" and "-" for you too strange?

#### Re: F# hello wordl: why two operators instead of one?

Hello, MadHuman, you wrote: MH> I can safely state that without f# current forces implement and supervise this functional we could not. And you were mistaken. There are also languages not less powerful than f#, and special means for parsing and typification. And on them handling of all that you described will be where easier than on f#.

#### Re: F# hello wordl: why two operators instead of one?

Hello, takTak, you wrote: T>>> is shorter, if I correctly understood, for any algorithms on server side F# would have sense, for UI/frontenda - would have sense C#, correctly more? MH>> as a whole yes. But also in UI/frontenda, there can be difficult algorithms/subsystems then it is possible to carry out their implementation in the separate project on F# T> and what, there is F# an implementation under WPF (MVVM) type Prism/Caliburn or something especial under asp.net? Under Web at present: Websharper, Suave, Giraffe, Fable etc. Under wpf it is more difficult. Like Gjallahorn looks not bad, but its hands to try did not reach yet.