View mode: basic / threaded / horizontal-split · Log in · Help
August 19, 2012
Re: D language as script through JVM
On Sunday, 19 August 2012 at 09:28:49 UTC, Paulo Pinto wrote:
> Oh, and forgot to mention that structs wouldn't be allocated in 
> stack anyway, even with a JVM's implementation for safe D, thus 
> breaking language's semantics.

The reference page on structs http://dlang.org/struct.html does 
not appear to contain the word 'stack' at all. It seems to me 
placing structs on the stack would only be important when 
interfacing with C, but I don't think it would matter otherwise; 
as long as the destructor is called when the struct goes out of 
scope, why should the memory location make any difference?

Language semantics should stick to defining what should happen, 
not how it should happen.
August 19, 2012
Re: D language as script through JVM
Se hace imprescindible la traducción de los manuales de 
referencia a español y a otros muchos idiomas....he buscado 
información en español y no he encontrado nada mas allá de 
algún articulo donde se promueven las bondades de este lenguaje 
de programación...

Con manuales y documentación en general disponibles en varios 
idiomas les aseguro que la popularidad de D como lenguaje de 
programación se extendería ampliamente.
August 19, 2012
Re: D language as script through JVM
On Sunday, 19 August 2012 at 17:58:03 UTC, Thiez wrote:
> On Sunday, 19 August 2012 at 09:28:49 UTC, Paulo Pinto wrote:
>> Oh, and forgot to mention that structs wouldn't be allocated 
>> in stack anyway, even with a JVM's implementation for safe D, 
>> thus breaking language's semantics.
>
> The reference page on structs http://dlang.org/struct.html does 
> not appear to contain the word 'stack' at all. It seems to me 
> placing structs on the stack would only be important when 
> interfacing with C, but I don't think it would matter 
> otherwise; as long as the destructor is called when the struct 
> goes out of scope, why should the memory location make any 
> difference?
>
> Language semantics should stick to defining what should happen, 
> not how it should happen.

It is described in the TDPL book.

It is important because it influences the amount of memory a 
program may use, and hence invalidate the usability of an 
algorithm that depend on how the memory is used. Memory location 
has as side effects cache location, and access time.

--
Paulo
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home