- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
If it matters that you communicate what type the variable is, then give us a clue by suggesting its type in its name. If it's important that all your variables in your routine need to be immediately transparently clear as to their type, your encapsulation isn't working.
Admin
One day you will achive mental purity.
Admin
Like I said, since it costs nothing to do, it's no bad thing to have helpful hints, especially when looking at someone else's code.
Admin
Strongly-typed. You keep using that word, but I don't think it means what you think it means
Admin
Made me laugh out loud when I read that as "power TROWEL". Now reading it as troll just isn't as funny.
Admin
That's not what "strong typing" means. Your example is about the absolute minimum to count as a "typed" language. Strength, with respect to typing, refers to the expressiveness of the typing language. You see, a "strongly-typed" language is actually two languages: a term language for dealing with values, and a "type language" for expressing types, together with a nice type inference algorithm to let the two languages play together nicely.
The Howard-Curry isomorphism theorem is worth mentioning here. A typed lambda calculus has two components: the typing language, and a value/term language. The theorem says that for each typed lambda calculus there is an isomorphism between it and some constructive logic, where the type language expressions correspond to theorems in the constructive logic, and value expressions correspond to proofs of these theorems in the logic. So if you can express a property in a type system, you are absolutely guaranteed that any implementation that type checks is correct. Stronger type systems allow you to express more property than "weaker" type systems.
Some type languages (like Haskell with the UndecidableInstances extension) are Turing complete, so type inference can diverge (not halt). Some (like Haskell without extensions) are decidable, and type inference is guaranteed to terminate at compile time.
Admin
Admin
Admin
When I read this, I just about started to cry...
I have the same thing to deal with, except it is all PHP.
Admin
Admin
This is retarted. If you just had one js file the browser downloads it once (i.e use etag?) and that it. With this setup you are downloading junk on each page
Admin
Errr i mean I think IIS use etags for static files.