Yahoo Web Search

  1. Ad
    related to: objective-c wikipedia 2017
  1. Objective-C - Wikipedia

    en.wikipedia.org › wiki › Objective-C

    Objective-C is a thin layer atop C and is a "strict superset" of C, meaning that it is possible to compile any C program with an Objective-C compiler and to freely include C language code within an Objective-C class. Objective-C derives its object syntax from Smalltalk. All of the syntax for non-object-oriented operations (including primitive variables, pre-processing, expressions, function declarations, and function calls) are identical to those of C, while the syntax for object-oriented ...

    • 1984; 37 years ago
    • Tom Love and Brad Cox
  2. Objective-C - Simple English Wikipedia, the free encyclopedia

    simple.wikipedia.org › wiki › Objective-C

    Basics. Objective-C is a strict superset of C, meaning that any code that can be written in C can be used in Objective-C programs without being rewritten. However, it adds some features of its own that cannot be used in a traditional C program.

  3. People also ask

    What's the difference between Objective C and Objective C + +?

    When was the first version of Objective C published?

    What's the difference between Objective C and Swift?

    How is the target of a message resolved in Objective C?

  4. Category:Objective-C - Wikipedia

    en.wikipedia.org › wiki › Category:Objective-C

    Pages in category "Objective-C" The following 3 pages are in this category, out of 3 total. This list may not reflect recent changes ().

  5. C (programming language) - Wikipedia

    en.wikipedia.org › wiki › C_(programming_language)
    • Overview
    • History
    • Syntax
    • "Hello, World" Example
    • Data Types
    • Memory Management
    • Libraries
    • Language Tools
    • Uses
    • Related Languages

    Like most procedural languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion. Its static type system prevents unintended operations. In C, all executable code is contained within subroutines (also called "functions", though not strictly in the sense of functional programming). Function parameters are always passed by value (except arrays). Pass-by-reference is simulated in C by explicitly passing pointer values. C program source text is free-format, using the semicolon as a statement terminator and curly braces for grouping blocks of statements. The C language also exhibits the following characteristics: 1. The language has a small, fixed number of keywords, including a full set of control flow primitives: if/else, for, do/while, while, and switch. User-defined names are not distinguished from keywords by any kind of sigil. 2. It has a large number of arithmetic, bitwise, and logic operators: +,+=,++,&,||, etc. 3....

    Early developments

    The origin of C is closely tied to the development of the Unix operating system, originally implemented in assembly language on a PDP-7 by Dennis Ritchie and Ken Thompson, incorporating several ideas from colleagues. Eventually, they decided to port the operating system to a PDP-11. The original PDP-11 version of Unix was also developed in assembly language. Thompson desired a programming language to make utilities for the new platform. At first, he tried to make a Fortran compiler, but soon...

    K&R C

    In 1978, Brian Kernighan and Dennis Ritchie published the first edition of The C Programming Language. This book, known to C programmers as K&R, served for many years as an informal specification of the language. The version of C that it describes is commonly referred to as "K&R C". As this was released in 1978, it is also referred to as C78. The second edition of the book covers the later ANSI Cstandard, described below. K&Rintroduced several language features: 1. Standard I/O library 2. lon...

    ANSI C and ISO C

    During the late 1970s and 1980s, versions of C were implemented for a wide variety of mainframe computers, minicomputers, and microcomputers, including the IBM PC, as its popularity began to increase significantly. In 1983, the American National Standards Institute (ANSI) formed a committee, X3J11, to establish a standard specification of C. X3J11 based the C standard on the Unix implementation; however, the non-portable portion of the Unix C library was handed off to the IEEE working group 1...

    C has a formal grammar specified by the C standard. Line endings are generally not significant in C; however, line boundaries do have significance during the preprocessing phase. Comments may appear either between the delimiters /* and */, or (since C99) following // until the end of the line. Comments delimited by /* and */ do not nest, and these sequences of characters are not interpreted as comment delimiters if they appear inside stringor character literals. C source files contain declarations and function definitions. Function definitions, in turn, contain declarations and statements. Declarations either define new types using keywords such as struct, union, and enum, or assign types to and perhaps reserve storage for new variables, usually by writing the type followed by the variable name. Keywords such as char and int specify built-in types. Sections of code are enclosed in braces ({ and }, sometimes called "curly brackets") to limit the scope of declarations and to act as a...

    The "hello, world" example, which appeared in the first edition of K&R, has become the model for an introductory program in most programming textbooks. The program prints "hello, world" to the standard output, which is usually a terminal or screen display. The original version was: A standard-conforming "hello, world" program is:[a] The first line of the program contains a preprocessing directive, indicated by #include. This causes the compiler to replace that line with the entire text of the stdio.h standard header, which contains declarations for standard input and output functions such as printf and scanf. The angle brackets surrounding stdio.h indicate that stdio.his located using a search strategy that prefers headers provided with the compiler to other headers having the same name, as opposed to double quotes which typically include local or project-specific header files. The next line indicates that a function named main is being defined. The main function serves a special pu...

    The type system in C is static and weakly typed, which makes it similar to the type system of ALGOL descendants such as Pascal. There are built-in types for integers of various sizes, both signed and unsigned, floating-point numbers, and enumerated types (enum). Integer type char is often used for single-byte characters. C99 added a boolean datatype. There are also derived types including arrays, pointers, records (struct), and unions (union). C is often used in low-level systems programming where escapes from the type system may be necessary. The compiler attempts to ensure type correctness of most expressions, but the programmer can override the checks in various ways, either by using a type castto explicitly convert a value from one type to another, or by using pointers or unions to reinterpret the underlying bits of a data object in some other way. Some find C's declaration syntax unintuitive, particularly for function pointers. (Ritchie's idea was to declare identifiers in cont...

    One of the most important functions of a programming language is to provide facilities for managing memoryand the objects that are stored in memory. C provides three distinct ways to allocate memory for objects: 1. Static memory allocation: space for the object is provided in the binary at compile-time; these objects have an extent(or lifetime) as long as the binary which contains them is loaded into memory. 2. Automatic memory allocation: temporary objects can be stored on the stack, and this space is automatically freed and reusable after the block in which they are declared is exited. 3. Dynamic memory allocation: blocks of memory of arbitrary size can be requested at run-time using library functions such as malloc from a region of memory called the heap; these blocks persist until subsequently freed for reuse by calling the library function realloc or free These three approaches are appropriate in different situations and have various trade-offs. For example, static memory alloc...

    The C programming language uses libraries as its primary method of extension. In C, a library is a set of functions contained within a single "archive" file. Each library typically has a header file, which contains the prototypes of the functions contained within the library that may be used by a program, and declarations of special data types and macro symbols used with these functions. In order for a program to use a library, it must include the library's header file, and the library must be linked with the program, which in many cases requires compiler flags (e.g., -lm, shorthand for "link the math library"). The most common C library is the C standard library, which is specified by the ISO and ANSI C standards and comes with every C implementation (implementations which target limited environments such as embedded systems may provide only a subset of the standard library). This library supports stream input and output, memory allocation, mathematics, character strings, and time...

    A number of tools have been developed to help C programmers find and fix statements with undefined behavior or possibly erroneous expressions, with greater rigor than that provided by the compiler. The tool lintwas the first such, leading to many others. Automated source code checking and auditing are beneficial in any language, and for C many such tools exist, such as Lint. A common practice is to use Lint to detect questionable code when a program is first written. Once a program passes Lint, it is then compiled using the C compiler. Also, many compilers can optionally warn about syntactically valid constructs that are likely to actually be errors. MISRA Cis a proprietary set of guidelines to avoid such questionable code, developed for embedded systems. There are also compilers, libraries, and operating system level mechanisms for performing actions that are not a standard part of C, such as bounds checking for arrays, detection of buffer overflow, serialization, dynamic memory tr...

    C is widely used for systems programming in implementing operating systems and embedded system applications, because C code, when written for portability, can be used for most purposes, yet when needed, system-specific code can be used to access specific hardware addresses and to perform type punning to match externally imposed interface requirements, with a low run-timedemand on system resources. C can be used for website programming using the Common Gateway Interface (CGI) as a "gateway" for information between the Web application, the server, and the browser. C is often chosen over interpreted languagesbecause of its speed, stability, and near-universal availability. A consequence of C's wide availability and efficiency is that compilers, libraries and interpreters of other programming languages are often implemented in C. For example, the reference implementations of Python, Perl, Ruby, and PHPare written in C. C enables programmers to create efficient implementations of algorit...

    C has both directly and indirectly influenced many later languages such as C#, D, Go, Java, JavaScript, Limbo, LPC, Perl, PHP, Python, and Unix's C shell. The most pervasive influence has been syntactical; all of the languages mentioned combine the statement and (more or less recognizably) expression syntax of Cwith type systems, data models, and/or large-scale program structures that differ from those of C, sometimes radically. Several C or near-C interpreters exist, including Ch and CINT, which can also be used for scripting. When object-oriented languages became popular, C++ and Objective-C were two different extensions of C that provided object-oriented capabilities. Both languages were originally implemented as source-to-source compilers; source code was translated into C, and then compiled with a C compiler. The C++ programming language was devised by Bjarne Stroustrup as an approach to providing object-oriented functionality with a C-like syntax. C++ adds greater typing stren...

  6. Objective-C - 维基百科,自由的百科全书

    zh.wikipedia.org › wiki › Objective-C
    • 歷史
    • 語法
    • 语言变化
    • 語言分析
    • 爭議
    • 外部链接

    Objective-C 主要由 Stepstone(英语:Stepstone) 公司的布萊德·考克斯(Brad Cox)和 汤姆·洛夫(英语:Tom Love)(Tom Love) 在 1980 年代发明。 1981年 Brad Cox 和 Tom Love 还在 ITT 公司技术中心任职时,接触到了 SmallTalk语言。Cox 当时对软件设计和开发问题非常感兴趣,他很快地意識到 SmallTalk語言 在系统工程构建中具有无法估量的价值,但同時他和 Tom Love 也明白,目前 ITT 公司的电子通信工程相关技术中,C 语言被放在很重要的位置。 於是 Cox 撰寫了一個 C 語言的预處理器,打算使 C 語言具備些許 Smalltalk 的本領。Cox 很快地實現了一個可用的 C 語言擴展,此即為 Objective-C語言的前身。到了 1983 年,Cox 與 Love 合夥成立了 Productivity Products International(PPI)公司,將 Objective-C 及其相關函式庫商品化販售,並在之後將公司改名為StepStone。1986年,Cox 出版了一本關於 Objective-C 的重要著作《Object-Oriented Programming, An Evolutionary Approach》,書內詳述了 Objective-C 的種種設計理念。 1988年,斯蒂夫·乔布斯(Steve Jobs)離開蘋果公司後成立了 NeXT Computer 公司,NeXT 公司買下 Objective-C 语言的授权,并擴展了著名的開源編譯器GCC 使之支持 Objective-C 的編譯,基於 Objective-C 開發了 AppKit(英语:Application Kit) 與 Foundation Kit(英语:Foundation Kit)等函式庫,作為 NeXTSTEP 的的用戶介面與开发环境的基礎。雖然 NeXT 工作站後來在市場上失敗了,但 NeXT 上的軟體工具卻在業界中被廣泛讚揚。這促使 NeXT 公司放棄硬體業務,轉型為銷售NeXTStep(以及OpenStep)平台為主的軟體公司。 1992年,自由软件基金会的 GNU 开发环境增加了对 Objective-C 的支持。1994年,NeXT Com...

    Objective-C是C語言的嚴格超集--任何C語言程式不經修改就可以直接通過Objective-C編譯器,在Objective-C中使用C語言代碼也是完全合法的。Objective-C被描述为蓋在C語言上的薄薄一層,因為Objective-C的原意就是在C語言主體上加入面向对象的特性。Objective-C的面向对象語法源於Smalltalk訊息傳遞風格。所有其他非面向对象的語法,包括變數型別,預處理器(preprocessing),流程控制,函數声明與调用皆與C語言完全一致。但有些C语言语法合法代码在objective-c中表达的意思不一定相同,比如某些布尔表达式,在C语言中返回值为true,但在Objective-C若与yes直接相比较,函数将会出错,因为在Objective-C中yes的值只表示为1.

    Objective-C++

    Objective-C++是GCC的一个前端,它可以编译混合了C++与Objective-C语法的源文件。Objective-C++是C++的扩展,类似于Objective-C是C的扩展。由于在融合C++与Objective-C两种语言的特性方面没有做特别的工作,因此有以下限制: 1. C++类不能从Objective-C类继承,反之亦然。 2. Objective-C定义内部不能定义C++命名空间。 3. Objective-C类的成员变量不能包括不含默认构造函数和/或含有虚方法的C++类对象,但使用C++类指针并无如此限制(可以在 -init方法中对之进行初始化)。 4. C++“传递值”的特性不能用在Objective-C对象上,而只能传递其指针。 5. Objective-C声明不能存在在C++模板声明中,反之亦然。但Objective-C类型可以用在C++模板的参数中。 6. Objective-C和C++的错误处理语句不同,各自的语句只能处理各自的错误。 7. Objective-C错误使得C++对象被退出时,C++析构函数不会被调用。新的64位运行时解决了这个问题。

    Objective-C 2.0

    在2006年7月苹果全球开发者会议中,Apple宣布了“Objective-C 2.0”的发布,其增加了“现代的垃圾收集,语法改进,运行时性能改进,以及64位支持”。2007年10月发布的Mac OS X v10.5中包含了Objective-C 2.0的编译器。

    Modern Objective-C

    苹果公司在 WWDC2012 大会上介绍了大量 Objective-C 的新特性,能够讓程序员更加高效地编写代码,这些新特性在 Xcode4.4 版本中已经可以使用。 1. Object Literals 2. 默认生成 @synthesize 代码 3. 遍历元素 4. Subscripting Methods

    Objective-C是非常「實際」的語言。它用一個很小的、用C寫成的运行库,使得應用程式的大小增加很少,与此相比,大部分OO系统需要极大的运行时虚拟机来执行。Objective-C寫成的程式通常不會比其原始碼和函式庫(通常无需包含在軟體發行版本中)大太多,不会像Smalltalk系統,即使只是打开一个窗口也需要大量的容量。由于Objective-C的动态类型特征,Objective-C不能对方法进行内联(inline)一类的优化,使得Objective-C的应用程序一般比类似的C或C++程序更大。 Objective-C可以在现存C编译器(英语:List of compilers#C compilers)基础上实现(在GCC中,Objective-C最初作为预处理器引入,后来作为模块存在),而不需要编写一个全新的编译器。这个特性使得Objective-C能利用大量现存的C代码、库、工具和编程思想等资源。现存C库可以用Obj-C包装器来提供一个Objective-C使用的OO风格界面包装。 以上这些特性极大地降低了进入Objective-C的门槛,这是1980年代Smalltalk在推广中遇到的最大问题。

    Objective-C的最初版本並不支持垃圾回收。在當時這是爭論的焦點之一,很多人考慮到Smalltalk回收時有漫長的「死亡時間」,令整個系統失去功用,Objective-C為避免此問題才不擁有這個功能。某些第三方版本加入了這個功能(尤是GNUstep),苹果公司也在其Mac OS X 10.5中提供了实现。 另一個广受批评的問題是Objective-C不包括命名空間机制。取而代之的是程式設計師必須在其類別名稱加上前綴,由于前缀往往较短(相比命名空间),这時常引致衝突。在2007年,在Cocoa編程環境中,所有Mac OS X類別和函式均有「NS」作為前綴,例如NSObject或NSButton來清楚分辨它們屬於Mac OS X核心;使用「NS」是由於這些類別的名稱在NeXTSTEP開發時定下。 雖然Objective-C是C的严格超集,但它也不視C语言的基本型別為第一級的对象。 和C++不同,Objective-C不支援運算子多載(它不支持特设多态)。亦與C++不同,但和Java相同,Objective-C只容許物件繼承一個類別(不設多重繼承)。Categories和protocols不但可以提供很多多重繼承的好處,而且沒有很多缺點,例如額外執行時間過重和二进制不兼容。[來源請求] 由于Objective-C使用动态运行时类型,而且所有的方法都是函数调用(有时甚至连系统调用(syscalls)也如此),很多常见的编译时性能优化方法都不能应用于Objective-C(例如:内联函数、常数传播、交互式优化(英语:Interprocedural optimization)、聚集的纯量取代等)。这使得Objective-C性能劣于类似的对象抽象语言(如C++)。不过Objective-C擁護者认为Objective-C本就不应应用于C++或Java常见的底层抽象,Objective-C的应用方向是对性能要求不大的应用

    苹果官方Objective-C开发说明文档(页面存档备份,存于互联网档案馆)
    Objective-C教學(页面存档备份,存于互联网档案馆)
    • 1984年,​36年前
    • 面向对象
  7. Objective-C – Wikipedia

    zh-min-nan.wikipedia.org › wiki › Objective-C

    Objective-C. Wikipedia (chū-iû ê pek-kho-choân-su) beh kā lí kóng... Objective-C sī chi̍t khoán to-iōng-tô͘ ê bu̍t-kiāⁿ kheng-hiòng thêng-sek gí-giân, chiong Smalltalk ê sìn-sek thoân-sàng hêng-sek ka chiūⁿ tī C gí-giân. I sī Apple khai-hoat beh ēng tī OS X kap iOS khoân-kéng ê gí-giân.

  8. Objective-C - 维基百科,自由的 ... - zh.wikipedia.org

    zh.wikipedia.org › zh-hans › Objective-C
    • 历史
    • 语法
    • 语言变化
    • 语言分析
    • 争议
    • 外部链接

    Objective-C 主要由 Stepstone(英语:Stepstone) 公司的布莱德·考克斯(Brad Cox)和 汤姆·洛夫(英语:Tom Love)(Tom Love) 在 1980 年代发明。 1981年 Brad Cox 和 Tom Love 还在 ITT 公司技术中心任职时,接触到了 SmallTalk语言。Cox 当时对软件设计和开发问题非常感兴趣,他很快地意识到 SmallTalk语言 在系统工程构建中具有无法估量的价值,但同时他和 Tom Love 也明白,目前 ITT 公司的电子通信工程相关技术中,C 语言被放在很重要的位置。 于是 Cox 撰写了一个 C 语言的预处理器,打算使 C 语言具备些许 Smalltalk 的本领。Cox 很快地实现了一个可用的 C 语言扩展,此即为 Objective-C语言的前身。到了 1983 年,Cox 与 Love 合伙成立了 Productivity Products International(PPI)公司,将 Objective-C 及其相关函式库商品化贩售,并在之后将公司改名为StepStone。1986年,Cox 出版了一本关于 Objective-C 的重要著作《Object-Oriented Programming, An Evolutionary Approach》,书内详述了 Objective-C 的种种设计理念。 1988年,斯蒂夫·乔布斯(Steve Jobs)离开苹果公司后成立了 NeXT Computer 公司,NeXT 公司买下 Objective-C 语言的授权,并扩展了著名的开源编译器GCC 使之支持 Objective-C 的编译,基于 Objective-C 开发了 AppKit(英语:Application Kit) 与 Foundation Kit(英语:Foundation Kit)等函式库,作为 NeXTSTEP 的的用户介面与开发环境的基础。虽然 NeXT 工作站后来在市场上失败了,但 NeXT 上的软体工具却在业界中被广泛赞扬。这促使 NeXT 公司放弃硬体业务,转型为销售NeXTStep(以及OpenStep)平台为主的软体公司。 1992年,自由软件基金会的 GNU 开发环境增加了对 Objective-C 的支持。1994年,NeXT Com...

    Objective-C是C语言的严格超集--任何C语言程式不经修改就可以直接通过Objective-C编译器,在Objective-C中使用C语言代码也是完全合法的。Objective-C被描述为盖在C语言上的薄薄一层,因为Objective-C的原意就是在C语言主体上加入面向对象的特性。Objective-C的面向对象语法源于Smalltalk讯息传递风格。所有其他非面向对象的语法,包括变数型别,预处理器(preprocessing),流程控制,函数声明与调用皆与C语言完全一致。但有些C语言语法合法代码在objective-c中表达的意思不一定相同,比如某些布尔表达式,在C语言中返回值为true,但在Objective-C若与yes直接相比较,函数将会出错,因为在Objective-C中yes的值只表示为1.

    Objective-C++

    Objective-C++是GCC的一个前端,它可以编译混合了C++与Objective-C语法的源文件。Objective-C++是C++的扩展,类似于Objective-C是C的扩展。由于在融合C++与Objective-C两种语言的特性方面没有做特别的工作,因此有以下限制: 1. C++类不能从Objective-C类继承,反之亦然。 2. Objective-C定义内部不能定义C++命名空间。 3. Objective-C类的成员变量不能包括不含默认构造函数和/或含有虚方法的C++类对象,但使用C++类指针并无如此限制(可以在 -init方法中对之进行初始化)。 4. C++“传递值”的特性不能用在Objective-C对象上,而只能传递其指针。 5. Objective-C声明不能存在在C++模板声明中,反之亦然。但Objective-C类型可以用在C++模板的参数中。 6. Objective-C和C++的错误处理语句不同,各自的语句只能处理各自的错误。 7. Objective-C错误使得C++对象被退出时,C++析构函数不会被调用。新的64位运行时解决了这个问题。

    Objective-C 2.0

    在2006年7月苹果全球开发者会议中,Apple宣布了“Objective-C 2.0”的发布,其增加了“现代的垃圾收集,语法改进,运行时性能改进,以及64位支持”。2007年10月发布的Mac OS X v10.5中包含了Objective-C 2.0的编译器。

    Modern Objective-C

    苹果公司在 WWDC2012 大会上介绍了大量 Objective-C 的新特性,能够让程序员更加高效地编写代码,这些新特性在 Xcode4.4 版本中已经可以使用。 1. Object Literals 2. 默认生成 @synthesize 代码 3. 遍历元素 4. Subscripting Methods

    Objective-C是非常“实际”的语言。它用一个很小的、用C写成的运行库,使得应用程式的大小增加很少,与此相比,大部分OO系统需要极大的运行时虚拟机来执行。Objective-C写成的程式通常不会比其原始码和函式库(通常无需包含在软体发行版本中)大太多,不会像Smalltalk系统,即使只是打开一个窗口也需要大量的容量。由于Objective-C的动态类型特征,Objective-C不能对方法进行内联(inline)一类的优化,使得Objective-C的应用程序一般比类似的C或C++程序更大。 Objective-C可以在现存C编译器(英语:List of compilers#C compilers)基础上实现(在GCC中,Objective-C最初作为预处理器引入,后来作为模块存在),而不需要编写一个全新的编译器。这个特性使得Objective-C能利用大量现存的C代码、库、工具和编程思想等资源。现存C库可以用Obj-C包装器来提供一个Objective-C使用的OO风格界面包装。 以上这些特性极大地降低了进入Objective-C的门槛,这是1980年代Smalltalk在推广中遇到的最大问题。

    Objective-C的最初版本并不支持垃圾回收。在当时这是争论的焦点之一,很多人考虑到Smalltalk回收时有漫长的“死亡时间”,令整个系统失去功用,Objective-C为避免此问题才不拥有这个功能。某些第三方版本加入了这个功能(尤是GNUstep),苹果公司也在其Mac OS X 10.5中提供了实现。 另一个广受批评的问题是Objective-C不包括命名空间机制。取而代之的是程式设计师必须在其类别名称加上前缀,由于前缀往往较短(相比命名空间),这时常引致冲突。在2007年,在Cocoa编程环境中,所有Mac OS X类别和函式均有“NS”作为前缀,例如NSObject或NSButton来清楚分辨它们属于Mac OS X核心;使用“NS”是由于这些类别的名称在NeXTSTEP开发时定下。 虽然Objective-C是C的严格超集,但它也不视C语言的基本型別为第一级的物件。 和C++不同,Objective-C不支援运算子多载(它不支持特设多态)。亦与C++不同,但和Java相同,Objective-C只容许物件继承一个类别(不设多重继承)。Categories和protocols不但可以提供很多多重继承的好处,而且没有很多缺点,例如额外执行时间过重和二进制不兼容。[来源请求] 由于Objective-C使用动态运行时类型,而且所有的方法都是函数调用(有时甚至连系统调用(syscalls)也如此),很多常见的编译时性能优化方法都不能应用于Objective-C(例如:内联函数、常数传播、交互式优化(英语:Interprocedural optimization)、聚集的纯量取代等)。这使得Objective-C性能劣于类似的对象抽象语言(如C++)。不过Objective-C拥护者认为Objective-C本就不应应用于C++或Java常见的底层抽象,Objective-C的应用方向是对性能要求不大的应用

    苹果官方Objective-C开发说明文档(页面存档备份,存于互联网档案馆)
    Objective-C教学(页面存档备份,存于互联网档案馆)
  9. C Sharp (programming language) - Wikipedia

    en.wikipedia.org › wiki › C_Sharp_(programming_language)
    • Design Goals
    • History
    • Syntax
    • Common Type System
    • Libraries
    • Examples
    • Standardization and Licensing
    • Implementations
    • Further Reading
    • External Links

    The Ecma standard lists these design goals for C#: 1. The language is intended to be a simple, modern, general-purpose, object-oriented programminglanguage. 2. The language, and implementations thereof, should provide support for software engineering principles such as strong type checking, array bounds checking, detection of attempts to use uninitialized variables, and automatic garbage collection. Software robustness, durability, and programmer productivity are important. 3. The language is intended for use in developing software components suitable for deploymentin distributed environments. 4. Portability is very important for source code and programmers, especially those already familiar with C and C++. 5. Support for internationalizationis very important. 6. C# is intended to be suitable for writing applications for both hosted and embedded systems, ranging from the very large that use sophisticated operating systems, down to the very small having dedicated functions. 7. Althou...

    During the development of the .NET Framework, the class libraries were originally written using a managed code compiler system called "Simple Managed C" (SMC). In January 1999, Anders Hejlsberg formed a team to build a new language at the time called Cool, which stood for "C-like Object Oriented Language". Microsoft had considered keeping the name "Cool" as the final name of the language, but chose not to do so for trademark reasons. By the time the .NET project was publicly announced at the July 2000 Professional Developers Conference, the language had been renamed C#, and the class libraries and ASP.NETruntime had been ported to C#. Hejlsberg is C#'s principal designer and lead architect at Microsoft, and was previously involved with the design of Turbo Pascal, Embarcadero Delphi (formerly CodeGear Delphi, Inprise Delphi and Borland Delphi), and Visual J++. In interviews and technical papers he has stated that flaws in most major programming languages (e.g. C++, Java, Delphi, and...

    The core syntax of the C# language is similar to that of other C-style languages such as C, C++ and Java, particularly: 1. Semicolons are used to denote the end of a statement. 2. Curly brackets are used to group statements. Statements are commonly grouped into methods (functions), methods into classes, and classes into namespaces. 3. Variables are assigned using an equals sign, but compared using two consecutive equals signs. 4. Square brackets are used with arrays, both to declare them and to get a value at a given index in one of them.

    C# has a unified type system. This unified type system is called Common Type System(CTS). A unified type system implies that all types, including primitives such as integers, are subclasses of the System.Object class. For example, every type inherits a ToString()method.

    The C# specification details a minimum set of types and class libraries that the compiler expects to have available. In practice, C# is most often used with some implementation of the Common Language Infrastructure (CLI), which is standardized as ECMA-335 Common Language Infrastructure (CLI). In addition to the standard CLI specifications, there are many commercial and community class libraries that build on top of the .NET framework libraries to provide additional functionality. C# can make calls to any library included in the List of .NET libraries and frameworks.

    Hello World

    The following is a very simple C# program, a version of the classic "Hello world" example: Using C# 9 Top-level statementsfeature the entry point logic of a program can be written without declaring an explicit type or Main method.Until C# 8 remains the classic way: This code will display this text in the console window: Each line has a purpose: The above line imports all types in the System namespace. For example, the Console class used later in the source code is defined in the Systemnamespa...

    GUI

    A GUIexample: This example is similar to the previous example, except that it generates a dialog boxthat contains the message "Hello, World!" instead of writing it to the console.

    Images

    Another useful library is the System.Drawinglibrary, which is used to programmatically draw images. For example: This will create an image that is identical to that stored in "Image.png".

    In August 2001, Microsoft Corporation, Hewlett-Packard and Intel Corporation co-sponsored the submission of specifications for C# as well as the Common Language Infrastructure (CLI) to the standards organization Ecma International.In December 2001, ECMA released ECMA-334 C# Language Specification. C# became an ISO standard in 2003 (ISO/IEC 23270:2003 - Information technology — Programming languages — C#). ECMA had previously adopted equivalent specifications as the 2nd edition of C#, in December 2002. In June 2005, ECMA approved edition 3 of the C# specification, and updated ECMA-334. Additions included partial classes, anonymous methods, nullable types, and generics (somewhat similar to C++ templates). In July 2005, ECMA submitted to ISO/IEC JTC 1, via the latter's Fast-Track process, the standards and related TRs. This process usually takes 6–9 months. The C# language definition and the CLI are standardized under ISO and Ecma standards that provide reasonable and non-discriminator...

    Microsoft is leading the development of the open-source reference C# compilers and set of tools. The first compiler, Roslyn, compiles into intermediate language (IL), and the second one, RyuJIT, is a JIT (just-in-time) compiler, which is dynamic and does on-the-fly optimization and compiles the IL into native code for the front-end of the CPU. RyuJIT is open source and written in C++. Roslyn is entirely written in managed code (C#), has been opened up and functionality surfaced as APIs. It is thus enabling developers to create refactoring and diagnostics tools. Two branches of official implementation are .NET Framework (closed source, Windows 10 only since .NET 4.6.2) and .NET Core (open source, multiplatform); .NET Framework and .NET Core converged into one open source implementation .NET 5.0.At .NET Framework 4.6 a new JIT compiler replaced the former. Other C# compilers (some of which include an implementation of the Common Language Infrastructureand .NET class libraries): 1. The...

    Drayton, Peter; Albahari, Ben; Neward, Ted (2002). C# Language Pocket Reference. O'Reilly. ISBN 0-596-00429-X.
    Petzold, Charles (2002). Programming Microsoft Windows with C#. Microsoft Press. ISBN 0-7356-1370-2.
  10. Objective-C - 維基百科,自由嘅百科全書

    zh-yue.wikipedia.org › wiki › Objective-C

    Objective-C嘅商標權屬於蘋果公司,蘋果公司亦係呢個程式語言嘅主要開發者。 蘋果喺開發NeXTSTEP操作系統時用咗Objective-C,之後被 OS X 同 iOS 繼承落嚟。 宜家Objective-C同Swift係OS X同iOS作業系統、及同佢相關嘅API、Cocoa同Cocoa Touch主要嘅程式語言。

  11. People also search for