Re: I don't like the intro page of the documentation.

new topic     » goto parent     » topic index » view thread      » older message » newer message
_tom said...

"built-in data-types"

  • that clarifies the following reference to "user-types"

I think most programmers would understand that, but you could say "user defined types" or "you name the data type and what is allowed in it".

_tom said...

"array of objects"

  • "array" is an implementation of a mathematical matrix (as in Fortran)
  • "objects" can unfortunately be confused with OOP

I agree with what you say about "array", to me a sequence is 2D, and cannot be 3D, 4D etc.. But it can be nested, it can be reinterpreted.
Can't help with the "object", except to say it's untyped and the real root of Eu's datums.

_tom said...

"An object can dynamically hold either an atom or a sequence."

  • makes sense to an existing Euphoria user, but how do I explain this to someone new to Euphoria?

It's an untyped variable which can hold any other type. A wonderful feature is it can be tested whenever you want to see what type is in it. It's untypedness slows Eu down somewhat, which is why there are atoms and sequences.

_tom said...

datum and data are pedantic, but also descriptive

single datum vs compound data

  • I am searching for a nice distinction between atom and sequence
  • any ideas?

RDS explained it nicely, but i'll paraphrase since we have a weasel mascot now: an atom is one of anything that fits in a computer's bite, a sequence is lunch.

_tom said...

two, three, or four data-types?

Ancients (the really old ones) had a math system based on one, two, and many.

Therefore two (the largest number available) is reason describe Euphoria as having two data-types: atom and sequence. An object is not a distinctive data-type, only an "either or" of the two fundamental types. This makes the description of Euphoria smaller and simpler.

An "integer" is just an appendix; if integers did not exist then Euphoria programs would still run. Integers for efficiency make sense to experts but are just noise to a novice. This suggests:

"Use the integer data-type (a special case of the atom) when speed and low memory use are important."


A "list" data-type appears in many languages. A shopping list is natural so that any programming language better be able to make one. Lisp is lists (wonderfully elegant) but not everyone is willing to put up its eccentricity. Lists have been added to many languages but that just increases the number of compound data-types available for that language. Euphoria uses the sequence (aka list) as a fundamental design choice; as best as I can tell sequences make Euphoria unique.

A "primitive" data-type appears in many languages. Typically that means integer, float, boolean, and character, but sometimes ending up with a dozen variations. Euphoria uses the atom and just the atom; as best as I can tell that also makes Euphoria unique.

So an atom-sequence design is unique and special to Euphoria. (Adding object, integer, and user-types results in a practical language.)

Therefore I conclude that: "Euphoria has a unique data-type design."

The atom-sequence is the basis of clean unified design. Operators always work the same ( + always adds, not sometimes concatenates). Sequences always behave the same (same indexing, slicing, ..., for all sequences). In a conventional language things are not so tidy. So again I conclude that: "Euphoria has a unique data-type design."

So, can I stick with "unique" and "one-of-a-kind?"

If you want to present that much arguement to justify it, even to newbies. If someone is learning a new spoken human language, i'd give them other simpler data before i gave them an 800 page dictionary and an 800 page cultural reference.

useless

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

Search



Quick Links

User menu

Not signed in.

Misc Menu