FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » switch with case 0
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: switch with case 0 [message #182599 is a reply to message #182598] Sat, 17 August 2013 16:45 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 17/08/13 16:56, Peter H. Coffin wrote:
> Strong-typing introduces its own complications: Are we going to cast
> implicitly between numeric types?

No.
> it makes me 100% behind "We're a loosely-typed language and it works
> how it works. If you want to know HOW it's going to work in a
> particular case, don't guess, test or look at the source. Which we
> make available."
That is the problem in a nutshell. With a strongly typed language I
don't HAVE to look at the source code. Ther are no implicit rules.There
are only explicit rules and if I say:

float c;

I don't mean char c, char * c; cha** c, char c[]. int c, double c or int
*float(c) ; or anything else.
and I HOPE the compiler will tell me I am being sloppy when I return a
zero from a function that should return a pointer.

and furthermore if I say case 0: , it doesn't mean case '0' or case "0"
or case 0.0 but it can surely mean (because its defined that way) case
FALSE, and may mean case NULL. but with a few errors thrown up abut
implicit casts.





--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AND and OR
Next Topic: Compiling PHP 5.x on Cygwin
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 04:21:16 GMT 2024

Total time taken to generate the page: 0.05553 seconds