POV-Ray : Newsgroups : povray.advanced-users : A thought and a question : Re: A thought and a question Server Time
27 Jun 2024 14:34:35 EDT (-0400)
  Re: A thought and a question  
From: Christian Froeschlin
Date: 11 Dec 2010 16:40:49
Message: <4d03efe1$1@news.povray.org>
[GDS|Entropy] wrote:

> only something of a facsimile reproduction of the .NET fluff.

I think the main two problems for implementing some
of these data structures in SDL are

1. No memory allocation from heap for things like list elements
2. No good way of grouping two values of different type (struct)
    such as key-value pairs in a dictionary.

That said, you probably *could* implement your own memory
allocation in one big array, reference every item of data as
an integer (basically a "pointer") and use this for allocation.
This also gives you untyped "structs" as arrays of integers.

In case the main memory array runs out of free blocks, replace
it with an array of twice the original size, copying the original
contents in the first half.

It's completely insane but you might have a lot of fun with it ;)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.