5 ms·
Haskell, Ocaml, scala anything else?
by xiaodai 2y ago
Haskell, Ocaml, scala
anything else?
- genter 2y agoRust, ReasonML
- chx 2y agoRust doesn't apply. You need a functional language for the kind of robustness we are talking about. Rust got some influences from there but it's not one.
- __s 2y agoWhat are "we" talking about? - Immutability by default. Check - Discriminated unions with exhaustive check. Check - No nulls by default. Check - No exceptions in the business logic. Check - Strict dependency order. Rust doesn't have this - Warnings on unused expression results. Check - Typed primitives. The level of ergonomics this is implemented with in F# I'll say Rust doesn't have this - Explicit conversions. Check - Functional approach to concurrency. I think Rust's compile time safety against data races gives this a check. I've used channels for concurrent server processes, it's nice. Check - Explicit dependency injection. I've never understood what this means 7/10
- Jtsummers 2y ago> - Explicit dependency injection. I've never understood what this means The article seems to mean what's described in this other article as "dependency parameterization" where the dependency is explicitly passed to the function (and every function it calls that also needs that same dependency). This is as opposed to, in OO languages, setting the dependency (typically) during construction (however the object is constructed). Or it's otherwise set in some larger scope than the functions which make use of it (global, module, object instance, whatever is appropriate to the language and task). https://fsharpforfunandprofit.com/posts/dependencies/ https://fsharpforfunandprofit.com/posts/dependencies/ https://fsharpforfunandprofit.com/posts/dependencies-2/ https://fsharpforfunandprofit.com/posts/dependencies-2/
- pjtr 2y agoIs "let-over-lambda" (variable capture / closure) not possible in F#? Is that not a form of implicit dependency injection?
- Horusiath 2y agoMost of these points are related to strict type system. If that was the case, then Lisp wouldn't be functional programming language. IMO the first and foremost principle of Functional Programming languages is that they are optimised around building programs in terms of function composition. And anyone who had to work with borrow checker and closures for 5sec knows, that this is not the case for Rust.
- frogulis 2y agoI think you've taken it backwards. The comment you were replying to is listing features that lead to robustness (many of which appear in strongly-typed functional languages in the ML family), not essential aspects of functional programming languages.
- __s 2y agoIndeed. I was listing the specific items the article (titled 'Why is F# code so robust and reliable? ') lists. Functional programming languages only came up to reject someone suggesting Rust as a language that can be included as robust/reliable in the context of the article's reasons for F# being robust/reliable
- deleted 2y ago[deleted]
- kazinator 2y agoLisp is a family of languages, most of which are not functional.
- chx 2y agoErlang, Elixir.
- 22c 2y agoJulia?
- Joel_Mckay 2y agoMy favorite feature reduced to a single character: https://www.geeksforgeeks.org/broadcasting-across-arrays-in-julia/ https://www.geeksforgeeks.org/broadcasting-across-arrays-in-... I also like the constraint programming support combined with performance in implicit parallelism: sudo apt-get install minizinc-ide minizinc libgecode-dev curl -fsSL https://install.julialang.org https://install.julialang.org | sh -s -- --default-channel=lts --add-to-path=yes --startup-selfupdate=3600 >julia import Pkg Pkg.add("CUDA") Pkg.add("MiniZinc") using CUDA CUDA.versioninfo() Enjoy the fun =3
- bdjsiqoocwk 2y agoI love Julia, but what is your example trying to illustrate?
- Joel_Mckay 2y agoJust highlighting my favorite tools other people may find useful. Constraint programming is not Julia specific =)