Measures Concepts
GitHub icon

Frost

Frost - Programming language

< >

Frost is a programming language created in 2017 by Ethan Nicholas.

Source code:
git clone https://github.com/ethannicholas/Frost
#1086on PLDB 7Years Old

Frost is a powerful, general purpose, multi-paradigm programming language


Example from the web:
======================================================== Simple version of the Unix `head` utility. Reads a file and outputs the first `count` lines from it to the standard output stream. @param path the file to read @param count the number of lines to display ======================================================== method head(path:File, count:Int) { try { path.lines()[..count].apply(Console.printLine) } fail(error) { abort(error.message) } } method abort(msg:String) { Console.printLine(msg) System.exit(1) } method main(args:ListView<String>) { if args.count != 3 { abort("usage: head <path> <count>") } def count := args[2].asInt if count == null { abort("error: '\{args[2]}' is not an integer") } head(File(args[1]), count) }

Language features

Feature Supported Token Example
Print() Debugging ✓ Console.printLine

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout