The Forum for Discussion about The Third Manifesto and Related Matters

Please or Register to create posts and topics.

Ballerina, perhaps a more serious language with relational constructs

Page 1 of 2Next

Ballerina is aimed at business integration, funded by a consulting agency in the field, and mostly created by none other than James Clark of XML and XSLT fame.

Not a D, but yet again interesting to note the choice to build in relational constructs in the language.

 

Quote from tobega on November 4, 2021, 10:22 am

 

Not a D, but yet again interesting to note the choice to build in relational constructs in the language.

 

Who amongst us hasn't experienced SQL and thought, even I could do better than that?

So Ballerina is a more fully-built programming environment, heavily Java-influenced. Has inbuilt tools for JSON and XML; for 'records' and JDBC access.

Has native syntax for iterations over collections, including over 'Tables', but more general-purpose.

To answer the routine q's: appears not to have Nulls. Collections allow duplicates; not clear if 'Tables' allow duplicates, but does support declaring constraints, including 'on the fly' constraints on query results. Supports DBMS management in-application, like creating persistent tables/declaring keys. I can't see any grouping/aggregation capabilities.

-- Ballerina:

from var login in logins
join var user in users
on login.userId equals user.id
select user.name + ":" + login.time;

-- Morel:
from e in hr.emps,
    d in hr.depts
where e.deptno = d.deptno
yield {e.id, e.deptno, ename = e.name, dname = d.name};

I wouldn't call either language "built-in relational constructs". In both cases it's SQL in drag. That Ballerina example seems to be building a result as a stream of strings, not fields/records; there's a command following to println( ).

Meh.

... could do better than SQL. But too scared to actually depart from its industry dominance.

Then you might as well bite the bullet/accept the inevitable, and just provide a cossetted wrapd layer between Java and SQL.

Quote from AntC on November 5, 2021, 10:34 am

In both cases it's SQL in drag.

That is the curse of anyone who has 'gotten' TTM.  Neither you nor me nor anyone else of the 'in-crowd' here are ever going to see anything better than "SQL in drag".  TTM is 50 yrs ahead (and that's not because TTM has improved so much, rather it's the rest of the world that has regressed so much).  We're not going to live to see the rest of the world catch in on that gap anymore.

Author of SIRA_PRISE
Quote from Erwin on November 5, 2021, 4:14 pm
Quote from AntC on November 5, 2021, 10:34 am

In both cases it's SQL in drag.

That is the curse of anyone who has 'gotten' TTM.  Neither you nor me nor anyone else of the 'in-crowd' here are ever going to see anything better than "SQL in drag".  TTM is 50 yrs ahead (and that's not because TTM has improved so much, rather it's the rest of the world that has regressed so much).  We're not going to live to see the rest of the world catch in on that gap anymore.

It's somewhat sad how much of the IT world seems intent on not only failing to close the gap, but widening it at every opportunity.

And if you think it's pretty awful at the database end, it's absolutely dire at the UI end.

I'm the forum administrator and lead developer of Rel. Email me at dave@armchair.mb.ca with the Subject 'TTM Forum'. Download Rel from https://reldb.org
Quote from AntC on November 5, 2021, 10:34 am

Meh.

... could do better than SQL. But too scared to actually depart from its industry dominance.

Then you might as well bite the bullet/accept the inevitable, and just provide a cossetted wrapd layer between Java and SQL.

At risk of tooting my own horn, having been using Wrapd a bit in an eat-your-own-dogfood way I must say it's absolutely marvellous. Really. I expect I'll run smack into some serious limitations before long, but so far it makes the usual raw-JDBC or JPA or Hibernate approaches seem ludicrously awkward, overcomplicated, and primitive.

I'm the forum administrator and lead developer of Rel. Email me at dave@armchair.mb.ca with the Subject 'TTM Forum'. Download Rel from https://reldb.org
Quote from AntC on November 5, 2021, 10:34 am
Quote from tobega on November 4, 2021, 10:22 am

 

Not a D, but yet again interesting to note the choice to build in relational constructs in the language.

 

Who amongst us hasn't experienced SQL and thought, even I could do better than that?

