Strong/Weak typing 
Author Message
 Strong/Weak typing

While this newsgroup seems to cover many research languages, I would like
to mention one that is used by an awful lot of people:  dBASE

You don't need to declare types of variables/functions/parameters, and arrays
can be polymorphic with each element being a different type.

For example, you can write a function as follows:
  function addtwo
    parameters a,b
    return a+b

If you call it as  addtwo(1,2)  you get the result 3.  If you call it with
addtwo("abc","def")  you get the result "abcdef".

As for arrays, you can do something like this:
  dimension arr[5]
  arr[1] = 1
  arr[2] = 1.23
  arr[3] = "abc"
  arr[4] = .f.    (boolean values)
  arr[5] = ctod("09/07/61")   (date values)

While many implementations of the language are interpreters, some are
compilers. (for DOS, Mac, Unix, Vax, etc.)

So, you see, polymorphism isn't such an ivory tower topic.

Tue, 30 Jun 1992 05:26:26 GMT  
 [ 1 post ] 

 Relevant Pages 

1. R5RS on static/dynamic and strong/weak typing

2. Flying With Python (Strong versus Weak Typing) [actually, Static vs Dynamic typing]

3. Strong vs. weak-typing in OO design/languagges

4. von Rossum on Strong vs. Weak Typing

5. Strong types; weak minds

6. Strong vs. Weak Typing

7. Flying With Python (Strong versus Weak Typing)

8. all strong disks outside the weak hallway were climbing beneath the hollow square

9. Weak/Strong Signals for a Latch

10. Senior College Lab-Strong/Weak Points of LISP

11. more on weak typing..

12. Strong static typing does not work


Powered by phpBB® Forum Software