1.0.0-Beta11
August 23, 2024
Last updated
Was this helpful?
August 23, 2024
Last updated
Was this helpful?
We have really kicked into gear with this release, tackling a whopping 26 tickets and delivering some of our most aggressive features to date. This update signifies a significant leap forward towards a stable release in the Fall. Thank you for your continued support and stay tuned for more exciting developments!
We have been working with an amazing ANTLR expert: Jim Idle, and we have been able now after several months of hard work to merge in a complete update to our parsers. This has a massive performance increase between 5-10 times more performant than before. However, we are still not those, we have three more performance phases coming up!
We’ve added a small, but useful syntax to our BoxLang parser that comes from multiple other languages. Numeric placeholders allow you to place underscore characters (_
) inside of a numeric literal for readability. Take a number like this
That’s 1 billion. Or was it 1 million? Or maybe it was 100 million… pauses to re-count. With numeric place holders, your code can look like this:
Ahh, so it was 1 billion! There’s no rules on where you can place the underscores, so long as they are INSIDE the number and not leading or trailing. Heck, this is valid (though pointless):
You can also place numeric separators in decimals
and in the exponent of scientific notation
These underscores are simply thrown away at compile time. They are not represented in the bytecode and will not appear anywhere in your running app. They are purely for readability in your source code.
You can now use the static
assignment modifier in your code:
which is sugar for
and validate at runtime there is actually a static scope, or throw an exception.
You can now use the final
modifier in your classes
which is sugar for:
This means that your classes will not be able to be inherited from.
Your UDFs can now also be declared as final
which will set the function as final
into the scope it gets registered into. Any additional function declarations with the same OR ATTEMPTS TO SET A VARIABLE OF THAT NAME will result in an error.
You can now add final
assignment modifers to variables in your code:
this, of course, can be used with other modifiers
The only 2 modifiers that can’t be used together are var
and static
since they represent different scopes.
When a variable is declared as final
, the scope it is being set into will track a list of keys that are designated as final
, and will prevent those keys from being modified in the future.
This is ONLY a feature of scopes. Structs and other struct-like container will not have a final concept.
The following example
cannot be mutated OR re-assigned.
You can see the Set of final keys for a scope via the meta object
You can also remove keys from the set to make a variable no longer final.
BoxLang now speaks Zip language. We have added zip
and gzip
capabilities to the core. This will allow us to leverage compression and extraction for modular activites, jar installations, logging, and much more. We have also created the following BIFS available to you:
compress( format, source, destination, [includeBaseFolder=true], overwrite=false )
- Compress a source to a destination using available compression formats.
extract( format, source, destination, [overwrite=false], [recurse=true], [filter], [entryPaths] )
- Extract a zip/gzip archive to a destination with nice options.
isZipFile( filepath )
: Determines if the passed file can be treated as a zip archive.
We support the following formats:
zip
gzip
More formats will be available for our +/++ subscribers.
Please note also that the filter
arguments can be the following:
A valid regular expression string: ".*\.txt"
A BoxLang closure or lambda (name) => name.endsWith(".txt")
Receives the full path of the entry
A Java Predicate: (entry) -> entry.getName().endsWith(".txt")
Receives the ZipEntry
object
In our next betas we will have a the Zip
component which will allow you to do the following:
Compress Files
Extract Files
List File Entries
Delete File Entries
Read File Entries
Read Binary File Entries
Much More.
We had a BigDecimal
caster, now we have a BigInteger
caster. Not only that, we can correctly coerce Java interop calls for BigDecimal and BigInteger.
This is a major update to our dynamic invocation with Java interop. We know only look at callable methods, where as before we looked at every single method on Java classes. This is a significant boost in performance when doing invocations and well, it also fixes a bug on ambiguity between same named methods with different visibility scopes. Relax and ride the lightning
Allow the incorrect foo..bar syntax that Adobe allows for
Cache sets() and getOrSets() does not accept duration in seconds alongside Duration objects.
Enhance ClassMetadataVisitor
Enhance feature audit to track QoQ separate
Validate var outside of a function
Support Adob'e loose comma parsing in their generic tag-in-script syntax
Enhance errors for identifiers starting with numbers
File And Directory BIFs to auto-expand received paths
Support variable starting with number
Compatible encryption with lucee/acf
replace() and replaceNoCase() should accept "one" not "once" for the scope
tag comments not parsing inside output tag in template parsers
parsing fails with extra whitespace in closing output tag
<cfset and <bx:set fail if not followed by a space
Debugger breakpoints not working regression
BoxLang Error is not readable
Tag island Templating outputs in unexpected order