Oberon是一种通用编程语言,最初由尼克劳斯·维尔特在1987年推出,是维尔特风格的类ALGOL语言中的最后一员(继Euler(英语:Euler (programming language))、ALGOL W、Pascal、Modula和Modula-2之后)[1][2][3][4]。Oberon是增进Pascal的直接后继者Modula-2的能力,并减少其复杂度的集中努力的结果。它的原理性新特征是记录类型的类型扩展的概念[5]。它允许新数据类型构造在现存数据类型之上并关联于它们,脱离了严格的静态类型数据的教条。Oberon是在瑞士的苏黎世联邦理工学院作为Oberon操作系统(英语:Oberon (operating system))实现的一部份而开发的。这个名字来自天王星的卫星奧伯隆。
Oberon的当前版本是2007年修订的Oberon-07,它仍由维尔特来维护而Oberon计划编译器最近更新于2020年3月6日[6]。
Oberon的基本指导原则是集中于基础和根本的特征,并忽略短暂性的问题。另一个因素是认识到了在语言如C++和Ada中复杂度的增长。与它们相反,Oberon强调使用库概念来扩展语言。在Modula-2中提供的枚举和子范围类型被省略了;类似的集合类型被限制为小的整数集合,而低层设施的数量被大幅度缩减(特别是省略了类型转移函数)。省略余下的潜在不安全设施,是得到真正的高级语言的最根本步骤。甚至跨越模块的非常紧密的类型检查,严格的运行时间索引检查,空指针检查,和安全的类型扩展概念,在很大程度上允许编程单独的依仗于语言规则。
这种策略的意图是产生易于学习、实现更简单和高效的语言。Oberon编译器被认为是简明和快速的,却提供了可比拟于商业编译器的代码质量[7]。
刻画Oberon语言的特征包括[8]:
Oberon支持对记录类型的扩展,用于抽象和异构结构的构造。不同于后期方言即1991年提出的Oberon-2(英语:Oberon-2)和1998年提出的Active Oberon(英语:Active Oberon),最初的Oberon缺乏作为语言特征的分派机制,而是把它作为一种编程技术或设计模式。这给出了在OOP上的巨大灵活性。在Oberon操作系统(英语:Oberon (operating system))中,两种技术被一起用于分派调用:方法套件和消息处理器。
在这种技术中,泛化模块定义过程变量的一个表格类型,而扩展模块中声明这个类型的一个共享变量,泛化模块中的方法要访问这个表格的对应项目,而扩展模块将这个表格的项目指派到自己相应的过程:
MODULE Figures; (* 抽象模块 *) TYPE Figure* = POINTER TO FigureDesc; Interface* = POINTER TO InterfaceDesc; InterfaceDesc* = RECORD draw* : PROCEDURE (f : Figure); clear* : PROCEDURE (f : Figure); mark* : PROCEDURE (f : Figure); move* : PROCEDURE (f : Figure; dx, dy : INTEGER); END; FigureDesc* = RECORD if : Interface; END; PROCEDURE Init* (f : Figure; if : Interface); BEGIN f.if := if; END Init; PROCEDURE Draw* (f : Figure); BEGIN f.if.draw(f); END Draw; (* 这里是其他过程Clear、Mark和Move *) END Figures.
扩展泛化类型Figure为特定形状Rectangles:
Figure
Rectangles
MODULE Rectangles; IMPORT Figures; TYPE Rectangle* = POINTER TO RectangleDesc; RectangleDesc* = RECORD (Figures.FigureDesc) x, y, w, h : INTEGER; END; VAR if : Figures.Interface; PROCEDURE New* (VAR r : Rectangle); BEGIN NEW(r); Figures.Init(r, if); END New; PROCEDURE Draw* (f : Figure); VAR r : Rectangle; BEGIN r := f(Rectangle); (* f具有Rectangle类型 *) (* ... *) END Draw; (* 这里是其他过程Clear、Mark和Move *) BEGIN (* 模块初始化 *) NEW(if); if.draw := Draw; if.clear := Clear; if.mark := Mark; if.move := Move; END Rectangles.
动态分派只能通过泛化模块的Figures中的方法集合完成,比如这里的Draw、Clear、Mark和Move过程,它们通过接口表格调用了扩展模块Rectangles中的同名过程。
Figures
Draw
Clear
Mark
Move
这种技术形成于,在泛化模块中定义一个单一的处理器过程类型,并在扩展模块中声明这个类型的一个过程,用它处理对应各种方法并包含了相应的实际参数的消息记录:
MODULE Figures; (* 抽象模块 *) TYPE Figure* = POINTER TO FigureDesc; Message* = RECORD END; DrawMsg* = RECORD (Message) END; ClearMsg* = RECORD (Message) END; MarkMsg* = RECORD (Message) END; MoveMsg* = RECORD (Message) dx*, dy* : INTEGER END; Handler* = PROCEDURE (f : Figure; VAR msg : Message); FigureDesc* = RECORD (* 抽象 *) handle : Handler; END; PROCEDURE Handle* (f : Figure; VAR msg : Message); BEGIN f.handle(f, msg); END Handle; PROCEDURE Init* (f : Figure; handle : Handler); BEGIN f.handle := handle; END Init; END Figures.
MODULE Rectangles; IMPORT Figures; TYPE Rectangle* = POINTER TO RectangleDesc; RectangleDesc* = RECORD (Figures.FigureDesc) x, y, w, h : INTEGER; END; PROCEDURE Draw* (r : Rectangle); BEGIN (* ... *) END Draw; (* 这里是其他过程Clear、Mark和Move *) PROCEDURE Handle* (f: Figure; VAR msg: Figures.Message); VAR r : Rectangle; BEGIN r := f(Rectangle); IF msg IS Figures.DrawMsg THEN Draw(r) ELSIF msg IS Figures.MarkMsg THEN Mark(r) ELSIF msg IS Figures.MoveMsg THEN Move(r, msg(Figures.MoveMsg).dx, msg(Figures.MoveMsg).dy) ELSE (* 忽略 *) END END Handle; PROCEDURE New* (VAR r : Rectangle); BEGIN NEW(r); Figures.Init(r, Handle); END New; END Rectangles.
在Oberon操作系统中,这两种技术都用于动态分派。前者用于已知的方法集合;后者用于在扩展模块中声明的任何新方法。例如,如果扩展模块Rectangles要实现一个新的Rotate()过程,在扩展模块之外只能通过它的消息处理器过程来调用。
Rotate()
هذه المقالة تحتاج للمزيد من الوصلات للمقالات الأخرى للمساعدة في ترابط مقالات الموسوعة. فضلًا ساعد في تحسين هذه المقالة بإضافة وصلات إلى المقالات المتعلقة بها الموجودة في النص الحالي. (يوليو 2020) كلية ستانيسلاس في باريس معلومات التأسيس 1804 الموقع الجغرافي إحداثيات 48°50′41″N…
Organization Campaign for Science and EngineeringAbbreviationCaSEFormation1986 (Name changed in 2005)Legal statusNon-profit organisation, company limited by guaranteePurposePromoting science and engineering in the UKLocationLondon, WC1Region served United KingdomDirectorSarah MainWebsitewww.sciencecampaign.org.uk The Campaign for Science and Engineering (CaSE) is a non-profit organisation that is the UK's leading independent advocate for science and engineering. It focuses on arguing for more re…
Pour les articles homonymes, voir Lamy et Pierre Lamy (homonymie). Pierre LamyPierre LamyBiographieNaissance 23 mars 1909AngoulêmeDécès 18 juillet 1944 (à 35 ans)Saint-JoriozNationalité françaiseActivité RésistantAutres informationsConflit Seconde Guerre mondialeDistinctions Chevalier de la Légion d'honneurCroix de guerre 1939-1945Médaille de la Résistancemodifier - modifier le code - modifier Wikidata Pierre Lamy, né le 23 mars 1909 et mort le 18 juillet 1944, est une figure…
هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (مايو 2016) نهج برنامج الرعاية في المملكة المتحدة عبارة عن نظام توصيل خدمات الصحة العقلية المجتمعية للأفراد المشخصة حالاتهم بـالمرض العقلي. طرح في إنجلترا عام 1991[1] وب
去區塊濾波器(英語:Deblocking Filter,縮寫:DBF)又稱去塊效應濾波器是一種減少在區塊邊界產生視覺上瑕疵的濾波器。這種視覺瑕疵可稱為區塊效應(Blocking Effect),這種效應主要構成原因是因為以區塊為基礎(Block-Based)的編解碼器(Codec)所造成的人造邊界(Blocking Artifacts)。以區塊為基底的編解碼器有很多種,H.264/高階視訊編碼(Advanced Video Coding, AVC)以及H.265/高效率視…
عرف الإنسان منذ القديم بعض العناصر الكيميائية كالذهب والفضة والحديد والنحاس، من ثم تم التعرف على بعض العناصر الأخرى مثل الكبريت والرصاص والفسفور وغيرها وعندما أعلن مندليف في أذار 1869 عن اكتشافه للقانون الدوري تسابق العلماء على اكتشاف الغرف الشاغرة في الجدول الدوري،والآن ي
AustriaJulukanDas Team (The Team)Burschen (The Boys)Unsere Burschen (Our Boys)AsosiasiÖsterreichischer Fußball-Bund (ÖFB)KonfederasiUEFA (Eropa)PelatihRalf RangnickKaptenJulian BaumgartlingerPenampilan terbanyakAndi Herzog (103)Pencetak gol terbanyakToni Polster (44)Stadion kandangErnst-Happel-StadionKode FIFAAUTPeringkat FIFATerkini 25 (26 Oktober 2023)[1]Tertinggi10 (Maret–Juni 2016)Terendah105 (Juli 2008)Peringkat EloTerkini 25 12 (18 Oktober 2023)[2] Warna pertama Warna …
Konferensi Waligereja IndonesiaLogo KWI sejak tahun 2017SingkatanKWITanggal pendirianNovember 1955StatusOrganisasi massa nirlabaTipeKonferensi waligerejaTujuanDukungan bagi pelayanan uskup-uskup IndonesiaKantor pusatKantor Waligereja IndonesiaLokasi IndonesiaWilayah layanan Seluruh wilayah IndonesiaJumlah anggota Uskup-uskup diosesan petahana di IndonesiaBahasa resmi IndonesiaKetua PresidiumMgr. Antonius Subianto Bunjamin, O.S.C.[1](Uskup Bandung)Sekretaris JenderalMgr. Paskalis Bru…
Gunilla Bergström Información personalNacimiento 3 de julio de 1942 Johannebergs församling (Suecia) Fallecimiento 23 de agosto de 2021 (79 años)Stockholms Gustav Vasa (Suecia) Nacionalidad SuecaInformación profesionalOcupación Escritora, ilustradora, escritora de literatura infantil y guionista Área Literatura infantil y juvenil e ilustración de libros Distinciones Elsa Beskow plaque (1979)Premio Astrid Lindgren (1981) (2006)Emil Prize (2011)Illis quorum (2012)M…
Eine kanadische 3-Cent-Briefmarke von 1917, die auf Robert Harris’ Gemälde „Fathers of Confederation“ basiert. Als Väter der Konföderation (englisch Fathers of Confederation, französisch Pères de la Confédération) werden die Personen bezeichnet, die an der Charlottetown-Konferenz, der Québec-Konferenz und der Londoner Konferenz teilnahmen. Diese Konferenzen führten zur Kanadischen Konföderation, also der Vereinigung von Kronkolonien in Britisch-Nordamerika zum Bundesstaat Kanada …
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Guest House TV series – news · newspapers · books · scholar · JSTOR (October 2021) (Learn how and when to remove this template message) Pakistani TV series or programme Guest HouseGenreComedy dramaWritten byQaiser FarooqMuhammad NisarShakir UzairDirected…
CamelCase CamelCase, CamelCaps of InterCaps is de gewoonte (onder andere in de informatica) om samengestelde woorden of zinnen, waar de woorden normaliter met een spatie gescheiden worden, als één woord te schrijven door de spatie en de daarop volgende letter te vervangen door de corresponderende hoofdletter. Meer algemeen is het het gebruik van een hoofdletter in een woord tussen kleine letters. De naam CamelCase verwijst, vanwege de midden in het samengestelde woord voorkomende hoofdletter(s…
Province of Italy Province in Emilia–Romagna, ItalyProvince of Forlì-CesenaProvincePalazzo dei Signori della Missione, the provincial seat in Forlì FlagCoat of armsMap highlighting the location of the province of Forlì-Cesena in ItalyCountry ItalyRegionEmilia–RomagnaCapital(s)ForlìComuni30Government • PresidentEnzo LattucaArea • Total2,378.4 km2 (918.3 sq mi)Population (2012) • Total398,322 • Density170/km2 (430/sq&…
Province of Afghanistan For the capital city of Afghanistan, see Kabul. Not to be confused with Zabul Province. Province in AfghanistanKabul کابلProvinceMap of Afghanistan with Kabul highlightedCoordinates (Capital): 34°00′N 69°00′E / 34.00°N 69.00°E / 34.00; 69.00Country AfghanistanCapitalKabulGovernment • GovernorShaikh Nida Mohammad[1] • Deputy GovernorMufti Mohammad Idris[1] • Police ChiefWali Ja…
Czech politician and physician You can help expand this article with text translated from the corresponding article in Czech. (February 2023) Click [show] for important translation instructions. View a machine-translated version of the Czech article. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated t…
Restaurant in Melbourne, AustraliaSwagman RestaurantRestaurant informationEstablished1972Closed1991CityMelbourneCountryAustralia A close-up of the Swagman sign The Swagman Restaurant was a restaurant in Ferntree Gully, Melbourne, Australia, which opened in 1972 and burnt down in 1991. The restaurant was famous in Melbourne for its long-running television commercials, cabaret shows, and smorgasbord. The Swagman was located on Burwood Highway, Ferntree Gully.[1] It was owned by Bastiaan (B…
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Cultural Complex of the Republic – news · newspapers · books · scholar · JSTOR (June 2015) (Learn how and when to remove this template message) Building in Brasilia, BrazilCultural Complex of the RepublicComplexo Cultural da RepúblicaAerial view.General informati…
The Endau river at Kampung Peta Kampung Peta is a Malaysian village in the upper Endau valley along the Endau River in Mersing District, Johor state. The inhabitants of Kampung Peta are mainly Orang Asli (indigenous people) from the Jakun people ethnic group.[1] Etymology The word Peta means map in Malay. Tourism The park gate of Endau-Rompin National Park is situated at Kampung Peta. There are several self-catering accommodation options in the park as well as a park lodge situated at th…
Rugby league season 2024 Super League XXIXLeagueSuper LeagueDuration27 RoundsTeams12Broadcast partners Sky Sports BBC Sport (highlights) Fox League Fox Soccer Plus Sport Klub beIN Sports 2024 Season← 20232025 → Super League XXIX, known as the Betfred Super League XXIX for sponsorship reasons, will be the 29th season of the Super League and 130th season of rugby league in Great Britain. Wigan Warriors will be the defending champions, having beaten Catalans Dragons in the Grand Final…
American actress Jayma MaysMays in 2010BornJamia Suzette Mays (1979-07-16) July 16, 1979 (age 44)[1]Bristol, Tennessee, U.S.Alma materRadford UniversityOccupationActressYears active2004–presentSpouse Adam Campbell (m. 2007)Children1 Jamia Suzette Jayma Mays[2] (born July 16, 1979) is an American actress. She is known for playing Emma Pillsbury in the Fox musical series Glee (2009–2015) and for her starring roles in the films Red E…
Lokasi Pengunjung: 54.166.200.255