ID:136865
 
Does byond support pointers?

I want to make a

Link List and Tree library
Winbiko wrote:
Does byond support pointers?

I want to make a

Link List and Tree library

It doesn't support pointers, but it does use references. Linked lists would basically work like this:
linklist
var/linklist/next
var/item

Lummox JR
In response to Lummox JR
ok cool. Do you know if byond will ever support pointers or is it too much of a security risk?


There is just something about having the direct memmory location that makes me happy.

darn java ;)

In response to Lummox JR
thanks btw....
In response to Winbiko
Winbiko wrote:
ok cool. Do you know if byond will ever support pointers or is it too much of a security risk?

Very unlikely. Thank goodness.
In response to Winbiko
Winbiko wrote:
ok cool. Do you know if byond will ever support pointers or is it too much of a security risk?

There is just something about having the direct memmory location that makes me happy.

darn java ;)

BYOND uses a reference model similar to Java's but even less transparent to the end user.

Pointers are both a security risk and a bug risk. Fortunately we don't need them. Object references, like in Java, are essentially pointers anyway, so all pointers would be good for would be some kinds of string/list access--their value there is dubious in BYOND.

Lummox JR
In response to Lummox JR
I understand.
In response to Lummox JR
Pointers are both a security risk and a bug risk. Fortunately we don't need them. Object references, like in Java, are essentially pointers anyway, so all pointers would be good for would be some kinds of string/list access--their value there is dubious in BYOND.

Besides that, a string that is the same as a first string (anywhere in the game, lists and otherwise) is just a reference to the first string, but when you change the second string it becomes its own individual copy.

At least, that's how I remember Tom explaining it some day millions of years ago.
In response to Spuzzum
wow thats really smart.