The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
JavaScript Is Sweet

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Peter Williams

Posts: 165
Nickname: pezra
Registered: Apr, 2005

Just is a random programmer.
JavaScript Is Sweet Posted: Apr 17, 2006 11:19 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Peter Williams.
Original Post: JavaScript Is Sweet
Feed Title: Peter Williams' Weblog
Feed URL: http://barelyenough.org/blog/tag/ruby/feed/
Feed Description: Random thoughs about software development, and anything else I find interesting.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Peter Williams
Latest Posts From Peter Williams' Weblog

Advertisement
While reading Oliver Steele’s article on JavaScript Memoization this bit jumped out at me. function Angle(radians) {this.setRadians(radians)} Angle.prototype.setRadians = function(radians) { this.radians = radians; this.getDegrees.reset(); }; Angle.prototype.getDegrees = function() { return this.radians * 180 / Math.PI; } memoizeConstantMethod(Angle.prototype, 'getDegrees'); The reason that jumped out is that getDegrees is a function that returns a number, but in the above code you see [...]

Read: JavaScript Is Sweet

Topic: Disappointed in Firefox 1.5 Previous Topic   Next Topic Topic: RDT userbase exploding?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use