- 出版社: Lua.Org; 3rd ed. (2013年1月3日)
- 平装: 366页
- 语种： 英语
- ISBN: 859037985X
- 条形码: 9788590379850
- 商品尺寸: 18.9 x 1.9 x 24.6 cm
- 商品重量: 658 g
- 品牌: Lua.Org
- ASIN: 859037985X
- 用户评分: 3 条商品评论
- 亚马逊热销商品排名: 图书商品里排第355,236名 (查看图书商品销售排行榜)
Programming in Lua (英语) 平装 – 2013年1月3日
买 ￥199.00 减 ￥20.00: 满足条件自动优惠
Lua is the language of choice for anyone who needs a scripting language that is simple, efficient, extensible, portable, and free. Currently, Lua is being used in areas ranging from embedded systems to Web development and is widely spread in the game industry, where knowledge of Lua is an indisputable asset. Lua also has established itself as a major language in software development for mobile devices. Programming in Lua is the official book about the language, giving a solid base for any programmer who wants to use Lua. Authored by Roberto Ierusalimschy, the chief architect of the language, it covers all aspects of Lua 5---from the basics to its API with C---explaining how to make good use of its features and giving numerous code examples. Programming in Lua is targeted at people with some programming background, but does not assume any prior knowledge about Lua or other scripting languages. This Third Edition updates the text to Lua 5.2 and brings substantial new material. In particular, it brings more than one hundred exercises distributed through all chapters, ranging from simple questions about the language to full small-size projects.
显示 1-3 条评论，共 3 条评论
Everyone approaching Lua should start with this essential tool as it is, by far, the most efficient and authoritative way to truly understand Lua and its C-API, which is the key to Lua's ability to integrate with system languages. Written as though K&R were in the room, it has just the right amount of instructive insight and tutorials to bring context, without making it hard to actually find what you need to know. You will wear this book out.
In the Third Edition, lessons were added to the end of each chapter. Many of the lessons are actually open-ended questions, such as "Why is the elseif statement more important in Lua, than it might be in other languages?" These lend to a great deal of understanding that I found very helpful.
Other lessons and examples highlight how somethings are accomplished in Lua, which might be a specialized feature found in another, more complicated language. Here, I found myself learning about the language, gaining an appreciation of its design, as well as insights into being productive with the it.
It's not a huge book, but every section was very dense with knowledge and even after 2 years of playing around with Lua, I found it enjoyable and well worth my time to go through this new edition.
Some Editorializing on Lua:
Lua is best thought of as an implementation and a language. As a language, it is very small, yet it contains some very compact and powerful semantic constructs that you might not expect. That is, Lua is smaller than Visual Basic, yet it has coroutines, first class functions, closures and some wonderfully done meta-programming features.
Perhaps the feature that deserves the most attention is Lua's implementation, which is focused on its first design goal: an accessible, embeddable scripting language. Lua includes a very clean API written for C, which provides very efficient, controlled and seamless access to and from Lua. It is unique and it is also why, in spite of it being a language less known in web development circles, Mediawiki chose it for their templating system.
Finally, Lua is maintained by a small team, in PUC-Rio, a University in Rio de Janeiro in Brazil, that knows how to say "no." They keep the garden tended and pull the weeds, and otherwise keep Lua small and beautiful.
As a result, programming in Lua and working with its implementation is pleasant. Maybe that's the most informative thing that might be said: When I use Lua, I'm having fun.
So... buy the book? :)
Also, don't expect this book to be limited to an introduction to the language. That introduction is pretty solidly handled in the first 60 pages or so. For your money, you also get information on integrating your Lua code with your C code, techniques for coroutines and multi-threading, and advanced uses of the Lua table object (including object-oriented programming).
But wait -- there's more! There's a run-through of Lua's standard libraries which is not your standard printout of the online documents -- it's full of useful, progressive examples. I found the string library documentation particularly useful. Just by reading the table of contents you'll see that this is a very well-thought-out book, and I can vouch for its execution being excellent as well.