Skip to content

JavaScript Language Support

Maxime Chevalier-Boisvert edited this page Jan 3, 2014 · 20 revisions

JavaScript Support

JavaScript features supported by Higgs include:

  • Objects and methods
  • Dynamic addition and deletion of object properties
  • Prototype-based inheritance
  • Dynamically resizeable arrays
  • Closures
  • Constructor functions
  • Variadic functions and arguments object
  • If/switch statements
  • For/while/do loops
  • For-in loop
  • Exceptions and try/catch/finally
  • Dynamic code loading with the load() function
  • Evaluation of code strings in the global scope with eval
  • JSON.parse and JSON.stringify
  • Regular expressions
  • UTF-16 strings and string operations
  • Integer and floating-point arithmetic

Language Extensions

Higgs also supports some custom extensions to JavaScript:

  • Low-level arithmetic and pointer manipulation primitives
  • A simple module system based on RequireJS 1.0
  • A Foreign Function Interface (FFI) library
Clone this wiki locally