digitalmars.D - D2 module(system) or module(safe)?
- Leandro Lucarella <llucax gmail.com> Nov 26 2008
- Jesse Phillips <jessekphillips gmail.com> Nov 26 2008
- Leandro Lucarella <llucax gmail.com> Nov 27 2008
- Walter Bright <newshound1 digitalmars.com> Nov 28 2008
- Leandro Lucarella <llucax gmail.com> Nov 28 2008
- Walter Bright <newshound1 digitalmars.com> Nov 27 2008
- Leandro Lucarella <llucax gmail.com> Nov 27 2008
- Walter Bright <newshound1 digitalmars.com> Nov 28 2008
- Leandro Lucarella <llucax gmail.com> Nov 28 2008
D 2.021 changelog says: Added -safe switch and module(system) Identifier; syntax. But documentation[1] says: Safe Modules Safe modules are modules marked as safe by the (safe) appearing in the ModuleDeclaration. Safe modules are assumed to correctly implement a safe memory model, and are not checked by the compiler for such even if directed to. Trying an example using module (safe) I get: test.d(2): (safe) expected, not safe =/ module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. Is the -safe flag supposed to work? How? [1] http://www.digitalmars.com/d/2.0/module.html -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Cómo ser inconmensurablemente atractivo a la mujer del sexo opuesto. -- Libro de autoayuda de Hector Mesina.
Nov 26 2008
On Thu, 27 Nov 2008 00:40:59 -0200, Leandro Lucarella wrote:D 2.021 changelog says: Added -safe switch and module(system) Identifier; syntax. But documentation[1] says: Safe Modules Safe modules are modules marked as safe by the (safe) appearing in the ModuleDeclaration. Safe modules are assumed to correctly implement a safe memory model, and are not checked by the compiler for such even if directed to. Trying an example using module (safe) I get: test.d(2): (safe) expected, not safe =/ module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. Is the -safe flag supposed to work? How? [1] http://www.digitalmars.com/d/2.0/module.html
I assume you are right, for information on -safe see SafeD http://www.digitalmars.com/d/2.0/safed.html
Nov 26 2008
Jesse Phillips, el 27 de noviembre a las 03:10 me escribiste:Is the -safe flag supposed to work? How?
I assume you are right, for information on -safe see SafeD http://www.digitalmars.com/d/2.0/safed.html
Yes, I read that document, but what I mean is that I've created a simple test: int* x = cast(int*) 9283; And it compiles without warnings or errors, with or without module (system). That doesn't looks safe in terms of memory to me ;-) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- ACCIDENTE FATAL EN FLORES, MUEREN DOS PERSONAS Y UN BOLIVIANO -- Crónica TV
Nov 27 2008
Leandro Lucarella wrote:And it compiles without warnings or errors, with or without module (system). That doesn't looks safe in terms of memory to me ;-)
Almost none of the checks are implemented, I just put the scaffolding in.
Nov 28 2008
Walter Bright, el 28 de noviembre a las 01:24 me escribiste:Leandro Lucarella wrote:And it compiles without warnings or errors, with or without module (system). That doesn't looks safe in terms of memory to me ;-)
Almost none of the checks are implemented, I just put the scaffolding in.
Ok, good to know. Thank you. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Los sueños de los niños son especialmente importantes en su etapa de formación; si un niño no sueña es que será un pelotudo toda la vida. -- Ricardo Vaporeso
Nov 28 2008
Leandro Lucarella wrote:module (system) works, so I guess the documentation is just outdated, as well as the compiler error message.
The doc is outdated. I'll fix it.
Nov 27 2008
Walter Bright, el 27 de noviembre a las 00:19 me escribiste:Leandro Lucarella wrote:module (system) works, so I guess the documentation is just outdated, as well as the compiler error message.
The doc is outdated. I'll fix it.
Should I fill a bug for the compiler error message? -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- FINALMENTE EL CABALLITO FABIAN VA A PASAR UNA BUENA NAVIDAD -- Crónica TV
Nov 27 2008
Leandro Lucarella wrote:Walter Bright, el 27 de noviembre a las 00:19 me escribiste:Leandro Lucarella wrote:module (system) works, so I guess the documentation is just outdated, as well as the compiler error message.
Should I fill a bug for the compiler error message?
I've already fixed it in the source code, so no need.
Nov 28 2008
Walter Bright, el 28 de noviembre a las 01:23 me escribiste:Leandro Lucarella wrote:Walter Bright, el 27 de noviembre a las 00:19 me escribiste:Leandro Lucarella wrote:module (system) works, so I guess the documentation is just outdated, as well as the compiler error message.
I've already fixed it in the source code, so no need.
Thanks. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- CAROZO CON FARINGITIS -- Crónica TV
Nov 28 2008









Leandro Lucarella <llucax gmail.com> 