View Problem

Define an unmodifiable empty map

DiskEdit
perl
# perl does not provide unmodifiable maps/hashes, but you could use "constant
# functions", if you really need them
# 2011-07-06 Not actually true, see Hash::Util::lock_hash;

sub MAP () { {} }
DiskEdit
perl
use Hash::Util qw/lock_hash/;
# two lines
my %hash;
lock_hash(%hash);
# or in one line
lock_hash(my %locked_hash);
ExpandDiskEdit
java
Map empty = Collections.EMPTY_MAP;
ExpandDiskEdit
java org.apache.commons
SortedMap empty = MapUtils.EMPTY_SORTED_MAP;

Submit a new solution for perl, java, or csharp
There are 17 other solutions in additional languages (clojure, cpp, erlang, fantom ...)