Strong Typing?
Nov. 17th, 2005 08:34 amGeek question:
What is the feature of a language that you consider "strong typing"? How does strong typing manifest itself (or not) in your favourite language or two?
Geek question:
What is the feature of a language that you consider "strong typing"? How does strong typing manifest itself (or not) in your favourite language or two?
(no subject)
Date: 2005-11-17 07:49 pm (UTC)(no subject)
Date: 2005-11-17 07:59 pm (UTC)(no subject)
Date: 2005-11-17 08:12 pm (UTC)(no subject)
Date: 2005-11-17 08:19 pm (UTC)Either I'm misremembering the multiple layers of casting as in your example (it was 25 years ago, after all) or maybe I was doing peek-poke things to get around it...or Commodore BASIC was different.
All are equally likely.
I know that TUTOR (the language I worked in professionally in the 80s) and original K&R C both do it my way. C especially I remember transitioning from K&R to ANSI C and running up against the typing restrictions.
(no subject)
Date: 2005-12-03 08:47 pm (UTC)If your character is represented as a char/byte, then yes, incrementing it shifts the letter up. But if it's a string then it depends on how "+" is interpreted: either it will concatenate a "1", or, horrors, it will increment your pointer and...
Some BASICs let you work with character codes. Commodore BASIC had tons of poke/peek/call things that were basically invoking magic machine code, so you would probably have been passing char/byte values around.