[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ClojureScript/Lua
- From: Eike Decker <zet23t@...>
- Date: Thu, 9 Aug 2012 10:26:36 +0200
Quoting from the site
"The first thing i had to overcome in porting the Javascript backend
to Lua, is that in Lua, not everything is an object. "
I have to object. Maybe I should do a blog post on how functions CAN
have attributes IF you are crazy enough to want it. I don't think it
should be done though.
---
-- setting the metatable of one function affects all functions...
debug.setmetatable(function()end,{__index = function (f,k) return "foo" end})
print(print.bar) -- prints "foo"
---
With some more fantasy and time, one can do just anything with
function as it is in JavaScript. It's simply not obvious.
Cheers,
Eike
2012/8/8 Henk Boom <henk@henk.ca>:
> I found this via r/Lua. ClojureScript/Lua is a version of the
> ClojureScript compiler that targets Lua.
>
> http://raphamiard.posterous.com/clojurescriptlua-lives
>
> I used Clojure for a little while a few years ago, it's a very
> interesting Lisp/Scheme-like language.
>
> Someone posted about it here when the project started a few months
> ago, but it looks like there's been a release. Unfortunately the
> compiler is still JVM-hosted, though, and the performance is described
> in that post as "Not very good". Still, I can't wait to see where this
> goes!
>
> henk
>