3 ms·
So, the home page makes some big claims, but doesn't link to how Ballerina solves those issues. I'm not saying that it doesn't. I'm saying that it would be ni
by mdasen 7y ago
So, the home page makes some big claims, but doesn't link to how Ballerina solves those issues. I'm not saying that it doesn't. I'm saying that it would be nice to have a link to what makes it different for that aspect.
For example, "Structural, Open-by-Default Typing". It sounds really interesting, but the image next to it just looks like what you'd get in Go (except for nullability checks), C#, Kotlin, and many other languages. Yes, static typing (especially with nullability checks) can make life difficult. You have to make create-request objects that don't have an id in them or you have to make the id nullable. Responses might include different fields like an updatedAt. How do you convert between those types without requiring lots of boilerplate conversion code that you're likely to mess up. But it doesn't really say what it's solving. The saying about being liberal in what you accept and strict in what you send is nice, but doesn't tell me anything. How does it achieve that without lots of code and checking? From the struct on the left, it looks like I'll have to constantly check if id is filled out...or have a CompleteResult type where id isn't optional. A link to an example of what this means and how other languages don't solve it would be wonderful.
Likewise, it says "The Network in the Language". Sounds like great marketing speak that doesn't mean anything. Ah yes, "the fallacies of distributed computing". How does it solve the fact that networks aren't reliable in a way that other languages don't?
I guess I always want to know the "how". Claims are easy, but for many of these problems there's a reason why someone else hasn't solved them. Maybe you have figured out a better way, but the site hasn't said what that better way is. The example image for "Structural, Open-by-Default Typing" doesn't look different from a Kotlin data class: it has statically typed fields, some are nullable. Can I assign a string to an int field and it won't crash? What about when I try to read it? What does "Structural, Open-by-Default Typing" mean? From what I see in the image, lots of other languages have it and I don't see how it enables the robustness principle.
Again, there might be great things in here, but the home page doesn't show anything and the quick tour shows error handling that's similar to Rust (or Go's with a short-cut to return the error like has been proposed for Go 2.
Instead of linking to a description of the problem on Wikipedia, it would be great to link to a page with your solution and how it's a pain point in other languages. Like, how do you abstract away the fact that the network is unreliable? The quick tour shows a client requesting from an API, but the only thing I see is a `check` keyword which is similar to the `?` operator in Rust which just returns the error if there is one and unwraps the result if it succeeded. It's a short-cut over Go's `if err != nil` and more explicit than runtime exceptions, but it hasn't shown me how it's different from other languages.
I guess I just need to know how someone solved a problem if they're saying they've solved it. Yea, we all know that networks are unreliable. We all know the pain of dealing with data that's slightly wrong over the wire. Link to how you're making that better and how other languages aren't handling it well.
- sbergot 7y ago> For example, "Structural, Open-by-Default Typing". It sounds really interesting, but the image next to it just looks like what you'd get in Go (except for nullability checks), C#, Kotlin, and many other languages. Go types are structural. C# types are nominal. https://en.wikipedia.org/wiki/Structural_type_system https://en.wikipedia.org/wiki/Structural_type_system "Open-by-Default" probably refers to the fact that structural types are more flexible to use.
- Arnavion 7y ago>Go types are structural. C# types are nominal. Go's type system is also nominal. If it were structural, it would allow you to have two types `type foo struct { id string }` and `type bar struct { id string }`, and let you assign a value of type `foo` to a binding of type `bar`, which it does not.
- jclark_th 7y agoThere’s lots of detail in the language spec: https://ballerina.io/spec/lang/2019R3/ https://ballerina.io/spec/lang/2019R3/ I also wrote a blog explaining what we are trying to achieve: https://blog.jclark.com/2019/09/ballerina-programming-language-part-1.html https://blog.jclark.com/2019/09/ballerina-programming-langua...
- grumpy8 7y agoWould be great to have that insight on the landing page. Most people (including me) will first make a judgement call looking at the landing page for a few seconds before deciding if they want to learn more and go through the specs & examples.