[go: up one dir, main page]

0% found this document useful (0 votes)
61 views3 pages

History

Go is a programming language created at Google in 2009. It is statically typed and compiled, with syntax similar to C but additional features for concurrency, garbage collection, and simplicity. Some key aspects include built-in concurrency using goroutines and channels, interfaces instead of inheritance, and producing statically linked binaries without external dependencies. Google released version 1.0 in 2012 and it is now commonly used at Google and other companies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views3 pages

History

Go is a programming language created at Google in 2009. It is statically typed and compiled, with syntax similar to C but additional features for concurrency, garbage collection, and simplicity. Some key aspects include built-in concurrency using goroutines and channels, interfaces instead of inheritance, and producing statically linked binaries without external dependencies. Google released version 1.0 in 2012 and it is now commonly used at Google and other companies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

History[edit]

The language was announced in November 2009. It is used in some of Google's production
systems, as well as by other firms.[15]
Two major implementations exist:

Google's Go compiler, "gc", developed as open-source software. It targets various


platforms including Linux, OS X, Windows, various BSD and Unix versions, and also (since
2015) mobile devices (including smartphones).[16]
A second compiler, gccgo, is a GCC frontend.[17][18]
The "gc" toolchain has been self-hosting since version 1.5.[19]
Go originated as an experiment by Google engineers Robert Griesemer, Rob Pike, and Ken
Thompson to design a new programming language that would resolve common criticisms of
other languages while maintaining their positive characteristics. The developers envisaged the
new language as:[20]

statically typed, scalable to large systems (as Java and C++)


productive and readable, without too many mandatory keywords and repetition[21] ("light on
the page" like dynamic languages)
not requiring integrated development environments, but supporting them well
supporting networking and multiprocessing
In later interviews, all three of the language designers cited their shared dislike of C++'s
complexity as a primary motivation for designing a new language.[22][23][24]
Google released Go 1.0 in March 2012
Go is recognizably in the tradition of C, but makes many changes to improve brevity, simplicity,
and safety. Go consists of:

A syntax and environment adopting patterns more common in dynamic languages:[27]


Optional concise variable declaration and initialization through type inference ( x :=
0 not int x = 0; or var x = 0; ).
Fast compilation times.[28]
Remote package management ( go get )[29] and online package documentation.[30]
Distinctive approaches to particular problems:
Built-in concurrency primitives: light-weight processes (goroutines), channels, and
the select statement.
An interface system in place of virtual inheritance, and type embedding instead of non-
virtual inheritance.
A toolchain that, by default, produces statically linked native binaries without external
dependencies.
A desire to keep the language specification simple enough to hold in a programmer's
head,[31] in part by omitting features common to similar languages.
Syntax[edit]
Go's syntax includes changes from C aimed at keeping code concise and readable. A
combined declaration/initialization operator was introduced that allows the programmer to
write i := 3 or s := "Hello, world!" , without specifying the types of variables. This
contrasts with C's int i = 3; and const char *s = "Hello, world!"; . Semicolons
still terminate statements, but are implicit when the end of a line occurs. Functions may return
multiple values, and returning a result, err pair is the conventional way a function
indicates an error to its caller in Go.[a] Go adds literal syntaxes for initializing struct parameters
by name, and for initializing maps and slices. As an alternative to C's three-
statement for loop, Go's range expressions allow concise iteration over arrays, slices,
strings, maps, and channels.[citation needed]

Types[edit]
Go has a number of built-in types, including numeric ones (byte, int64, float32,
etc.), booleans, and character strings (string). Strings are immutable; built-in operators and
keywords (rather than functions) provide concatenation, comparison, and UTF-8 encoding and
decoding.[32] Record types can be defined with the struct keyword.[citation needed]
For each type T and each non-negative integer constant n, there is an array
type denoted [n]T; arrays of differing lengths are thus of different types. Dynamic arrays are
available as "slices", denoted []T for some type T. These have a length and
a capacity specifying when new memory needs to be allocated to expand the array. Several
slices may share their underlying memory.[33][34][35]
Pointers are available for all types, and the pointer-to-T type is denoted *T. Address-taking and
indirection use the & and * operators as in C, or happen implicitly through the method call or
attribute access syntax.[36] There is no pointer arithmetic, except via the
special unsafe.Pointer type in the standard library.[citation needed]
For a pair of types K, V, the type map[K]V is the type of hash tables mapping type-K keys to
type-V values. Hash tables are built into the language, with special syntax and built-in
functions. chan T is a channel that allows sending values of type T between concurrent Go
processes.[citation needed]
Aside from its support for interfaces, Go's type system is nominal: the type keyword can be
used to define a new named type, which is distinct from other named types that have the same
layout (in the case of a struct, the same members in the same order). Some conversions
between types (e.g., between the various integer types) are pre-defined and adding a new type
may define additional conversions, but conversions between named types must always be
invoked explicitly.[37] For example, the type keyword can be used to define a type
for IPv4 addresses, which are 32-bit unsigned integers.[citation needed]

Scala
Scala (/skl/ SKAH-lah)[9] is a general-purpose programming language providing support
for functional programming and a strong static type system. Designed to be concise,[10] many of
Scala's design decisions aimed to address criticisms of Java.[8]
Scala source code is intended to be compiled to Java bytecode, so that the resulting
executable code runs on a Java virtual machine. Scala provides language interoperability with
Java, so that libraries written in both languages may be referenced directly in Scala or Java
code.[11] Like Java, Scala is object-oriented, and uses a curly-brace syntax reminiscent of the C
programming language. Unlike Java, Scala has many features of functional
programming languages like Scheme, Standard ML and Haskell, including currying, type
inference, immutability, lazy evaluation, and pattern matching. It also has an advanced type
system supporting algebraic data types, covariance and contravariance, higher-order
types (but not higher-rank types), and anonymous types. Other features of Scala not present in
Java include operator overloading, optional parameters, named parameters, and raw strings.
Conversely, a feature of Java not in Scala is checked exceptions, which have proved
controversial.
The name Scala is a portmanteau of scalable and language, signifying that it is designed to
grow with the demands of its users

History
The design of Scala started in 2001 at the cole Polytechnique Fdrale de Lausanne (EPFL)
(in Lausanne, Switzerland) by Martin Odersky. It followed on from work on Funnel, a
programming language combining ideas from functional programming and Petri
nets.[13] Odersky formerly worked on Generic Java, and javac, Sun's Java compiler.[13]
After an internal release in late 2003, Scala was released publicly in early 2004 on the Java
platform,[14][8][13][15] A second version (v2.0) followed in March 2006.[8]
Although Scala had extensive support for functional programming from its inception, Java
remained a mostly object oriented language until the inclusion of lambda expressions with Java
8 in 2014.
On 17 January 2011 the Scala team won a five-year research grant of over 2.3 million from
the European Research Council.[16] On 12 May 2011, Odersky and collaborators launched
Typesafe Inc. (later renamed Lightbend Inc.), a company to provide commercial support,
training, and services for Scala. Typesafe received a $3 million investment in 2011
from Greylock Partners.

You might also like