To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.

Confirmation code: Enter the code exactly as it appears. All letters are case insensitive, there is no zero.

special rules for ring/qring:- assignment does not copy- nameof(basering) is always a local variable name even if defined in another procedure- if there are several names for the current barering, removing nameof(basering)sets nameof(basering) to one of the others (so nameof(basering is always defind aslong as there is any basering)

Jack wrote: If that is really so bad, could this be prevented by the language itself?No, it is like converting module to matrix and vice versa: quite useful and sometimes necessary but should not be done too often.Or like shooting yourself in the foot:: sometimes useful, one can still walk, but generallynot recommended.

And: reference is an experimental feature: it can/will be removed/changed/renamed etc.

special rules for ring/qring:- assignment does not copy- nameof(basering) is always a local variable name even if defined in another procedure- if there are several names for the current barering, removing nameof(basering)sets nameof(basering) to one of the others (so nameof(basering is always defind aslong as there is any basering)

Jack wrote: If that is really so bad, could this be prevented by the language itself?No, it is like converting module to matrix and vice versa: quite useful and sometimes necessary but should not be done too often.Or like shooting yourself in the foot:: sometimes useful, one can still walk, but generallynot recommended.

And: reference is an experimental feature: it can/will be removed/changed/renamed etc.

Posted: Tue Oct 15, 2013 9:47 am

Jack

Post subject:

Re: there are special rules for rings

hannes wrote:

For ring/qring reference should not be used: there are special rules for rings which do not apply for references!

Could you step a little bit more into detail: which specials rules for rings do not apply when using references?

If that is really so bad, could this be prevented by the language itself?

Jack

[quote="hannes"]For ring/qring reference should not be used: there are special rules for rings which do not apply for references!

[/quote]

Could you step a little bit more into detail: which specials rules for rings do not apply when using references?

If that is really so bad, could this be prevented by the language itself?

Jack

Posted: Mon Oct 14, 2013 3:40 pm

hannes

Post subject:

Re: minimize overhead when returning objects from procedures

For usual types: it depends.The time consuming operations are the same in nature and count(clean up the old content, move the new one to the destination)if return is compared to reference.

For ring/qring reference should not be used: there are special rules for rings which do not apply for references!

If you are looking for the fastest method with minimal memory foot print,the construction of the object as global one may be the best method but this has other negative aspects.

For usual types: it depends.The time consuming operations are the same in nature and count(clean up the old content, move the new one to the destination)if return is compared to reference.

For ring/qring reference should not be used: there are special rules for rings which do not apply for references!

If you are looking for the fastest method with minimal memory foot print,the construction of the object as global one may be the best method but this has other negative aspects.

Posted: Fri Oct 11, 2013 11:32 am

Jack

Post subject:

minimize overhead when returning objects from procedures

What is a reasonable method in Singular ( less copying, less memory usage footprint )to return rings and other objects from proceduresif there are several calling levels