4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 4y ago · link · parent
You mean it has Lambdas? Yes that's a start, but there's a lot more it needs to claim good FP support. Programming with lambdas is not sufficient to do "functional programming", which is really about composing pure functions (everything else follows from this, e.g. immutable data). Java's roadmap does look promising though.
comment 4y ago · link · parent
"It is my belief that the best direction for evolving Java is to encourage a more functional style of programming. ... We're not going to turn Java into Haskell, nor even into Scala. But the direction is clear."
https://mail.openjdk.org/pipermail/lambda-dev/2011-August/00...
comment 4y ago · link · parent
comment 4y ago · link · parent
Until it is resampled in the noisy OS mixer and/or lossy compressed again to be sent over Bluetooth. Very few ABX studies consider the effect of such modern "digital signal chains", especially transcoding. It's much better to start with FLAC.
comment 4y ago · link · parent
The main idea is algebraic composition (a non-commutative monoid).
comment 4y ago · link · parent
https://github.com/willtim/recursion-schemes/blob/master/sli...
comment 4y ago · link · parent
Yes recursion is a useful tool, just like GOTO and is sometimes necessary or more practical. But it is better to e.g. use a fold if you can because that further constrains and aids reasoning. For example, a fold will always terminate unlike general recursion.
I recommend looking into recursion schemes, if you aren't familiar with them.
comment 4y ago · link · parent
comment 4y ago · link · parent
Industry clearly prioritises speed of delivery above all else. Security, reliability and maintenance are future problems (that would be nice to have).
However, in order to gain the power to reason about our code and be able to prove the correctness of various properties (what a typechecker does), we have to program with more restrictive models. This has been argued many times before (e.g. Dijkstra's structured programming). Haskell and Rust are just two of many examples. My favourite is regular expressions, choose actual proper regexes and you have guaranteed O(n) execution, choose Perl/Python "Regex" and you have a potential security hole.
comment 4y ago · link · parent
comment 4y ago · link · parent