lua-users home
lua-l archive

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


It really shouldn't be much different than writing Lua in C, no?  I
mean, you could have a .NET type/class for a "Lua Value", which used the
native String/int/float/array/etc. types where appropriate.  It could
allow dynamic changing - assign an array type to the type (value.assign
(array)) and the class stores the array and marks itself as an array
type.  Assing a string to the same variable/member/etc. (value.assign
("a string"))) and it would store the string, and mark itself as a
string type.

The method could be overloaded to react differently based on the type. 
For example the + operator could look at the types involved - if
strings, do concatenation; if numbers, just add; if tables, call a
method in the table, and so on.

It won't be able to optimize as well (for example, know to just call
string concatenation at compile time, versus having to check types on
run-time) but it would still work, I would think.

Or am I missing some important fact here?  (as usual) ^,^

On Mon, 2003-01-06 at 12:19, MichaelL@frogware.com wrote:
> As far as I know, there's been little success implementing scripting
> languages in .NET. The problem is that most scripting languages are
> dynamically typed, and the .NET Runtime is statically typed. The
> Python.NET guys experimented with a variety of approaches--such as
> emiting code on the fly--but none worked very well. (I don't know the
> current status of Python.NET.)
> 
> Of course, it's still possible to implement an interpreter on top of
> .NET, and write glue between the two layers. That, however, isn't
> quite the same as producing Lua.NET--which has JIT-compiled code,
> debugging support, etc.
> 
> 
> 
> 
> "John Passaniti"
> <jpass@rochester.rr.com>
> Sent by:
> owner-lua-l@tecgraf.puc-rio.br
> 
> 01/05/2003 10:55 PM
> Please respond to lua-l
>         
>         To:      
> Multiple recipients of
> list
> <lua-l@tecgraf.puc-rio.br>
>         cc:        
>         Subject:      
> RE: C# and Lua
> 
> 
> While I can't comment on using the C# interop mechanisms to work with
> a
> C-language Lua, I was very interested to read this:
> 
> > PS: I'm aware of the fact, that there'll be a
> > Lua.NET down the road (I've seen the project
> > page), but I need Lua now ... not in (many?)
> > months.
> 
> It's probably old news for others here, but I never saw any sort of
> announcement that a Lua.NET was in the works.  So I looked in Google
> and
> found this:
> 
> http://www.tecgraf.puc-rio.br/~rcerq/luadotnet/
> 
> Which also leads to this:
> 
> http://research.microsoft.com/collaboration/university/europe/rotor/default.
> asp
> 
> 
> I look forward to a Lua.NET.  I especially look forward to a Lua
> implemented
> in C#.  Interesting that Microsoft Research is sponsoring this.
> 
> 
> 
-- 
Sean Middleditch <elanthis@awesomeplay.com>
AwesomePlay Productions, Inc.