Please meet: Lua
15/5/08 12:00![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Originally published at Fiberglass flowers. You can comment here or there.
Lua recently became very popular. I encountered Lua scripting in several applications including popular games, I believe it’s used in even more then Wikipedia says.
It’s extremely simple:
- 6 data types (that’s counting “nul” and “function”),
- no C++-style OOP out-of-box (but you can program one, he-he),
- 400K of pure-C code
but is loaded with in-fashion features like
- first-class functions,
- closures,
- coroutines…
- again, Wikipedia is the best.
The only metaprogramming tutorial (with a ready code to implement virtual methods) is “Programming in Lua” book. Still, I don’t see a code to implement ad-hoc polymorphism… Maybe it’s a reason for another post
Redistributed book removed: it violated copyright.
Tags:
(no subject)
16/5/08 12:51 (UTC)http://www.unknownworlds.com/decoda
Вот эта вроде ничего.
Отладка возможна, использовать удобно.
(no subject)
19/5/08 10:15 (UTC)А ведь байт-код есть.
(no subject)
18/5/08 17:51 (UTC)> a = {}
> a.x = 1
> print(a.x)
1
> print(a.y)
nil
В питоне надо явно написать a.get('y', None), чтобы не свалилось на несуществующем элементе.
(no subject)
19/5/08 10:13 (UTC)