Article View: pl.comp.lang.funkcyjne
Article #254Re: newbi: Co to jest i z czym to sie je? :)
From: Lucifer
Date: Tue, 11 Feb 2003 14:24
Date: Tue, 11 Feb 2003 14:24
48 lines
1996 bytes
1996 bytes
Bazic wrote:
> Prosze o wyjasnienie nieniejszego tematu grupy (jakies faq?)
> Nie slyszalem dotad o tego rodzaju sposobie programowania.
Nie mam pojecia jak to wyjasnic. Chodzi w tym o to, ze wszystko kreci
sie wokol funkcji. Wszsytkie wartosci sa stale, tzn nie musisz sie
martwic, ze cos sie niepostrzezenie zmieni w pewnym czasie.
> Czym charakteryzuja sie wymieniane przez Was Grupowicze jezyki (czy inaczej:
> metody) programowania?
Tez nie mam pojecia.
> jakis krotki przyklad kodu? (np. w porownaniu do jakiegos OOP)
Funkcyjne z OOP ma malo wspolnego, ale istnieja jezyki ktore go
wspieraja, np:
OCaml:
class foo s = object
val mutable sru : int = s
method get_sru = sru
end
class shmoo = object
inherit foo 4
method set_sru s = sru <- s
end
C++
class foo {
public:
foo(int s) : sru(s) { }
int get_sru() const { return sru; }
protected:
int sru;
};
class shmoo : public foo {
public:
shmoo() : foo(4) { }
void set_sru(int s) { sru = s; }
};
--
Lucifer
Technical Details
Message-ID:
<3E49079B.8000003@nospam.majora.net>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!news.onet.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<b2ap0k$cum$1@atlantis.news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!news.onet.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Lucifer <lucifer@nospam.majora.net> Newsgroups: pl.comp.lang.funkcyjne Subject: Re: newbi: Co to jest i z czym to sie je? :) Date: Tue, 11 Feb 2003 15:24:27 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 49 Message-ID: <3E49079B.8000003@nospam.majora.net> References: <b2ap0k$cum$1@atlantis.news.tpi.pl> NNTP-Posting-Host: tl206.internetdsl.tpnet.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1044973369 21123 80.55.115.206 (11 Feb 2003 14:22:49 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Tue, 11 Feb 2003 14:22:49 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 X-Accept-Language: pl, en Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit