141 karma · joined January 30, 2024
If setting out to find a vulnerability, how do you get started?
What is the “open ide, write print(“hello world”)” for this kind of work?
I mean the bindings and collections. For example, when you make an array in JS, the default syntax is a mutable list with a mutable binding:
let xs = [ 1, 2, 3 ]
> Neither are monads. There are entire FP languages without monads for effects (obviously, you can write a monadic interface in them, but it's not part of the idiomatic core).I should be more precise - there needs to be some way to mange effects. Monads with syntax extensions is simply the most common (Haskell, Scala, F#, Closure macros)
> and even if they are, modern c++ fully supports them, as does rust, javascript, etc. It's very common in javascript to use Array.map() and Array.flat().
JavaScript does not have good monad support. This is why async/await was added as a new language feature. Yeah, I know you can hack together something with generator functions, but it’s hardly idiomatic.
But we’re getting into the weeds here. My point is: I don’t consider a language to support FP when writing functional code in that language leads to lots of friction compared to what is idiomatic.
Have you ever tried FP in Java? It works for some toy thing but then you hit the lack of TCO, or the ridiculously long type names (not inferred) or the pyramid of doom…
You need expression orientation, immutability by default, persistent collections in the standard library, some way to handle monadic code, etc…
If what you need is available, however, then it can be so much better.
Records can have no state - compared to regular classes - so they are an anti-OOP feature.
FP is much more than this one language feature.
However, most developers wouldn’t understand, say, a result monad implemented via LINQ, so you’re still fighting the ecosystem somewhat.
If you try to write mostly pure code in Java I’m afraid you’re in for a bad time, despite the (big!) improvements of records and lambdas.
Minimum viable FP starts at OCaml, F#, Scala and Closure, yet none of these are mainstream.
It seems like this system can only work if the build and deployment is all done by one tool in a monorepo. What does migration from existing setups look like?
And what about services that communicate via shared infrastructure:
- A writes to Kafka topic T
- B reads from Kafka topic T
Ok so we could make the hash of A part of the topic name T, but then on every release we make a new topic and lose history?
Looking forward to future posts.
Has the situation improved?
Why not Discord?