Lasso 9 data primitives?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso 9 data primitives?

Steve Upton

Like many others I'm finally getting my feet wet with Lasso 9.

I'm reading the migration notes (http://www.lassosoft.com/Migration-Guide-What-Has-Changed) and I'm a little confused,

I'm accustomed to languages having data primitives (integers, float, etc) who's values are always copied when assigned to another variable and object instances (from classes) who's references are duplicated into new variables.

Are there any data primitives in Lasso 9? If strings are referenced objects then… that alone is going to take some consideration. Please tell me integers and decimals aren't.

Regards,

Steve Upton

PS what the heck was that reference sharing thing in Lasso 8? I'm sure it explains some odd behavior I saw in the past!
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 9 data primitives?

Kyle Jessup-2

On Jun 5, 2012, at 3:07 PM, Steve Upton wrote:

>
> Like many others I'm finally getting my feet wet with Lasso 9.
>
> I'm reading the migration notes (http://www.lassosoft.com/Migration-Guide-What-Has-Changed) and I'm a little confused,
>
> I'm accustomed to languages having data primitives (integers, float, etc) who's values are always copied when assigned to another variable and object instances (from classes) who's references are duplicated into new variables.
>
> Are there any data primitives in Lasso 9? If strings are referenced objects then… that alone is going to take some consideration. Please tell me integers and decimals aren't.

From what you've said, Lasso 9 works like you expect. Integers and decimals are by-value objects. This is why we had to change some of their methods, particularly the integer->bitXXX methods, which previously modified the integer in-place.

Integers and decimals are immutable (you don't change an integer or decimal, you replace it). Everything else is modifiable in some way and so are by-reference values.

> Regards,
>
> Steve Upton
>
> PS what the heck was that reference sharing thing in Lasso 8? I'm sure it explains some odd behavior I saw in the past!

Yeah, that was the worst. It was a hack to overcome the simple minded "copy all the things!" origin of the language. And, it's why I should clarify that when I mean by-reference I mean it in the classical sense and not the Lasso 8 @ sense.
-Kyle
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>