TOPIC: A question on Data Types
A question on Data Types 3 Years, 10 Months ago
Hi, I have some questions on data types. From tha user's manual, Suneido basic data types are:


But if a data type is the type of a value, then Function and Class should be data types too, because their values can be assigned to variables, right?
And isn't Date a basic data type too?
And what can you say of Record? It is a basic data type? I think not, because, from the user's manual, it is derived from Object. A basic data type should not derive from any parent class... I'm right?
And blocks, dlls, callbacks, structs, aren't they basic data types too?

I think that in the manual the data types should be classified in basic, advanced and derived.
In 'basic data types' I would insert:
Boolean, Number, String, Date and Object.

In 'advanced data types' I would insert:
Function, Class, blocks, Symbol, Buffer, dll, callback, struct.

In 'derived data types' I would insert all data types that are 'built-in' but that are derived from other basic data types, as Record.

What do you think of it?
But in Suneido there is a generic internal class from which all the data types derive?

Sorry to ask you for many questions, but I like Suneido very much and I would like to study its language a little more in depth, to learn more and more from it.
Re:A question on Data Types 3 Years, 10 Months ago
You are correct, those are all data types too. And I agree Date should probably be in the "basic" list.

Internally, in the C++ code, all data types (except for small integers) derive from the SuValue class (suvalue.h) which is normally accessed via the Value wrapper class (value.h) Small integers are stored directly in the pointer of the Value class (for speed and space efficiency)

Do not worry about asking too many questions, it is good to see the interest.
Re:A question on Data Types 3 Years, 10 Months ago
Thank you! :)