Overview
In Cranberry, the “Standard Namespace” (Std) provides many language features useful for writing applications.
Some of these features include
Math- Important Math functionsFS- file system handlingIO- terminal input / outputHttp- HTTP requests and server hostingEnv- Getting environment/application argumentsJSON- Parsing JSONRandom- Random numbersTask- Timing/waiting and parallelism- etc.
All these sub-namespaces belong to the standard namespace. You can access them like so:
using Std::IOusing Std::MathOr you can import multiple of them at the same time:
using Std::{IO, FS, Random}You must import them through Std and then use them without Std.
using Std::IO
let input = IO.read_line("enter your name: ")print($"Your name is {input}")