Copper is a programming language that I use as a replacement to C. The main differences are:
Minimalism is the most important feature, the language is intended to be simple so that someone with limited brain power such as me could fully understand it. The syntax is simple, almost everything is explicit and most constructs are common.
A simple example beyond the pointless "hello world".
class Point
attr : Int
attr y: Int
def init(: Int, y: Int)
self. =
self.y = y
end
def translate(dx: Int, dy: Int)
self. += dx
self.y += dy
end
end
func main: Int
var pt: Point!
pt.init(3, 5)
pt.translate(1, 0)
println("x = \a, y = \a", pt., pt.y)
return 0
end
import "std"
Copper is released under the BSD license.
Texto de tibleiz.net tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en tibleiz.net · Volver a la noticia de El Autómata