Skip to content

Week 1 22nd Oct

Louis Kueh edited this page Oct 26, 2018 · 11 revisions

Research

  • What others have done in this area

Implementation

  • Initial Implementation

Questions

Hints/Fsharp lint fufills objective in terms of

  • Stylistic correctness - Yes E.g.
Consider changing `print` to PascalCase.
Error in file Program.fs on line 2 starting at column 19
   abstract member print : unit -> unit
  • Deterministic - yes
  • Heuristic - to a certain extent ? - What is the difference between heuristics/deterministic? Warnings/mistakes that are hard to catch?

E.g.

If `(+)` has no mutable arguments partially applied the lambda can be removed.
Error in file Program.fs on line 6 starting at column 23
    let x = List.fold (fun x y -> x + y) 0 [1;2;3]
  • Work on improving existing Fsharp lint which is already integrated into ionide?
  • look into how Fsharp lint works and assess whether to build own independant framework?
  • can use hint analyzer to write own match and suggestions
  • more sophisticated, tutorial like hints targeted at new programmers

F# Learning questions

let makeTriple (a,b) =
    let p = square(a) - square(b)
    let q = 2 * a * b
    let r = square(a) + square(b)
    (p,q,r)

Declarative? No assignments? Instead:

let makeTriple (a,b) =
    (square(a) - square(b),2 * a * b,square(a) + square(b))

Clone this wiki locally