|
|
|
|
|
by nnq
3486 days ago
|
|
Seeing APIs that look like: Chart.Line(data) |> Chart.WithTitle("smth") |> ...
...makes anyone say "yuck" and avoiding F# for any exploratory work. And even after you understand how the pipe operator works and how useful it can be in other contexts. I mean, ugh... Even putting up with superfluous verbosity like `List.Map(myList)` instead of a `map(myList, ...)` or `myList.map(...)` because "that's how F#/OCaml does it, stfu" is ok, but this seems like purposeful obsfucation.No wonder R and Python are the only languages popular in ML. They are the only ones leading to sane readable code by people having other stuff to keep loaded in their head than language details. I mean, yeah, syntax that doesn't matter, unless it's so f annoying and ugly that you simply can't put up with it as much as you try! |
|
This is very, very easy stuff for functional programming. Most of the people I know in ML, talented ML folks doing data science within the org I work for to do exciting things... they actually aren't huge fans of the way Python does things. They're huge fans of the libraries Python has to speed up ML work. F# has a real lack there (surprisingly!).
But like, saying that you like:
as opposed to: seems to me like 6 of one or half a dozen of the other. Especially since when you're reusing any given part of the pipeline, the ML way is alot more terse.And it's not like Python is devoid of hideous examples of poor language design. For example, self parameters. All we're told is some new age mysticism about how "explicit is better than implicit", but somehow that doesn't apply when we need higher order functions and we're using private function with lambda names to try and signal to readers that, "Sorry I needed 2 statements in my list comprehension and Python talks down to me like that guy from Timecube because of it." Why is explicitness valuable there but not on tuple construction?
And it's not like Python doesn't make you arbitrarily choose between List.function and list.method with no seeming decisions to make.
Which is not to say Python is especially bad. It is to say that you may have normalized Python so much that you forget all computer languages are somewhat arbitrary.