Talk:Data Types: Difference between revisions
imported>StDoodle No edit summary |
imported>Bale No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 20: | Line 20: | ||
I actually wrote a simple script to see how it works. Apparently all the primitive data types are called by value when passed to a function, whereas maps and records are called by reference (with smart garbage collection!). I presume this is the same for substitution(<code>=</code>), and that buffers are called by reference, though I haven't tried either. Could someone high up there please verify this information before I add it? --[[User:PhilmASTErpLus|PhilmASTErpLus]] 07:14, 23 June 2010 (UTC) | I actually wrote a simple script to see how it works. Apparently all the primitive data types are called by value when passed to a function, whereas maps and records are called by reference (with smart garbage collection!). I presume this is the same for substitution(<code>=</code>), and that buffers are called by reference, though I haven't tried either. Could someone high up there please verify this information before I add it? --[[User:PhilmASTErpLus|PhilmASTErpLus]] 07:14, 23 June 2010 (UTC) | ||
= Re: rollback = | |||
I'm not using the very latest daily, I know, but on r9045 it DOESN'T change the result if you JUST change the 2 to 2.0. I get 0.0 as my result. Can you double-check that this has changed? --[[User:StDoodle|StDoodle (#1059825)]] 03:34, 18 February 2011 (UTC) | |||
Er, edit to clarify; could someone verify that this is INTENDED, and thus safe advice, vs. just being a side-effect of some other change, and subject to revert to the behavior I'm seeing. --[[User:StDoodle|StDoodle (#1059825)]] 03:36, 18 February 2011 (UTC) | |||
You're right. My bad. Of course the division happens before the multiplication so I'm sure it was never supposed to work that way I suggested. Thanks for correcting me. :( --[[User:Bale|Bale]] 05:52, 18 February 2011 (UTC) | |||
Y'know, if you were to move the 2 to the front, and change it to a 2.0... Do we want to bother trying to explain this? --[[User:Heeheehee|Heeheehee]] 08:51, 20 February 2011 (UTC) | |||
Not really, simple is better. The advanced student already has enough information to figure it out for themselves. --[[User:Bale|Bale]] 09:01, 20 February 2011 (UTC) |
Latest revision as of 09:01, 20 February 2011
Note
This page copied from the deletion-in-progress Datatype Constants discussion page.
Old Discussion
Yes, this page should be renamed & such. It's another artifact of the way things were when I started working on the wiki, that unfortunately became a "hub" of sorts without being properly changed. However, since HUNDREDS of pages link here, we really need to be a bit more careful before moving this page. It should probably be done by a mod (to avoid automatic redirect creation) AFTER various prerequisites are taken care of. --StDoodle (#1059825) 04:29, 21 June 2010 (UTC)
- Thanks for clarification, and sorry about not discussing it first. --PhilmASTErpLus
Ugh. It's worse than I thought; when templates are nested, it takes a while for the "what links here" pages to get updated. I've started the process of transitioning from "Datatype Constantes" to "Data Types," but it may be a while before it's complete. Warning: please leave this project alone, I've got a handle on it & don't want confilcts. Thanks. --StDoodle (#1059825) 04:52, 14 July 2010 (UTC)
Yeah, uh, finger slipped. Oops. (Undone now, don't worry about it.) --Heeheehee 12:09, 22 June 2010 (UTC)
It's all yours. Good luck with it. --Bale 05:17, 14 July 2010 (UTC)
Gee that was fun (not). But I think it's done; KoLmafia wiki, now 50% less untechnically accurate! --StDoodle (#1059825) 05:38, 14 July 2010 (UTC)
Call by value or call by reference?
I actually wrote a simple script to see how it works. Apparently all the primitive data types are called by value when passed to a function, whereas maps and records are called by reference (with smart garbage collection!). I presume this is the same for substitution(=
), and that buffers are called by reference, though I haven't tried either. Could someone high up there please verify this information before I add it? --PhilmASTErpLus 07:14, 23 June 2010 (UTC)
Re: rollback
I'm not using the very latest daily, I know, but on r9045 it DOESN'T change the result if you JUST change the 2 to 2.0. I get 0.0 as my result. Can you double-check that this has changed? --StDoodle (#1059825) 03:34, 18 February 2011 (UTC)
Er, edit to clarify; could someone verify that this is INTENDED, and thus safe advice, vs. just being a side-effect of some other change, and subject to revert to the behavior I'm seeing. --StDoodle (#1059825) 03:36, 18 February 2011 (UTC)
You're right. My bad. Of course the division happens before the multiplication so I'm sure it was never supposed to work that way I suggested. Thanks for correcting me. :( --Bale 05:52, 18 February 2011 (UTC)
Y'know, if you were to move the 2 to the front, and change it to a 2.0... Do we want to bother trying to explain this? --Heeheehee 08:51, 20 February 2011 (UTC)
Not really, simple is better. The advanced student already has enough information to figure it out for themselves. --Bale 09:01, 20 February 2011 (UTC)