I love FP. but this is way more readable than the above. It doesn't fight the ergonomics of javascript.
gsuuon 297 days ago [-]
I think a "before" comparison would've really helped with this example. I'd also argue a state machine approach has the added benefit of allowing you to enter the sequence at any point. If you use `Co.Seq` to e.g. build a form flow, it'd be hard to test or serialize into the middle of the sequence.
There may be something interesting here but it's pretty hard to bite into.
zarathustreal 296 days ago [-]
Yea, it is. Granted you have to understand the words used in the explanation.
If your bar for “self-explanatory” is “teaches you both the words and the concepts” then there aren’t any self-explanatory frameworks at all?
boxed 297 days ago [-]
> Ballerina integrates the state of the art in functional programming and even category theory.
It's.. just typescript?
ctvo 297 days ago [-]
> Welcome to ballerina, the effortlessly elegant functional programming
> Ballerina is an advanced professional tool for advanced professionals.
> Ballerina integrates the state of the art in functional programming and even category theory.
> ... And if you are a master of functional programming, together you will write code that can be, well, transcendental.
Then I click through the code and see commented out blocks, using `alert` to debug, random wait times (???), unsure if there's any test coverage.
I may not be an advanced enough professional for this library made for advanced professionals who want to write transcendental code.
classified 296 days ago [-]
Since it has to be transpiled into the severely limited language JavaScript, is it worth it at all? F# for instance should have been a functional language but it turns out to be just some lipstick on the pig of procedural object soup, since the .NET runtime isn't actually capable of anything else. Is the situation any better here?
neonsunset 296 days ago [-]
The comment on F# is rather deranged.
CIL has had functional languages in mind since its inception, particularly because of explicit tailcall support.
If anything, it provides all the low-level building blocks the JVM lacks that enable efficient lowering strategy (even if F# does so relatively conservatively and does not push .NET like it could have).
mark38848 296 days ago [-]
PureScript is arguably the prettiest functional programming language and it compiles to JS (or Erlang, or C++, or Go, or Chez Scheme, or Kotlin, or C)
cies 297 days ago [-]
Interesting to see a project from Giuseppe's Github here on HN.
FP for browser apps is a lot of fun for us lately, but we picked Elm. The rationale: the absence of runtime errors is really sweet when your code runs in the browser (no need to collect browser console output in a central location in order to know what goes wrong).
sureglymop 297 days ago [-]
Lately I've used Gleam with the Lustre framework (which is inspired by Elm). The coolest thing is that one can do server rendered components with it also. It is a very young ecosystem but the community is great!
laurensr 297 days ago [-]
Not to be confused with the programming language by WSO2 [1].
Hadn't heard of this before, nice! Do you happen to know how they create/generate the diagrams on their homepage?
sinuhe69 297 days ago [-]
Yeah, that’s exactly what I’m wondering. I was confused by the same name, so when I did a search, it only came up with a language for system integration and not what I remembered. Thankfully it resurfaced again.
cayleyh 297 days ago [-]
Lol I immediately got this confused. Thanks :D
Akronymus 297 days ago [-]
How does it compare to elm/elmish?
abrookewood 296 days ago [-]
Not to be confused with Ballerina the programming language, which produces some very cool code diagrams automatically: https://ballerina.io/
Is it though?
There may be something interesting here but it's pretty hard to bite into.
If your bar for “self-explanatory” is “teaches you both the words and the concepts” then there aren’t any self-explanatory frameworks at all?
It's.. just typescript?
> Ballerina is an advanced professional tool for advanced professionals.
> Ballerina integrates the state of the art in functional programming and even category theory.
> ... And if you are a master of functional programming, together you will write code that can be, well, transcendental.
Then I click through the code and see commented out blocks, using `alert` to debug, random wait times (???), unsure if there's any test coverage.
Example:
https://github.com/giuseppemag/ballerina/blob/main/frontend/...
I may not be an advanced enough professional for this library made for advanced professionals who want to write transcendental code.
CIL has had functional languages in mind since its inception, particularly because of explicit tailcall support.
If anything, it provides all the low-level building blocks the JVM lacks that enable efficient lowering strategy (even if F# does so relatively conservatively and does not push .NET like it could have).
FP for browser apps is a lot of fun for us lately, but we picked Elm. The rationale: the absence of runtime errors is really sweet when your code runs in the browser (no need to collect browser console output in a central location in order to know what goes wrong).
[1]: https://ballerina.io/