Search:

Type: Posts; User: Twey; Keyword(s):

Search: Search took 0.04 seconds.

  1. Replies
    23
    Views
    75,468

    Frustratingly little. :(

    Frustratingly little. :(
  2. Replies
    23
    Views
    75,468

    Well, you'll never have a need for it. It's a...

    Well, you'll never have a need for it. It's a convenience. Rather than:
    function foo(arg) {
    if (typeof arg === "string") {
    bar();
    } else if (typeof arg === "number") {
    baz();
    }...
  3. Replies
    23
    Views
    75,468

    You are indeed seeing that incorrectly, I...

    You are indeed seeing that incorrectly, I believe. The function is called. However, there are some situations in which the pattern you describe is useful; I use it in my 'DOM' toolkit, something...
  4. Replies
    23
    Views
    75,468

    Dal: I explained it in an earlier post (the...

    Dal: I explained it in an earlier post (the interesting bit, anyway: it also prints out various animal noises, but... no-one cares about that). Trinithis also linked to a book (an excellent book, by...
  5. Replies
    23
    Views
    75,468

    You're right, typeof new Function() ===...

    You're right, typeof new Function() === "function". *trim*

    I didn't know you still lurked around here, Trinithis :)
  6. Replies
    23
    Views
    75,468

    No, it's a crude implementation of dispatching to...

    No, it's a crude implementation of dispatching to functions based on argument types — one way of doing classical OO in a purely-functional language. It can be thought of in terms of Haskell's...
  7. Replies
    23
    Views
    75,468

    The print() statements I used are meant for...

    The print() statements I used are meant for running in a console, change them to alert() or something if you intend to run it in a browser.

    What it does isn't remarkable, that's just...
  8. Replies
    23
    Views
    75,468

    Only if you specialise to it. :)

    Only if you specialise to it. :)
  9. Replies
    23
    Views
    75,468

    Code I wrote whilst angry

    I just used this code to vent some frustration earlier, hope you all like it. It's pretty self-explanatory. It's probably too theoretical to go into the DD scripts archives, so I'll just leave it...
Results 1 to 9 of 9