Nick Husher wrote:
>> Did my comments about prototypal inheritance and anonymous functions
>> bring this up? That's what I was referring to btw. A date object is
>> more of a generic thing that is reflective of my current needs in
>> getting work done.
>
> That, and the fact that I interact with Javascript more than any other
> programming language these days. There are really bad parts to the
> language, but they're manageable and outweighed by some of the truly
> impressive things available to the programmer that I dearly miss when
> working with other languages.
>
>> After having learned about prototypal inheritance, and actually having
>> used it (via javascript), I believe it's completely ridiculous that
>> more programming languages do not implement it. It's also ridiculous
>> that nobody taught it to me in college.
>
> I agree. Being able to generate and modify robust objects in an ad-hoc
> manner allows you to mix and remix code in really interesting ways that
> are worth studying in an academic environment.
>
>> If there's one thing that makes Javascript painful, it would be that
>> the only thing that creates new scope is a function. Of course, I
>> think this could also be interpreted as a feature of Javascript that
>> teaches good organizational practices. The only other painful thing
>> would be differences amongst implementations... Then again, I'd
>> imagine you get the same thing with different Lisps, but Javascript
>> has a lot more ambition.
>
> ECMAScript5 (or Javascript 3.1) will be syntax-compatible with previous
> versions of the language, but eliminates some of the uglier parts of the
> language (the with keyword, etc). Unfortunately, because it's
> syntax-compatible it doesn't offer a way to create new scopes without
> creating a function.
We could always just replace block open and close.
block open with:
(function() {
block close with:
}());
would look like this:
if (something) (function() {
alert('it's ugly-time');
}());
Unfortunately, javascript's function literal isn't as awesome as its
object literal.
>
> Nick
>
>
>>
>>
>>> On Oct 23, 2009, at 6:44 PM, Gary Johnson wrote:
>>>> Howdy h4x0rs,
>>>>
>>>> Here's a great article (a bit old but still very relevant) by a CS
>>>> Professor at Caltech which discusses many features of programming
>>>> languages that make them good (or terrible) for building programs much
>>>> larger than a few hundred lines. Some very good stuff here, and I'd
>>>> recommend it as fundamental reading for any of you who are still
>>>> wondering about the differences between programming languages (yes,
>>>> there are BIG differences).
>>>>
>>>> http://www.cs.caltech.edu/~mvanier/hacking/rants/scalable_computer_programming_languages.html
>>>>
>>>>
>>>> Happy hacking,
>>>> ~Gary
>>>>
>>>> P.S. Can one of you web guys add this link to the CSSA Resources page?
>
>
|