Page 1 of 1

RANT: Loosely typed

Posted: Wed Nov 15, 2006 2:54 pm
by alex.barylski
I personally dislike loosely typed languages like PHP...always have...I truely miss a compiler informing me when I try and use a variable already defined as an array as an integer...

Not exactly a mistake I make...as I consider myself a very disciplined developer...but when working on others code...does it ever lead to overly complicated, convoluted source code... :?

How do you deal with these issues, either in your own source or someone else's?

Posted: Wed Nov 15, 2006 3:08 pm
by feyd
Then stop using PHP and go back to C or switch to Java.

Posted: Wed Nov 15, 2006 3:25 pm
by shiznatix
I find a large knife and extract revenge on the innocent.

Posted: Wed Nov 15, 2006 3:34 pm
by Chris Corbyn
I just type cast anything that could be potentially disasterous if it's the wrong type. If type casting could be equally disastorous I sanity check. If it's feasible I make it a class and type check against that.

Posted: Wed Nov 15, 2006 3:34 pm
by Ruthik
shiznatix is evil!

Posted: Wed Nov 15, 2006 4:42 pm
by alex.barylski
feyd wrote:Then stop using PHP and go back to C or switch to Java.
That simply isn't feasible considering developing web apps in C is a nightmare (I've tried it - it's how I got started) and Java...well...

It's interesting...I can certainly appreciate the community and it's efforts...but from a business standpoint (my own anyways) Java doesn't make sense either.
d11 wrote:I just type cast anything that could be potentially disasterous if it's the wrong type.
PHP4? Also...it's not so much a problem in my own code...as I'm pretty strict about everything I do but when working on someone else's...using the same variable for an array and object and/or integers or floats...OMG it's just messy and slightly annoying - having to decrypt someones code. :P

Hows that adage go? "It was difficult to write so it should be equally difficult to understand"

Cheers :)

Re: RANT: Loosely typed

Posted: Wed Nov 15, 2006 4:55 pm
by RobertGonzalez
Hockey wrote:How do you deal with these issues, either in your own source or someone else's?
I charge through the @$$ for a rewrite, or charge less for a new app.

Re: RANT: Loosely typed

Posted: Wed Nov 15, 2006 5:06 pm
by alex.barylski
Everah wrote:
Hockey wrote:How do you deal with these issues, either in your own source or someone else's?
I charge through the @$$ for a rewrite, or charge less for a new app.
But what if you develop PHP applications and rely purely on volume to make income? Supporting a single application to operate efficiently on mulitple platforms and more importantly under various versions of PHP is a demand which justifies having them in the first place...

Keeping two or more versions synchronized is a PITA... :P

Posted: Wed Nov 15, 2006 5:20 pm
by feyd
You may want to look at Python, if you want more of a web slant.

Re: RANT: Loosely typed

Posted: Wed Nov 15, 2006 5:27 pm
by RobertGonzalez
Hockey wrote:But what if you develop PHP applications and rely purely on volume to make income?
You could find a different means by which to acquire income with your work...
Hockey wrote:Supporting a single application to operate efficiently on multiple platforms and more importantly under various versions of PHP is a demand which justifies having them in the first place...

Keeping two or more versions synchronized is a PITA... :P
It might be a PITA, but if you rely on it for income, then complaining about it is not going to earn you any more money than actually kicking that PITA in the teeth and taking cre of business, no?

Posted: Wed Nov 15, 2006 5:46 pm
by alex.barylski
Arrrrghh... :P

A simple...

"I don't care to support concurrent versions of the same application due to different versions of PHP remaining popular at the same time..."

or

"I find it advantageous and benefitial to my business to support at least 3 different versions. It seperates me from my competitors and here is how I do it..."

Would have sufficed... :lol: My bad for not being clear :)

Posted: Wed Nov 15, 2006 5:48 pm
by feyd
You're already got an active thread on "concurrent versions." There's no need to discuss it here unless you want to close down that thread.

Posted: Wed Nov 15, 2006 6:02 pm
by alex.barylski
Oooops...my bad... :oops: :P wrong thread