3 ms·
MLs aren't really academic languages aside from Standard ML. F# and OCaml are very pragmatic languages. The cleaner parts of Rust came from ML. What syntaxes d
by bmitc 2y ago
MLs aren't really academic languages aside from Standard ML. F# and OCaml are very pragmatic languages. The cleaner parts of Rust came from ML.
What syntaxes do engineers find clean? I don't understand the distinction you're making.
- t-writescode 2y agoI assume they mean: * Python, Ruby, C#, Java, Go-style languages? I imagine most developers operate in neither ML languages nor Lisp-style languages. The most advanced "FP" trick that I imagine most developers use is Fluent-style programming with a whole bunch of their language's equivalent of: variable .map do ... end .map do ... end .flatten Addendum: or maybe Linq in C# Addendum 2: And even the fluent-style trick in those languages tends to follow a similar pattern. Using Kotlin and Ruby as examples, since those are my (edit: main) languages, variable .map do |i| something_with(i) end .map { |i| something_else(i) } .flatten shows familiar tricks. The dot operator implies that the thing previous to it has an action being done; and curly braces or the "do" operation both imply a block of some sort, and so a quick glance is easy to follow. In Kotlin, this gets a little bit more confusing (yes, really) because it's common to see: variable .map { somethingWith(it) } .map { somethingElse(it) } .flatten() And now there's this magic "it" variable, but that's easy enough to guess from, especially with syntax highlighting. Anything more advanced than that and the cognitive load for these language starts to rise for people that aren't deep in them. When you're starting working with a new language, that does increase difficulty and may even be so much of a barrier that developers may not want to hop over.
- skydhash 2y agoWhen you start working in a new language, the best thing to do is to get a book and familiarize yourself with any constructs or patterns you are not familiar with. Expecting things to be similar to what you’re used to (which lower the learning curve) is a fool’s errand.
- t-writescode 2y agoTo learn a new language, you need a reason to learn that new language and you need sufficient drive to go through with it. Having familiar constructs not only make it easier to code-switch between languages (people that work on multi-language projects know that pain pretty well), but also decreases the barrier to entry to the language in the first place.