[go: up one dir, main page]

0% found this document useful (0 votes)
85 views4 pages

Why Are You Creating A New Language?: Slow Builds Uncontrolled Dependencies

Go was created to address problems with existing languages around concurrency, speed of development, and dependencies. It aims to be statically typed like C++ and Java but more productive, with built-in support for concurrency, garbage collection, and being portable and open source. The design draws similarities to C but improves concurrency with lightweight processes and channels, uses interfaces instead of inheritance, and aims for a simple specification. The semantics make small changes from C, Java, C++ by removing features like header files, classes, and exceptions.

Uploaded by

Vaibhav Acharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views4 pages

Why Are You Creating A New Language?: Slow Builds Uncontrolled Dependencies

Go was created to address problems with existing languages around concurrency, speed of development, and dependencies. It aims to be statically typed like C++ and Java but more productive, with built-in support for concurrency, garbage collection, and being portable and open source. The design draws similarities to C but improves concurrency with lightweight processes and channels, uses interfaces instead of inheritance, and aims for a simple specification. The semantics make small changes from C, Java, C++ by removing features like header files, classes, and exceptions.

Uploaded by

Vaibhav Acharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Why are you creating a new language?

Slow Builds

Uncontrolled Dependencies

C/C++ header files, instruction generation and optimization.

Dependent class might not have compiled

Java and C# compilers run in a VM.

Or in different version

Languages with virtual machines compile the code twice,


sometimes even thrice.

Cluster Computing
problems introduced by multicore processors, networked
systems, massive computation clusters,
the web programming model were being worked around rather

Fundamental concepts
garbage collection
parallel computation

than addressed head-on

Speed

Concurrency

Development was not speedy

Other static language have concurrency issues

Features

Less Library
Statically type
be statically typed,
scalable to large systems (as
Java and C++);
No Type Hierarchy

More Productive
be productive and readable,
without too many mandatory
keywords and repetition ("light
on the page" like dynamic
languages);

Garbage Collection
Go is fully garbage-collected
and provides fundamental
support.

Portable , Open Source


& Fast

Concurrency Support
support for concurrent
execution and communication.

Go provides a model for


software construction that
makes dependency analysis
easy and avoids much of the
overhead of C-style include files
and libraries.

be productive and readable,


without too many mandatory
keywords and repetition ("light
on the page" like dynamic
languages);

Language Design

Same as C
Besides, changes to improve
conciseness, simplicity, and
safety

Syntax
Optional variable declaration &
initialization through type
inference (x := 0 ~ var x int = 0;

Package management
go get

Distinctive Approach

Built-in concurrency primitives:


light-weight processes
(goroutines), channels, and the
select statement.

Interface
An interface system in place of
virtual inheritance, and type
embedding instead of nonvirtual inheritance.

Simple Specification
language specification simple
enough to hold in a
programmer's head
omit features common to
similar languages

Semantics

Small changes to C, Java, C# and C++ semantics


Files compiled together in a package
No header files
No circular dependencies
No classes or subclasses
Interfaces are implicit (no "implements" declaration)
Methods are declared as functions (no special location)
No constructors or destructors
No pointer arithmetic (struct instead)
Segmented stacks
No templates and exceptions
Garbage collection (only)
No generics

Lemon drops oat cake oat


cake sugar um sweet
Chocolate cake sweet
pastry candy canes
chocolate cake sesame
Oreo cake lollipop sweet

You might also like