Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: one type less language

32 views
Skip to first unread message

Rosario19

unread,
Oct 13, 2015, 4:36:33 AM10/13/15
to
[i add cpp News Group]
On Mon, 12 Oct 2015 20:50:00 -0400, "J. Clarke" wrote:
>In article <uvn0va1al1bemal2b...@4ax.com>,
>R...@invalid.invalid says...
>>
>> On Tue, 08 Sep 2015 10:20:38 -0500, Robert Wessel
>> <robert...@yahoo.com> wrote:
>>
>> >On Tue, 8 Sep 2015 05:23:08 -0400, "J. Clarke"
>> ><j.clark...@gmail.com> wrote:
>> >
>> >>In article <cthdk0...@mid.uni-berlin.de>, j...@toerring.de says...
>> >>>
>> >>> asetof...@gmail.com wrote:
>> >>> > I imagine something as
>> >>> > a="1234asdfv"
>> >>> > b=1.564
>> >>> > c={1,2,3}{4,5,6}
>> >>> > a is a string
>> >>> > b is a number
>> >>> > c is a 2x3 matrix
>> >>> > So if now I write
>> >>> > b=c
>>
>> b=c is one error because b and c have different type definition
>
>You're aware are you not that in APL that would be a perfectly valid
>expression?

but that is good or it is not good?

the doubit is the C++ way, using types, is better because one find
error better, or in the mind is clear
m is one int it is not one double etc
is clear better what are operators
are called from types arg

so =operator undefinited for differents types,
if the user not define it tru cast...
[so the C++ define =operator from different types for me would be one
error because one not see conversion in the write code statement]

and i like types because it is clear that "m" is type unsigned int
will not be
float in the same function, and in expression operations are form int
not from double or viceversa

u32 function(???)
{
/*
at start of function always definition or definition-assigment
for(int i=0; i<n; ++i) etc; // is one abomination for me
that assign each name to its type that never will be changed in
in the function
*/
Strig.u8 a="1234asdfv";
float64 f, b=1.564;
Matrix[3][2].u32 c1, c={1,2,3}{4,5,6};
u32 m;

//a is a string
//b is a number float of 64 bit
//c is a 3x2 matrix
//So if now I write
b=c
//would be one error

c1=c|m=(u32)b|a+=(Strig.u8)c;
//could not be error

}

>> >>> > Than b is the matrix
>> >>> > the same of c
>> >>> > And the memory store the value 1.564
>> >>> > is free.
>> >>> > This is like maple V and other math
>> >>> > language existing I saw in university.
>> >>> > One miss the original type when
>> >>> > there is one operator=

0 new messages