[docs and wiki] How many data-types do we emphasize?

new topic     » topic index » view thread      » older message » newer message
  1. How many data-types do we want to emphasize?
  2. What is the best graphic to illustrate?

one

object does everything

kind of like those languages that do not declare the data-type of a variable

(Fancy graphics can come later.)

┌ object ┐ 
└────────┘ 

two

I like the concept of two distinct data-types

atom|integer|(number) == one number

sequence|(string) == a list of values

Ultimately, a lot of design choices in programming come down to choosing between two fundamental choices.

┌───── object───────┐ 
| number | sequence | 
└───────────────────┘ 
 
    object 
---------------- 
|              | 
number         sequence 
 
 
        object 
         /\ 
        /  \ 
  number    sequence 

three

Classic object|atom|sequence

just to realize that the object data-type comes in handy

five

object|number|integer|sequence|string

Phix has five.

┌───── object───────┐ 
│ number │ sequence │ 
│   │    │   │      │ 
│ integer│ string   │ 
└───────────────────┘ 
 
    object 
---------------- 
|              | 
number         sequence 
     |                | 
     integer          string 
 
        object 
         /\ 
        /  \ 
  number    sequence 
       |           | 
     integer      string 
 

Go has many

https://www.tutorialspoint.com/go/go_data_types.htm

  • 4 categories
  • 8 kinds of integer
  • 4 kinds of float
  • 5 misc numeric types
  • 9 derived types

be well
_tom

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu