🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.funkcyjne
1 messages
1 total messages Started by Wojciech Mula Sun, 21 Aug 2005 15:54
Funkcja wirtualna zwracająca self (OCaml)
#711
Author: Wojciech Mula
Date: Sun, 21 Aug 2005 15:54
21 lines
1260 bytes
Jest coś takiego:

class virtual abstract_class = 
object
	method virtual foo: abstract_class
end;;

class class1 =
object (self)
	inherit abstract_class
	method foo = (self :> abstract_class)
end;;

Czy można zadeklarować funkcję wirtualną foo w taki sposób, żeby
zwracała obiekt klasy dziedziczącej, czyli samo self?

w.

-- 
JID: wmula@chrome.pl | pomóż znaleźć lek na raka
http://www.mula.w.pl | http://www.find-a-drug.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads