[M3devel] Proposal for new pragma

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Fri May 11 17:08:03 CEST 2012


Hi all:
any program can have such construct? The main con is if it does what does it mean to be undetected side-effects, sort of writing for your self. Also what does the program needs to do to ensure safety under such considerations. For instance does it allows a program to be checked?
It is not moral correct to write something to hide details of the implementation to it but to your self?
OK, you can ignore some details I guess but then who cares what you don't know, more than we don't know. This is the ideal; isn't to expose the structure of an operation towards getting the correct answer, if you can't make both something is wrong, both your program or your language.
In certain sense we can avoid undetected side-effects, but your responsibility is about it where there are ones. If your program can check or know that I think is wrong respect of that programmer, since he should read it without that help. Right? 
Thanks in advance
 

--- El vie, 11/5/12, Dragiša Durić <dragisha at m3w.org> escribió:

> De: Dragiša Durić <dragisha at m3w.org>
> Asunto: Re: [M3devel] Proposal for new pragma
> Para: "Daniel Alejandro Benavides D." <dabenavidesd at yahoo.es>
> Fecha: viernes, 11 de mayo, 2012 09:31
> Code readability will be nice effect
> of such a pragma. And - if written correctly, all pragmas
> have no to minimal side-effects.
> 
> On May 11, 2012, at 4:26 PM, Daniel Alejandro Benavides D.
> wrote:
> 
> > Hi all:
> > I'm not sure whether you want to handle inter
> procedural side effects, if that's the case Modula-3 done
> code needs arbitrary annotations of such constructs isn't
> guaranteed to be safely isolated since every annotation is
> side-effected then it could led towards the not sound
> Modular checking of ESC/Modula-3, etc. This is a natural
> deduction system.
> > Having said that I think is a good idea to allow
> recursion logic to Modula-3 procedures but this is precisely
> what Baby Modula-3 is about.
> > I don't have more details at hand but I think the idea
> if is yours the same has better compression of code,
> optimization and safe execution.
> > The good news is that object-code view of objects in
> Baby Modula-3 and Modula-3 is the same so all benefits are
> applicable.
> > Perhaps the other approach is just use the M3 AST and
> someone has done something akin to localize uncalled
> procedures, etc.
> > Thanks in advance
> > 
> > --- El vie, 11/5/12, Dragiša Durić <dragisha at m3w.org>
> escribió:
> > 
> >> De: Dragiša Durić <dragisha at m3w.org>
> >> Asunto: [M3devel] Proposal for new pragma
> >> Para: "m3devel" <m3devel at elegosoft.com>
> >> Fecha: viernes, 11 de mayo, 2012 02:49
> >> DEBUG and ASSERT pragmas are good
> >> examples of very helpful and almost non-intrusive
> debug
> >> features. UNUSED is also worth mention.
> >> 
> >> Another good one can be a way to tell compiler
> where some
> >> object is expected to be referenced. I am just
> reading big
> >> source and part of what I do is to add comments -
> in
> >> particular I comment where from is some procedure
> >> called/variable used. Putting this in pragma will
> not change
> >> language at all, but will help writing correct
> programs a
> >> lot.
> >> 
> >> Also, once we establish a framework for such
> attributes,
> >> steps can be taken towards further ways to ensure
> >> correctness of code we write.
> >> 
> >> 
> 
> 



More information about the M3devel mailing list