I'm trying to create some terminal logging colors to be able to see clearer my errors. Doing that it seems to me obvious that I'd have to create constants like followings. As I don't want to create an instance each time I call my constant, it makes sense for me to do something like that, but the compiler doesn't seem to have the same conception as me...
A once function has generic or anchored result
what is an anchored
result?
As the compiler has always the last word and me the forelast, why am I wrong and is he right??
class
TERMINAL_COLOR
create
make
feature -- Initialization
make (a_fg: like foreground; a_bg: like background)
do
foregound := a_fg
background := a_bg
end
feature -- Status report
foreground: INTEGER
background: INTEGER
feature -- Colors
Black: like Current
once -- compiler doesn't agree with me
create Result.make (30, 40)
ensure
instance_free: class
end
end