在学习Haskell时,我注意到它的type类,这应该是源自Haskell的一项伟大发明。但是,在theWikipediapageontypeclass:Theprogrammerdefinesatypeclassbyspecifyingasetoffunctionorconstantnames,togetherwiththeirrespectivetypes,thatmustexistforeverytypethatbelongstotheclass.在我看来,这与Java的接口(interface)很接近(引用Wikipedia'sInterface(Java)page):Anin