Extract expression is such a common refactoring, happy to see support for it. I'm even more curious to see now if there are going to be more advanced refactoring possible. A List.map, to for loop, and back refactoring would be such a great thing to have in how I program.
Only thing that would go on my OCD nerve, is the lack of an empty newline when the show_markup function is extracted. Kind of "common sense" when writing top level bindings to leave some breathing room between them.
I feel that Ocaml could really use better VSCode integration more than literally anything else, but the community seems completely oriented around emacs
9 comments
[ 4.3 ms ] story [ 27.0 ms ] threadDoes it replace identical expressions in the same scope? Like:
becomes ?EDIT: Or even crazier with function:
becomes (I ask this just out of curiosity. Even the "simpler" version is very impressive!)The most recent one I’ve made runs 'git grep' on the word under cursor or on the visual selection and puts everything into a quick fix list.
Since it is generic, it works on any phrases as well, and helps me find prose snippets and phrases in docs or other writings.
Only thing that would go on my OCD nerve, is the lack of an empty newline when the show_markup function is extracted. Kind of "common sense" when writing top level bindings to leave some breathing room between them.
"Examples of functional programming languages include OCaml, Erlang, Clojure, Haskell, Scala, and Common Lisp."
F# and OCaml are close cousins, and for me F# is even cleaner syntax and twice as fast (M4 Mac Studio).
It was a struggle for me to overcome my partisan preference for OCaml.