Yuck! This is quadruple plus ungood. What you've done here, in effect, is
to mix up records and overloading and stack allocation. These seem like
horrible things to mix up. Especially since instances are NOT locals and
CANNOT be locals if the coherence of implicit instances is to be preserved.

Making instances dynamic in this way utterly destroys our ability to do
compile-time specialization!


shap

On Thu, Jan 8, 2015 at 11:42 PM, Keean Schupke <[email protected]> wrote:

> Although slightly off-topic, I think its useful to show two threading
> examples:
>
>
> using int2
>
> thread_start() {
>     // all threads share the same counter
> }
>
>
> Or
>
>
> thread_start() {
>     using int2
>     // each thread has a separate counter initialised on stread start
> }
>
>
> This is due to 'using' creating the state storage for the
> dynamically-scoped implicit override on the stack (for small objects like a
> single int, or heap-allocated forl larger objects controlled by a C++ style
> 'unique_ptr'' from the stack, so that it gets auto de-allocated on scope
> exit).
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to