lua-users home
lua-l archive

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


> Forget the unflexibility of "legacy programming languages" like 
>maybe C or BASIC (>>yuck<<).
> You need not to "redimensioning" anything. Just add new elements
 
You are right, and that's one of the reasons why I like LUA. But I 
want to use LUA as a hassle-free "driver" for my vast collection of 
numerical libraries written in C/C++. So I think I'll use TOLUA to 
export my C++ matrix classes. But I'm afraid there is no way to 
overload round brackets. Q: Do I have to use a "getter" function i.e. 
number = mat:get(1, 1), or can I overload square brackets to give my 
users the chance to write something like: number = mat[1, 1]?
PS:
My app will be used by my students. Most of them are not very good 
programmers (they are used to matlab), and that's the reason why I'm 
looking for an easy way to handle matrices.