Skip to content

Commit 46b2d52

Browse files
authored
Merge pull request ethereum#1640 from ethereum/docs-esoteric
Remove obsolete esoteric features section
2 parents ab54cd1 + 9f9807f commit 46b2d52

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

docs/miscellaneous.rst

-25
Original file line numberDiff line numberDiff line change
@@ -137,31 +137,6 @@ Different types have different rules for cleaning up invalid values:
137137
| | |will be thrown |
138138
+---------------+---------------+-------------------+
139139

140-
141-
*****************
142-
Esoteric Features
143-
*****************
144-
145-
There are some types in Solidity's type system that have no counterpart in the syntax. One of these types are the types of functions. But still, using ``var`` it is possible to have local variables of these types::
146-
147-
contract FunctionSelector {
148-
function select(bool useB, uint x) returns (uint z) {
149-
var f = a;
150-
if (useB) f = b;
151-
return f(x);
152-
}
153-
154-
function a(uint x) returns (uint z) {
155-
return x * x;
156-
}
157-
158-
function b(uint x) returns (uint z) {
159-
return 2 * x;
160-
}
161-
}
162-
163-
Calling ``select(false, x)`` will compute ``x * x`` and ``select(true, x)`` will compute ``2 * x``.
164-
165140
.. index:: optimizer, common subexpression elimination, constant propagation
166141

167142
*************************

0 commit comments

Comments
 (0)