Re: [BLACKBOX] IN Parameters - Making the design more regular

From: [at]} <Chris>
Date: Wed, 30 Jan 2008 15:52:25 +1030

----boundary-LibPST-iamunique-1065469455_-_-
Content-type: text/plain

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Werner Braun
>Sent: Tuesday, 29 January 2008 1:41 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: Re: [BLACKBOX] IN Parameters - Making the design more regular
>
>
>I like the fact, that IN parameters are "by reference" ... if
>i don't want this i use value parameters anyway.
>

Be careful not to confuse language *design* issues with language
*implementation* issues.

In my proposal there is nothing that prohibits IN parameters from being
passed by reference in the internal workings of the compiler if they are
records or arrays. In my implementation of the compiler that is exactly what
happens.

>If you make IN a Value-Parameter i no longer have the old "IN"
>Type, which is not nice for me.

Not true. The way I have implemented it should generate identical code for
your old "IN" types as the Blackbox 1.6rc5 compiler. You are not losing any
capabilities but you are gaining some.

>But anyway, where is the difference between value and IN
>parameters. The only would be that the parameter is unchanged
>within the procedure.
>I'm not interested in that. What the procedure does with it's
>value parameters is outside of my scope (information hiding).
>

Consider this code:

PROCEDURE P(x: INTEGER);
BEGIN
  ...
  SomeOtherProcedure(x);
  ...
  (* Who knows what the value of x is? *)

Compare to this:
 
PROCEDURE P(IN x: INTEGER);
BEGIN
  ...
  SomeOtherProcedure(x);
  ...
  (* You can be sure that the value of x is what it was before the procedure
was called *)


>
>Thank you for thinking about the language but i'm not interested.
>

No worries. Thank you for your feedback.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/cp
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1065469455_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2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86
----boundary-LibPST-iamunique-1065469455_-_---
Received on Wed Jan 30 2008 - 06:22:25 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:05 UTC