I just released the preview-3 version of ABS, a terse, pragmatic
scripting alternative to Bash. This release is geared towards
cleaning up bugs before 1.0, so I thought I’d spend some time
going through the changes.

Backward-incompatible changes

We got 1 of them!

I first thought of implementing array destructuring with the
very same syntax JavaScript uses:

1

[x,y]=[1,2]

but this created a few issues with ABS’ parser. For example,
when executing code such as:

12

x= 10
[y]=[1]

the parser would see x = 10[y], and throw a truckload of
errors. A simple fix was to add a semicolon on the line
right before a destructuring statement:

12

x= 10;
[y]=[1]

Now, considering I had to fix this as well as the fact that
I’m always aiming to keep the language as terse as possible,
I took some inspiration from Ruby and refactored destructuring
to resemble Ruby’s multiple assignments.

destructuring statements do not need a ; on the preceding line anymore (#83)

In other news…

Travis-ci recently launched Windows builds,
so I took the opportunity to configure ABS’ builds on Linux, OSX and Windows (#88).

What next?

Ever hoped a bash script could look like:

1234567891011121314151617181920

# Ask the user what is the best city in the world!echo("What is the best city in the world?")selection= stdin()echo("You picked %s", selection)tz=$(cat /etc/timezone)continent, city= tz.split("/")if selection== city {echo("You might be biased...")}else{echo("You know, I heard %s is a nice place as well...", city)}# $ abs script.abs# What is the best city in the world?# "New York"# You picked New York# You know, I heard Rome is a nice place as well...