Cleanest syntax? Probably Lua; it's like Python but without FIOC and __this__ """shit""". Having array indices start at 1 is completely retarded, though. Here's some arbitrary sample code:
local SET = function() end -- unique key
local MUTATE = function() end -- unique key
-- decorator function for adding methods.
function mutable_helpers(func, mutate)
mutate(func, function(old_func, ...)
if select(1, ...) == SET then
local k = select(2, ...)
local v = select(3, ...)
mutate(func, function(old_func, ...)
if select(1, ...) == k then return v
else return old_func(...) end
end)
else
return old_func(...)
end
end)
mutate(func, function(old_func, ...)
if select(1, ...) == MUTATE then
local new_func = select(2, ...)
mutate(func, function(old_func, ...)
return new_func(old_func, ...)
end)
else
return old_func(...)
end
end)
return func
end
>>9
C isn't beauty, but old and simple.
But the standard library sucks when I need to do serious work.
Also, proper modules and meta-programming wouldn't hurt.
Name:
Anonymous2012-01-08 16:01
>>33
java.lang.Exception: Unable to resolve symbol: % in this context (NO_SOURCE_FILE:1)
Name:
Anonymous2012-01-08 16:51
>>34 But the standard library sucks when I need to do serious work.
How so? There's a reason why the standard library is the standard.