Draft:BoxLang

BoxLang is a modern, dynamic, and loosely typed scripting language for multiple runtimes, Java Virtual Machine (JVM) provides Object-Oriented (OO) and Functional Programming (FP) constructs, as well as dynamic Metadata Programming (MP). It is a professional open-source project based on the Apache 2 license. There are two subscription options for a professional license for the language and its runtime (web, IOS, android, web assembly, etc.), each offering different support levels, customizable SLAs (Service Level Agreements), custom patches, security notifications, enhanced features, and modules.

Overview
BoxLang was created by Ortus Solutions Corp. It is maintained by the company and a growing number of contributors.

It integrates key features from programming languages, including Java, ColdFusion, Python, Ruby, Go, and PHP, to equip developers with a modern, fluent, and expressive syntax.

Key features

 * Dynamic Language

BoxLang is dynamically typed, which means there´s no need to declare types. It can perform type inference, auto-casting, and promotions between different types. The language adjusts to its deployed runtime and can add, remove, or modify methods and properties at runtime, making it highly flexible and adaptable.


 * Multi-Runtime Development

BoxLang can be used to write adaptive code for any operating system, JVM, servlet container web server, cloud lambda functions, iOS, Android, or even the browser using our web assembly package. BoxLang is built on a versatile language core, making it deployable on almost any current or future platform.


 * Established Ecosystem

BoxLang has a well-established ecosystem. Every Java and ColdFusion/CFML library is compatible with BoxLang. It comes with CommandBox, which serves as its package manager, server manager, task manager, and REPL tool.


 * Java Interoperability

BoxLang offers 100% interoperability with Java. It can extend and implement Java objects, use annotations, declare classes, imports, and more. Thanks to InvokeDynamic and the BoxLang Dynamic Object core, everything in BoxLang is fully interoperable with Java.


 * Low Verbosity Syntax

It is highly functional, fluent, and human-readable. It is highly expressive and has low ceremony.


 * Event Driven Language

BoxLang comes with an internal event bus that can be used to enhance the language's capabilities or those of any application. It´s able to listen to almost every aspect of the language, parser, and even the runtime, or collaborate using the user own events.


 * Enterprise Caching

The system has internal caching capabilities, which can be customized with providers, object stores, listeners, and statistics.


 * IDE + Tools

It comes with various tools to assist developers in their work. It includes a Visual Studio Code extension for the language, providing features such as syntax highlighting, code debugging, code insight, code documentation, formatting, LSP integration, and more. Subscribers to the premium version receive additional tools, including enhanced debuggers, ColdFusion/CFML transformers.


 * Scheduling & Task Framework

It provides a centralized and portable way to define and manage scheduled tasks for user servers and applications.


 * Functional Programming

It enables users to explore functional concepts such as immutability and higher-order functions to write robust code. BoxLang promotes code that is easier to maintain and less error-prone, thanks to its support for functional programming principles.


 * Modular Extensibilty

It's possible to add new built-in functions, template components, or modify existing functions on classes. This language also supports a Runtime Debugger, AOP aspects, and event listening within the language itself.


 * Multi Parsers: CFML & BoxLang

BoxLang supports a dual parser and transpiler for executing ColdFusion/CFML code natively. It is possible to run all ColdFusion applications within BoxLang natively. Additionally, it provides tooling that automatically transpiles ColdFusion code to BoxLang for Subscription users.


 * Professional Open Source

Professional open source project based on the Apache 2 license. Core features and Community Support.


 * Serverless Development

Allows developers to write code in functions that trigger based on events and leave server management to the cloud provider.


 * Meta-Programming

Allows developers to modify the behavior of BoxLang classes and objects at runtime. It involves manipulating the way classes and objects respond to method calls, property access.

Script Syntax
To write in script in a tag-based file, the developer must use an opening and closing  tag.

No types or visibility scopes are present. BoxLang can also infer variable types on more distinct variables like dates, booleans, or numbers. However, types can be used for this:

By default, the return type of every function and/or argument is any. Thus, it can be determined at runtime as a dynamic variable.

Semi-Colons
Semi-colons are used to demarcate line endings in BoxLang. They can be optional, however. Also, the CommandBox REPL does not require semi-colons.

Tags In Script
BoxLang allows tags to be written in script syntax. The developer basically eliminates the starting  and ending   enclosures and create a block by using the   and   mustaches.

Note: BoxLang uses Lucee's generic tag-in-script syntax

Playground
Boxlang offers an interactive playground at Try Boxlang, where users can experiment with the language directly in their web browser.