Syntax

Should Xojo support Javascript/Typescript?

Interesting conversation going at the Xojo forums about whether the product would benefit from a more popular syntax. Polling data shows us that developers do not care for the stigma of basic-like syntax. VB.NET is especially afflicted by this mentality despite sharing the the entire .NET framework and all of its capabilities with C#.

In my experience the Xojo community are avid supporters of static type checking. Non-IDE assisted properties/methods via 'Operator_Lookup()' or dynamism tends to be frowned upon. I occasionally receive emails asking for help with SQLdeLite or comparing it to ActiveRecord. Xojo developers get spoiled by the IDE’s auto-completion that they lack a certain confidence when it is not there.

Thus I think Javascript would not be an optimal fit for Xojo.

However that is not to say that we cannot add some borrowed language features to make Xojo more appealing to basic-naysayers. I would like to see semicolons and brackets added as purely optional syntactic sugar.

Imagine:

    For count As Integer = 0 To myArray.Ubound
        myListbox.AddRow(myArray(count))
    Next

Could Be:

    For (count As Integer = 0 To myArray.Ubound)
    {
        myListbox.AddRow(myArray(count));
    }

We could make also Dim seem a little less 1980’s as well.

Imagine:

    Dim count As Integer = 0

Could Be:

    Integer count = 0;

A little massaging of the syntax while being purely optional would make Xojo more palatable for the large Javascript/C family of developers. I am not or have been a Xojo compiler engineer but I can only deduce that these changes would be easier than building a Javascript front-end.

If you like random Xojo ideas, suggestions, and tips like these then please subscribe to our newsletter.