The second to last example looks like it is incomplete:
include time // equivalent to #include <time.h> in C
TimeT: cover from time_t
Tm: cover from struct tm {
tm_sec, tm_min, tm_hour, tm_mday, tm_mon, tm_year, tm_wday, tm_Tm*
main: func {
timestamp := time() // timestamp is now a TimeT
t := localtime(timestamp&) // t is now a Tm*
printf("It's %dh%d.", t@ tm_hour, t@ tm_min)
}
I would have expected a closing } in the definition of the TimeT cover.Generally speaking, ooc looks really promising. Compiled to plain C, hence fast and super compatible, and with syntactical treats borrowed from Python and Ruby. I wanted this for a looong time. :-)