318 reputation
310
bio website tomauger.com
location Toronto, Canada
age
visits member for 3 years, 8 months
seen Dec 18 at 18:41

Dec
18
awarded  Critic
Jun
17
awarded  Good Question
Dec
23
awarded  Notable Question
Mar
9
awarded  Popular Question
Feb
14
awarded  Commentator
Feb
14
comment Self-referencing anonymous closures: is JavaScript incomplete?
Awesome write-up and great perspective. I also like the "just because it's a trope doesn't mean it's right.". I think my issue is that I'm more comfortable with stricter languages, which (IMO) helps development efficiency in a number of ways. JavaScript seems really wishy-washy with not a lot of built in checks and balances: you can do whatever you want, hence the landscape out there is a mess of idioms and practices. It's hard to nail down the "right" way to approach your coding structure. Though I agree that for quick 1-off jobbies, this is not a big concern.
Feb
14
awarded  Editor
Feb
14
comment Self-referencing anonymous closures: is JavaScript incomplete?
Yes, but classes provide semantic structure that can then be checked at runtime to help debugging and increase development efficiency. I could write code using zeroes and ones and I would have COMPLETE flexibility, but it would take so much longer to code anything, and even longer to find bugs. My point is that while you have increased flexibility with prototypes, you have less checks and balances.
Feb
14
revised Self-referencing anonymous closures: is JavaScript incomplete?
Fixed embarassing mis-spelling
Dec
22
awarded  Nice Question
Sep
19
comment if ('constant' == $variable) vs. if ($variable == 'constant')
Update: since I started working on WordPress core and using their codex.wordpress.org/WordPress_Coding_Standards I have been getting used to it. One thing that IS nice, is if you're using string literals as your test, for example, it slightly improves readability: if ( 'published' == $post_status ){ ... }
Sep
18
comment if ('constant' == $variable) vs. if ($variable == 'constant')
Actually, the WordPress Coding Standards DOES call for Yoda Conditionals: codex.wordpress.org/WordPress_Coding_Standards#Yoda_Conditions
Sep
18
awarded  Popular Question
Jun
15
awarded  Yearling
Jun
15
comment Self-referencing anonymous closures: is JavaScript incomplete?
For others, here: brianodell.net/?page_id=516 is an awesome primer on JavaScript as a prototypal language.
May
29
comment Self-referencing anonymous closures: is JavaScript incomplete?
@Kevin: clearly I have more to learn! @Rein: can you point me to some good documentation that demonstrates OOP best practices using prototypes in JS? My Google-fu has been weakened in this regard.
May
27
comment Self-referencing anonymous closures: is JavaScript incomplete?
That's a good point. And yet ActionScript managed it, by simply putting out a new version. When defining you script tag, you've always been able to specify JavaScript version, so "breaking" existing sites should be a non-issue.
May
26
comment Self-referencing anonymous closures: is JavaScript incomplete?
Prototypes are great for tacking methods onto built-in classes, which can also be done in AS. But does that address namespacing, access control and inheritance? Maybe I'm taking too narrow a view of what Rein means by prototypes...
May
26
asked Self-referencing anonymous closures: is JavaScript incomplete?
May
6
awarded  Scholar