RANT: Loosely typed

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

RANT: Loosely typed

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Then stop using PHP and go back to C or switch to Java.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

I find a large knife and extract revenge on the innocent.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
Ruthik
Forum Newbie
Posts: 2
Joined: Wed Nov 15, 2006 1:59 pm

Post by Ruthik »

shiznatix is evil!
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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 :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: RANT: Loosely typed

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: RANT: Loosely typed

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You may want to look at Python, if you want more of a web slant.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: RANT: Loosely typed

Post 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?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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 :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Oooops...my bad... :oops: :P wrong thread
Post Reply