mu is an experimental programming language that features:
- Generic programming enabled by multiple dispatch
- Abstract interpretation-based type analysis for optimizing dispatch performance
function double(x::Number){
return 2 * x
}
function double(x::Array{Int, 1}){
n = length(x)
i = 1
while (i <= n){
set(x, i, 2 * get(x, i))
i = i + 1
}
return x
}
function main(){
println(double(3)) // 6
println(double([1, 2, 3])) // [2, 4, 6] (dispatch without dynamic method lookup!)
}
To run mu, you need Julia version 1.11 or later.
Download Julia from the official download page or install it using juliaup.
(WIP)
(WIP)
(WIP)