Click here to Skip to main content
15,910,878 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
Tim Deveaux27-Mar-19 7:41
Tim Deveaux27-Mar-19 7:41 
GeneralWhat I want..... Pin
rjmoses27-Mar-19 3:30
professionalrjmoses27-Mar-19 3:30 
GeneralRe: What I want..... PinPopular
  Forogar  27-Mar-19 3:38
professional  Forogar  27-Mar-19 3:38 
GeneralRe: What I want..... Pin
rjmoses27-Mar-19 4:06
professionalrjmoses27-Mar-19 4:06 
GeneralRe: What I want..... Pin
dan!sh 27-Mar-19 4:10
professional dan!sh 27-Mar-19 4:10 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 4:12
mveOriginalGriff27-Mar-19 4:12 
NewsRe: What I want..... Pin
RickZeeland27-Mar-19 7:52
mveRickZeeland27-Mar-19 7:52 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 3:44
mveOriginalGriff27-Mar-19 3:44 
I don't.
Some languages - like C# - are strongly typed for a reason: to catch errors early. Firstly, by catching type conversions at compile time means that the code does exactly what you wanted, or it doesn't compile. Secondly, by making you explicitly convert things like user input to the type you want and providing exceptions (or "failed" responses as appropriate) if the user input doesn't match up.

The global implicit typing you seem to prefer leads to errors because the compiler has to "guess" what you wanted - and that means that bad data gets into the system undetected. And until you've had to unpick a 100,000 row DB to try and fix dates that are entered as dd-MM-yy and MM-dd-YY you probably don't realise just how much of a PITA that is.

And then there is the "pointer problem": a pointer to a ASCII char is a pointer to a byte, but a Unicode character is a pointer to a word. You can - by casting - explicitly convert a byte pointer to a word pointer but that doesn't change the underlying data, and it means that half the data accesses aren't going to work properly, because the byte pointer can be "half way up" a word value.

And strong typing (in C#, if not in C or C++) also eliminates your "=" vs "==" in most cases because the result is not a bool so it can't be used in an conditional. You can set the C or C++ compiler to give warnings or errors when you type it wrong , but it is valid because being old languages they don't have a native boolean value: any nonzero value is "true".

You want to get away from the complexity and want consistent declarations? Try C# ... (but hurry, it's getting complicated as well now).
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: What I want..... Pin
Rick York27-Mar-19 5:00
mveRick York27-Mar-19 5:00 
GeneralRe: What I want..... PinPopular
OriginalGriff27-Mar-19 5:33
mveOriginalGriff27-Mar-19 5:33 
GeneralRe: What I want..... Pin
CodeWraith27-Mar-19 11:18
CodeWraith27-Mar-19 11:18 
GeneralRe: What I want..... Pin
sasadler28-Mar-19 5:46
sasadler28-Mar-19 5:46 
GeneralRe: What I want..... Pin
Marc Clifton27-Mar-19 7:30
mvaMarc Clifton27-Mar-19 7:30 
GeneralRe: What I want..... Pin
CodeWraith27-Mar-19 11:08
CodeWraith27-Mar-19 11:08 
GeneralRe: What I want..... Pin
MSBassSinger28-Mar-19 4:30
professionalMSBassSinger28-Mar-19 4:30 
GeneralRe: What I want..... Pin
Dr.Walt Fair, PE27-Mar-19 6:35
professionalDr.Walt Fair, PE27-Mar-19 6:35 
GeneralRe: What I want..... Pin
rjmoses27-Mar-19 23:19
professionalrjmoses27-Mar-19 23:19 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 23:36
mveOriginalGriff27-Mar-19 23:36 
GeneralRe: What I want..... Pin
Slacker00727-Mar-19 3:55
professionalSlacker00727-Mar-19 3:55 
GeneralRe: What I want..... Pin
  Forogar  27-Mar-19 4:02
professional  Forogar  27-Mar-19 4:02 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 4:11
mveOriginalGriff27-Mar-19 4:11 
GeneralRe: What I want..... Pin
  Forogar  27-Mar-19 4:12
professional  Forogar  27-Mar-19 4:12 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 4:13
mveOriginalGriff27-Mar-19 4:13 
GeneralRe: What I want..... Pin
  Forogar  27-Mar-19 4:20
professional  Forogar  27-Mar-19 4:20 
GeneralRe: What I want..... Pin
OriginalGriff27-Mar-19 4:26
mveOriginalGriff27-Mar-19 4:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.