Hello Tomek,
Dnia 08-12-2009 o 20:09:10 Tomek Sowiński <[email protected]> napisał(a):
I think immutable static member functions don't make sense and
rightly so. On functions immutable is about "this" and there's no
"this". Currently everything inside an immutable struct/class is
tagged with "immutable".
I say, tag everything but static functions.
You should probably specify it in the bug report
http://d.puremagic.com/issues/show_bug.cgi?id=3598
This resolution is, at least for me, not obvious.
Let immutable types define them like anyone else.
Tomek
For clarity, I'm not commenting any of Michal's examples, I'm talking
about this:
immutable struct Strukt
{
static void funkcja() { } // now doesn't compile
}
We both agree it is a bug. You want to fix it not marking static function
as immutable when the they are inside immutable type. I was trying to fix
it by giving some meaning to static immutable functions, which seems to be
not so good idea…