<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://50.77.162.165/mediawiki/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://50.77.162.165/mediawiki/index.php?feed=atom&amp;target=108.56.174.60&amp;title=Special%3AContributions</id>
		<title>Erights - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://50.77.162.165/mediawiki/index.php?feed=atom&amp;target=108.56.174.60&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://50.77.162.165/wiki/Special:Contributions/108.56.174.60"/>
		<updated>2026-04-18T11:35:18Z</updated>
		<subtitle>From Erights</subtitle>
		<generator>MediaWiki 1.15.5-7</generator>

	<entry>
		<id>http://50.77.162.165/wiki/Surprise_list</id>
		<title>Surprise list</title>
		<link rel="alternate" type="text/html" href="http://50.77.162.165/wiki/Surprise_list"/>
				<updated>2011-04-20T01:04:59Z</updated>
		
		<summary type="html">&lt;p&gt;108.56.174.60:&amp;#32;/* For-loop pattern failure is not an error */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Potentially surprising parts of the [[E language]].&lt;br /&gt;
&lt;br /&gt;
Current as of [http://www.erights.org/download/0-8-29/ E 0.8.33o].&lt;br /&gt;
&lt;br /&gt;
Very true! Makes a chagne to see someone spell it out like that. :)&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;code&amp;gt;def x&amp;lt;/code&amp;gt; doesn't return &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
The forward declaration expression, &amp;lt;code&amp;gt;def &amp;lt;var&amp;gt;var&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;, does not return &amp;lt;var&amp;gt;var&amp;lt;/var&amp;gt; but rather the [[Resolver]] for it.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
  # E sample&lt;br /&gt;
  &lt;br /&gt;
  ? def x&lt;br /&gt;
  # value: &amp;amp;lt;Resolver&amp;amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  ? x&lt;br /&gt;
  # value: &amp;amp;lt;Promise&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
If you want to pass a resolver as an argument, using it as an “out parameter”, this syntax is helpful:&lt;br /&gt;
&lt;br /&gt;
  x.hereIsAResolver(def y)&lt;br /&gt;
  &amp;lt;var&amp;gt;... use y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alternative===&lt;br /&gt;
&lt;br /&gt;
If you want the actual promise, simply write &amp;lt;code&amp;gt;(def x; x)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Unresolved references do not necessarily behave as their future resolved identity==&lt;br /&gt;
&lt;br /&gt;
&amp;amp;mdash; messages sent before the reference is resolved may be reacted to however the current holder of the reference &amp;amp;ldquo;arrow-head&amp;amp;rdquo; chooses, which does not necessarily correspond to the reference to which the unresolved reference resolves.&lt;br /&gt;
 &lt;br /&gt;
This has been discussed in [http://www.eros-os.org/pipermail/e-lang/2005-July/010821.html an e-lang thread].&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
This cannot be fixed without removing [http://www.erights.org/elib/distrib/pipeline.html pipelining], eliminating one of the major benefits of the E reference model.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
For now, see [http://www.eros-os.org/pipermail/e-lang/2005-July/010827.html this lengthy example by MarkM].&lt;br /&gt;
&lt;br /&gt;
===Alternative===&lt;br /&gt;
&lt;br /&gt;
To avoid being vulnerable to this type of misbehavior, do not use a sameness test (&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;) or Map key lookup in order to decide on the reliability of the response to a ''previously'' sent message. This might involve using a when-catch/whenResolved construct to wait until the reference is resolved.&lt;br /&gt;
&lt;br /&gt;
==Accumulator operator is lowest-precedence==&lt;br /&gt;
&lt;br /&gt;
As you can see in the following expansion, the operator following the “_” is always lowest-precedence (as it is the one effectively rewritten into an assignment form):&lt;br /&gt;
&lt;br /&gt;
    ? e`pragma.enable(&amp;quot;accumulator&amp;quot;); accum 0 while (a) { _ * b + c }`&lt;br /&gt;
    # value: e`null&lt;br /&gt;
    ...&lt;br /&gt;
    #                            accum__1 := accum__1.multiply(b.add(c))&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
None known; this is probably an accident of the definition of the expansion of accumulator syntax.&lt;br /&gt;
&lt;br /&gt;
===Alternative===&lt;br /&gt;
&lt;br /&gt;
Avoid accumulator syntax when the accumulation cannot be expressed as a single call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shadowing function arguments ==&lt;br /&gt;
&lt;br /&gt;
Rebinding a name within a block is an error, e.g.&lt;br /&gt;
&lt;br /&gt;
  def foo() {&lt;br /&gt;
  	def x := 2&lt;br /&gt;
  	def x := 3&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
(&amp;quot;Failed: x already in scope&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
However, rebinding an argument does not issue any warning:&lt;br /&gt;
&lt;br /&gt;
  def foo(x) {&lt;br /&gt;
  	...&lt;br /&gt;
  	def x := 2&lt;br /&gt;
  	...&lt;br /&gt;
  	println(x)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
=== Rationale ===&lt;br /&gt;
&lt;br /&gt;
The already-in-scope error is intended to catch accidentally using the same name twice, not prohibit rebinding. Generally, you can expect it to be supressed anywhere there is visible &amp;lt;code&amp;gt;{...}&amp;lt;/code&amp;gt; syntax.&lt;br /&gt;
&lt;br /&gt;
== Single-letter uriGetters are a special case ==&lt;br /&gt;
&lt;br /&gt;
It is not possible to refer to a single-letter uriGetter in a URI literal.&lt;br /&gt;
&lt;br /&gt;
  ? def &amp;lt;t&amp;gt; := [&amp;quot;foo&amp;quot; =&amp;gt; &amp;quot;bar&amp;quot;]&lt;br /&gt;
  # value: [&amp;quot;foo&amp;quot; =&amp;gt; &amp;quot;bar&amp;quot;]&lt;br /&gt;
  &lt;br /&gt;
  ? interp.setExpand(true)&lt;br /&gt;
  ? &amp;lt;t:foo&amp;gt;&lt;br /&gt;
  # expansion: file__uriGetter.get(&amp;quot;t:foo&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  # value: &amp;lt;file:/Users/kpreid/t:foo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
This is a feature intended for convenient support for Windows drive letter filenames. {{XXX|Look at whether MarkM agreed to remove it.}}&lt;br /&gt;
&lt;br /&gt;
===Alternative===&lt;br /&gt;
&lt;br /&gt;
Use names longer than one letter.&lt;br /&gt;
&lt;br /&gt;
[[Category:E language]]&lt;/div&gt;</summary>
		<author><name>108.56.174.60</name></author>	</entry>

	</feed>