tag:blogger.com,1999:blog-5135517.post6766339893903504641..comments2023-11-05T03:54:44.710-08:00Comments on Making it stick.: Simplified Javascript: Cruft ReducedPatrick Loganhttp://www.blogger.com/profile/02088461489050417591noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-5135517.post-39190936418879142022008-11-27T10:30:00.000-08:002008-11-27T10:30:00.000-08:00Okay, I don't think you guys read about Simplified...Okay, I don't think you guys read about Simplified JavaScript at all... It is not like Lua! It is, in fact, just a subset of JavaScript!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-46415361107088821992008-06-23T14:03:00.000-07:002008-06-23T14:03:00.000-07:00"The thing that is missing however in Lua is first..."The thing that is missing however in Lua is first class functions."<BR/><BR/>Um, no. Lua not only has first class functions but is in fact a lot more supportive of a functional style of programming than Javascript is (e.g. it does tail call optimisation).David R. MacIverhttps://www.blogger.com/profile/17522579015536144620noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-7920017914166083302008-06-22T02:28:00.000-07:002008-06-22T02:28:00.000-07:00See also: http://www.reddit.com/r/programming/info...See also: <BR/>http://www.reddit.com/r/programming/info/6ocbw/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-72280135441896520732008-06-21T19:34:00.000-07:002008-06-21T19:34:00.000-07:00Great post -- Many comments mention Lua and I thin...Great post -- Many comments mention Lua and I think this is true to a point. The thing that is missing however in Lua is first class functions. There really is no comparison here! JavaScript is truly remarkable.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-32001948734949702902008-06-21T15:31:00.000-07:002008-06-21T15:31:00.000-07:00-start quote-"If you want to pursue a capability-b...-start quote-<BR/>"If you want to pursue a capability-based language, the first thing that would have to go would be the ability to "add a new member to any object by ordinary assignment". If you don't have encapsulation, you can't have any sort of security."<BR/><BR/>That's not so. If I can create an object that has any kind of mutation, I might as well be able to create an object that can add or remove slots.<BR/>-end quote-<BR/><BR/>You can have both ways ;-)<BR/>How? An assignment to a (new) member of a object done by code external to the object would just invoke an setter with the name of the member and the new value as parameters (same with getters).<BR/>An assignment to a member from code inside the object would just just add or change the value of that member.<BR/><BR/>Cheers<BR/>-Zarutian<BR/><BR/>(And to prevent confusion with POSIX capabilities the community around erights.org, cap-talk, etc use the name object-capabilities over unforgible references that combine designation and authorization.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-37460824755134851452008-06-21T14:46:00.000-07:002008-06-21T14:46:00.000-07:00"If you want to pursue a capability-based language..."If you want to pursue a capability-based language, the first thing that would have to go would be the ability to "add a new member to any object by ordinary assignment". If you don't have encapsulation, you can't have any sort of security."<BR/><BR/>That's not so. If I can create an object that has any kind of mutation, I might as well be able to create an object that can add or remove slots.<BR/><BR/>For this to be "capability-based" I should be able easily to control whether or not I hand *you* the capability to add or remove slots. Capability-based languages can do *anything*. <BR/><BR/>My code can do anything to your objects as long as my code has the capabilities to do so. You are in control of distributing to me the capabilities you have been granted.Patrick Loganhttps://www.blogger.com/profile/02088461489050417591noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-2863567907840745792008-06-21T11:05:00.000-07:002008-06-21T11:05:00.000-07:00I think if a simplified JavaScript is used it woul...I think if a simplified JavaScript is used it would make sense to be using a strictly proper subset of ECMAScript standard (which allows for certain extensions.) Otherwise it is just adding another language to the already huge pile of languages out there.<BR/><BR/>If extensions not compatible with ECMAScript are added then a threshold has been crossed and it would probably be better to just go all the way for the good stuff and use Scheme.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-28885812842484306432008-06-21T09:48:00.000-07:002008-06-21T09:48:00.000-07:00If you want to pursue a capability-based language,...If you want to pursue a capability-based language, the first thing that would have to go would be the ability to "add a new member to any object by ordinary assignment". If you don't have encapsulation, you can't have any sort of security.Allen Shorthttps://www.blogger.com/profile/02476178041186364808noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-74145513066233537502008-06-21T06:58:00.000-07:002008-06-21T06:58:00.000-07:00I believe simplified javascript has a name already...I believe simplified javascript has a name already: Lua. Lua is very syntactically close to javascript, with only the bare essentials in its library.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-56014817652537022442008-06-21T05:06:00.000-07:002008-06-21T05:06:00.000-07:00So, a lot like Lua then :)www.lua.orgSo, a lot like Lua then :)<BR/>www.lua.orgAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-24753223271489574972008-06-21T03:28:00.000-07:002008-06-21T03:28:00.000-07:00I've often felt that when you'd get if you simplif...I've often felt that when you'd get if you simplify Javascript is basically Lua.The language feels very much like "Javascript except done right". (plus a few additional features, but they seem largely well thought out)David R. MacIverhttps://www.blogger.com/profile/17522579015536144620noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-34742156573416931312008-06-21T02:49:00.000-07:002008-06-21T02:49:00.000-07:00What cruft exactly do you mean?Because Ruby as a l...What cruft exactly do you mean?<BR/><BR/>Because Ruby as a language is multi-paradigm and complex, but you can omit () which you never can in lisp.<BR/><BR/>The two have a completely different philosophy and I rather prefer writing domain-specific languages in pure Ruby rather than learn Lisp where I will end up doing<BR/>'(defun foo-bar-bla((something-else)()'<BR/><BR/>Other than that, one huge disadvantage of Javascript is that it is only a www language. Inside the browser.<BR/><BR/>With ruby (or python respectively) one does not have that limitation. Instead of javascript becoming more ubiquitous i'd rather use ruby. And I dont mind if only 5% of my target audience will have ruby available - I dont want to write javascript (i do it anyway, but i dont WANT to ...)Anonymousnoreply@blogger.com