lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mar 31, 2013, at 10:21 PM, Tim Hill wrote:

> If you go down this path you are creating a language much more focused on meta-pogramming, and this cane get very complex very quickly. In some ways, much of the complexity of C++ is directly traceable to its attempt to be both a general purpose language and a meta-language.

C++ also has the tacit requirement that almost nothing can have greater than O(sizeof(operands)) runtime cost. Notably, dynamic allocation outside a stack discipline is not allowed unless you can blame the programmer. 

The cost is measured against "conventional" hardware and in the case of things that look too expensive, conforming implementations are allowed to have arbitrary (i.e., attacker-controlled) behavior for incorrect programs.

I believe it is the intent that no Lua program, even incorrect ones, can have truly arbitrary behavior. Or put another way, you can't bring down the runtime; it takes C extensions to do that.

> I think it's a tribute to the Lua designers that they created a language that is both compact and yet still gives 80% of a meta-language (and, imho, the other 20% is the "dangerous" 20%).

I think there's at least 5% more which is not dangerous, but we don't know what it is.

Jay