News for hackers. Stuff that matters.
Re:Ballerina: An open-source programming language for the cloud by tut-urut-utut on Thursday October 28, 2021 @10:30AM (#29026532)
I liked Ballerina at first, it brings numerous goodies that were previously available only in “enterprise” middleware to a simple programming language, with sane defaults.

For example, for network calls it has seamlessly configurable retries, timeouts, circuit breakers. It allows easy mappings from one to another message format, convenient payload standard manipulations, different endpoint configuration at the source code level, easy parallelization and many more features.

All of that comes handy when developing classic middleware services, and the code is cleaner and conciser that equivalent functionality written in Java, Go, Clojure, Node …

GUI editor for source code and easy switch from graphical to code view is also nice.

But, the language itself sucks. It's cumbersome, ugly, and unnecessary. All the Ballerina functionality should be in a Java (or JavaScript) library that would allow writing concise code in a language of choice. I wish someone, preferably WSO2, release such a library. Ballerina is already implemented in Java, so it would be possible to release it as a separate Java library.

The only reason Ballerina exists is to lock customers to WSO2 ecosystem.

Re:Ballerina: An open-source programming language for the cloud by latchkey on Thursday October 28, 2021 @12:19PM (#29027788)
The "Learn by Example" doesn't have a section on writing tests, which is a non-starter for me.

Everyone shrugs off writing tests and I can't tell you how many times it has saved my butt. Especially with brining new developers onboard a complicated system.

I'm building software that runs on thousands of machines. If it doesn't have automated tests, how can I reliably deploy it?

Re:Ballerina: An open-source programming language for the cloud by sanjiva on Saturday October 30, 2021 @08:26AM (#29048240)
There's a lot of focus on testing in Ballerina: https://ballerina.io/learn/testing-ballerina-code/writing-te...
Re:Ballerina: An open-source programming language for the cloud by latchkey on Saturday October 30, 2021 @09:54PM (#29053835)
I stand corrected. Thank you.
Re:Ballerina: An open-source programming language for the cloud by hderms on Friday October 29, 2021 @02:10PM (#29041721)
yeah all the other stuff is fluff if a language doesn't have a compelling story about tests. As much as I love static typing and algebraic data types, they don't really prove that the behavior of the code is actually what is expected.

Doubly so with a language that attempts to bring distributed programming to the base level of the language. How do you test distributed programs in a way that simultaneously doesn't require everything to be an integration test but also gives you certainty that you aren't creating loads of bugs? This is an example of something Ballerina could have excelled at if it was given priority.

Re:Ballerina: An open-source programming language for the cloud by sanjiva on Saturday October 30, 2021 @02:27AM (#29046506)
Ballerina is a standalone open source project and does not tie anyone to any WSO2 ecosystem.

Please compare processing JSON in Java vs. Ballerina, typing network data in Java vs. Ballerina, writing HTTP/GraphQL/WebSocket/gRPC etc. services etc. in Java vs. Ballerina, calling network services in Java vs. Ballerina and then you'll see the difference between whatever your favorite Java framework (or rather combination of them) vs. Ballerina.

(I'm the founder & CEO of WSO2 and one of the lead language designers.)

Re:Ballerina: An open-source programming language for the cloud by tut-urut-utut on Tuesday November 02, 2021 @10:07AM (#29081438)
> Ballerina is a standalone open source project and does not tie anyone to any WSO2 ecosystem.

Except that Ballerina is created by WSO2 (the company) and used almost exclusively by that company. It's hard to find any usage outside (some of the) existing WSO2 customers. And the language itself is completely proprietary, developed by WSO2 and lock in by itself.

> Please compare processing JSON in Java vs. Ballerina, typing network data in Java vs. Ballerina, writing HTTP/GraphQL/WebSocket/gRPC etc. services etc. in Java vs. Ballerina, calling network services in Java vs. Ballerina and then you'll see the difference between whatever your favorite Java framework (or rather combination of them) vs. Ballerina.

Here I give you a credit. The ergonomic is much nicer than what exists today in Java frameworks.

What I don't agree is, that you need a language to have these features you listed. You could get 90% of them in Java (or Kotlin, or Clojure, or Scala, or Groovy, ...) if they were implemented as a standalone Java/JVM library, and not require Ballerina the language.