Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Perl (Score 1) 536

In some languages you can create your own types. So you can have a variable A that is type meters and B of type feet. If you try to assign A to B or vice versa without explicitly typecasting (letting the compiler know you intended to do this, which comes in handy in conversion functions), the compiler will produce an error. It's a safety mechanism. You're not forced to use this feature but if you do it can help.

Comment Re:Perl (Score 2, Insightful) 536

You can have all the innovation you want, but innovation isn't enhanced by allowing you to confuse meters with feet or by allowing you to divide by zero. Certain thing should always be forbidden if they can be detected by the compiler and the compiler can be helped by language rules amenable to correctness. This doesn't limit innovation it just minimizes obvious (or not) flaws.

Slashdot Top Deals

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...