So Ballerina is a more fully-built programming environment, heavily Java-influenced. Has inbuilt tools for JSON and XML; for 'records' and JDBC access.

Has native syntax for iterations over collections, including over 'Tables', but more general-purpose.

They're both just disappointing compared to what could be. It's hard to see that they are any better than Linq.

... could do better than SQL. But too scared to actually depart from its industry dominance.

Then you might as well bite the bullet/accept the inevitable, and just provide a cossetted wrapd layer between Java and SQL.

The problem is exactly the same as for other established platform software. I've been using Excel again, and I hate it. It does everything I need, badly, but nothing is going to replace it. Excel (like Word and other Office products), languages (like SQL, C++, JS, Java) are now so ubiquitous, familiar and capable that it's far easier to keep using them than look elsewhere. And new entrants start from so far behind that mostly they never catch up.

[Actually the whole web programming thing is such a mess it makes SQL look good by comparison.]

My nature is to be optimistic, but now all I see is more of the same, but worse.

Andl - A New Database Language - andl.org
Quote from dandl on November 6, 2021, 2:17 am

And new entrants start from so far behind that mostly they never catch up.

New entrants who let themselves be inspired by the TTM message (after having 'gotten' it, of course ...), start from so far ahead that the intended audience is never going to catch up in its lifetime.

Author of SIRA_PRISE
Quote from Dave Voorhis on November 5, 2021, 5:57 pm
Quote from AntC on November 5, 2021, 10:34 am

Meh.

... could do better than SQL. But too scared to actually depart from its industry dominance.

Then you might as well bite the bullet/accept the inevitable, and just provide a cossetted wrapd layer between Java and SQL.

At risk of tooting my own horn, having been using Wrapd a bit in an eat-your-own-dogfood way I must say it's absolutely marvellous. Really. I expect I'll run smack into some serious limitations before long, but so far it makes the usual raw-JDBC or JPA or Hibernate approaches seem ludicrously awkward, overcomplicated, and primitive.

I had the exact same sentiment about SIRA_PRISE somewhere about 12-10 yrs ago.  And no one's ever made me "run into the limitations".  The worst thing I experienced was having to debug the most horrible nesting of GROUP expressions I had ever seen (nestings of GROUP ***SEVEN*** levels down IIRC).  When implementing I thought "no one's ever going to write anything like that because they just can't understand their own problem".  So I decided I could safely omit the very strict heading checks imposed by TTM on (implementation of) GROUP.  Boy was I wrong.  The debugging took a whole week, implementing the solution that I had deliberately omitted out of sheer laziness took less than an hour.  They did understand their own problem, bravely wrote the solution in a VI-level editor and made a mistake of conflating the relational headings somewhere between level 4 and 5 of the GROUP nesting.  But even that did not make me feel like it was an "intrinsic limitation" I was ***unable*** to cope with.  DTATRM had already told me.  I had just been too pragmatic.

Author of SIRA_PRISE
Quote from Erwin on November 7, 2021, 8:38 pm

And no one's ever made me "run into the limitations".

I'll amend that.  Running into the limitations by using it myself is what helped me get from 1.0 to 1.1 to ... to 1.5.

Author of SIRA_PRISE
Quote from Erwin on November 7, 2021, 6:51 pm
Quote from dandl on November 6, 2021, 2:17 am

And new entrants start from so far behind that mostly they never catch up.

New entrants who let themselves be inspired by the TTM message (after having 'gotten' it, of course ...), start from so far ahead that the intended audience is never going to catch up in its lifetime.

Not really. SQL/Word/Excel/Java etc are like a city full of skyscrapers, Manhattan say. People live and work in every floor, every room, every cubicle. You come along and point out (quite correctly) that the foundations are wrong and the whole city would work better if they were put right. So you set out to create new foundations and add a couple of floors of one building, but you are so far behind because you can never build a new city. So everyone stays in the old one, because it's there, and it works, kind of.

The only change you get is once in a generation when a new city gets built, like for smart phones. But even then the battle is on to claim territory fast so they pick the tools to hand and replicate the same old mistakes. Or there is continuing battle over which tools to use and you get the Web. Either way, you never catch up. The money wins every time.

Andl - A New Database Language - andl.org
Page 1 of 2Next