I’ve just finished reading Crockford’s book and decided to drop a few lines before I put it back on company bookshelf.
In my opinion this is MUST READ for anyone who ever touches any JS code. Especially that JS T.G.P. is actually a very quick read, just a few days of reading if you want to be honest to yourself and grasp all the concepts. Very, very precise book which tells you exactly the things you want to know. In essence – no fluff, just stuff. Another good thing about this book is that it doesn’t say anything about dreaded browsers or DOM manipulation. You devote just a tiny bit of your time and you get rewarded with comforting feeling that you now know all the essentials.
If they want property to be private they prefix their names with “_” character and then they pretend it’s private. The same with private methods. Technically you can access it from anywhere , but why? What’s your excuse? You can’t say you didn’t know underscore means private. When I look at SmartClient code written using this convention it looks more natural, more intuitive and easier to read than even small examples which use functional scoping for information hiding. For me that is more important than feeling that my code can’t be tampered with by my team mates or other scripts.
PS. Read English version of the book. Polish translation is simply too much to handle.