The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Making wrong code Illegal

Making wrong code Illegal
I just read Joel's "Making Wrong Code Look Wrong" and I'm really not impressed. Joel discusses using Hungarian notation to make code look wrong. Why bother? Anyone can see this so called solution isn't bulletproof and mistakes can very easily slip through the cracks. Why not use the type safety offered by modern languages and create types that behave properly?

That is, in the example "Request("name")" would return an UnsafeString, and UnsafeString is not convertible to a safe String, except by calling Encode. By using the type safety offered in modern languages, preventing assignment like sName = us can be prevented by the compiler, not just by hoping the programmer notices the error.
Thursday, November 17, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz