On 26 November 2012 04:20, Camillo Bruni <[email protected]> wrote: >>> no need to hack the compiler >>> - on the first call check if there is the primitive >>> - if there is none, check if the method contains any other primitive >>> - if not, add the primitive to the second line of the method sources >>> - recompile the method with the same primitive >>> - call that method again >>> >>> so you got a solution that works already now, I don't see what opal will >>> add you here? >>> >> >> what i was wanted to say that instead of using long cryptic string, >> with opal i could use a very simple pragma , like <native>. >> >> modifying source code is a slippery road, with a lot of pitfalls down >> the sides.... >> i am one, who thinks that automatic tools should not interfere with >> what author(s) >> wanted to say. > > sure, but it's a solution that works for now and that can and should > be changed once our infrastructure is ready. > > waiting for perfect solution is silly when you have something around the > corner that will work.... > >> i prefer to leave source as it was written, but we can instruct the >> compiler to insert primitive >> once we discover that it is not there but without modifying source code. > > > it's funny to see, but even when you gave your demo even you couldn't type > the pragma definition yourself, so how do you except this to affect newcomers?
no need to convince me. of course i can type it.. but most of the time you copy/paster it from method to method. -- Best regards, Igor Stasenko.
