Google Go vs Goal C.


1 Introduction

" The importance of language for the development of culture lies in that, as humankind has established a language separate from the world alongside the other world, which is the place it needed to be so stable that, by standing on it, it could lift the rest of the world off its articulations and make itself its master. To the extent that people throughout the ages believe in the concepts and names of things as they do in crises, he has proven to himself the pride in which he raised himself above the animal: he really believed that in language he had knowledge of the world. . Friedrich Nietzsche.

Every computer programmer has a few comments about his best programming language. There are common features that most programmers want, such as easy-to-use syntax, better run-time performance, and faster aggregation, and there are certain functions we need depending on our app. These are the main reasons for having so many programming languages ​​and new ones being introduced almost daily. Despite great interest in language design, many modern programming languages ​​do not always offer innovation in language design, for example, Microsoft and Apple offer different forms of it.

Not too far in history when C entered the world of computing and became the basis for many other successful programming languages. Most members of this family remained close to their infamous mothers and very few of them managed to separate and distinguish themselves as an individual being. However, the computing landscape has changed dramatically since the birth of C. Computers are thousands of times faster using multi-core processors. Internet and Internet access are widely available, devices are getting smaller and smaller, and mobile computing has been pushed into the mainstream. In this age, we want a language that makes our lives better and easier.

According to TIOBE, Go and Goal C were among the fastest growing languages, especially in 2009, and Go got the "Programming Language of the Year" in the same year. TIOBE get its results on a monthly basis by indexing. Indexing is updated with data obtained via links to accredited programmers, software vendors, and training. This data is collected for TIOBE via Google, Bing, Yahoo, Wikipedia and YouTube search engines. The results were more predictable for Objective-C because it is the iPhone and Mac language, and Apple is working hard in the market. However, this result becomes even more interesting because it has not been long since technology darling has introduced its own programming language called GO.

2. A little history

Insulted Mother, Google dominated search, email, and more. So the introduction of a new programming language is not a shock! Like many Google open source projects, Go began working as a project 20 percent of the time Google gave its employees a try, and later evolved into something more serious. Robert Griesemer, Rob Pike and Ken Thompson officially started Design and Go design in November 2009, with the release of applications for Linux and Mac OS. Google released the Go app under a BSD-style license, in the hope that the programmers ’community would develop the Go app and develop it as a viable option for software development. At the moment, Go is still very small and experimental. Even Google does not currently use the Go app to produce applications widely. Although the site hosting the code runs a server built with Go as a guide, the primary purpose of the release is to attract developers and build the Go community around it. Despite its uncertain condition, Go does indeed support many of the standard tools you would expect from the system language.

Objective C, on the other hand, has a longer and broader history. It is used today mainly on Mac OS and Apple. Objective C is the primary language used in the Apple COCOA API. Goal C was created by Brad Cox and Tom Love in the early 1980s at StepStone. In 1986, Cox published the main description of Goal C in its original form in the book " Object-oriented programming, and an evolutionary approach Since then, Objective C of the feature has been compared with other languages, and now Steve Jobs is the preferred choice.

There are many aspects that contribute to the design, success or failure of a programming language. In this article, I try to make a general comparison of these two very important languages ​​in the future.

3. General comparison

These days, the world is full of programming languages ​​and they are getting more and more general and all-purpose, but they still have their specialties and characteristics, and each language has its drawbacks and advantages.

Languages ​​can generally be divided into many different categories. The following table is not a complete list of all comparable features. Features that were thought to be somewhat more important were chosen compared to the two chosen programming languages ​​and a brief explanation of each was provided.

3.1 form

Objective-C is an object-oriented language, which means that objects can change state. Objective-C also gives you the full ability of a real object oriented language with adding one sentence to the original C and many additional keywords. Of course, object-oriented programs are built around objects, so in Objective C, objects are the roots of everything. A class is used to produce similar objects, called instances of the class. Categories are used to encapsulate data and methods that belong together. Methods are the processes that Objective-C applies to data and are determined by their message settings. Objective-C supports polymorphism which means that multiple classes can have a method with the same name. Individual inheritance is also used to reuse the symbol. The closest thing to achieving multiple inheritance is creating a class with instance variables that point to other objects. However, the goal-C philosophy is that programmers do not need multiple inheritance and that it does not encourage them.

In GO things are a little different. Go designers chose a template to pass messages to achieve concurrent programming. The language offers two main buildings, Goroutines and Channels, to achieve this model. In design FAQs, Google has written that GO is not an object-oriented language! Although Go contains types and methods and let's emulate the object-oriented programming style, there is no writing hierarchy. The lack of a gender hierarchy makes Go '"objects" much more lightweight than the Object in Objective C. Go uses an innovative object method and programmers are not required to worry about trees of large objects. Since the language is not actually a target language, the programmer can solve the problem in any way he wants and still have "object oriented" features.

I really can't think of any object oriented language that doesn't have a hierarchical inheritance mechanism. But for those who do have that, it seems to create a better model for flexibility and reuse. The lack of inheritance to go is really interesting! As far as I remember, inheritance was always taught to me as a trend line. The truth is that inheritance is not the only possible mechanism for reuse in the direction of an object. Composition can be said to be a stronger mechanism for sharing behavior than inheritance.

Object Oriented Programming has become very popular especially in large companies, because it is a suitable method for the method of developing programs and increasing their chances of a successful project using teams of middle programmers. Object Oriented Programming applies a standard to these programmers and prevents individuals from causing significant harm. The price is that the resulting code is full of duplication. This is not an exorbitant price for large companies, because their software would be full of duplication anyway.

3.2 Syntax

Objective C is an extension of the ANSI C standard. Existing C programs can be adapted to use software frameworks without losing any of the work involved in their original development. In Objective C, Programmer gets all the benefits of C when working within Objective C. The programmer can choose to do something in an object-oriented way such as defining a new class, or sticking to procedural programming techniques. Objective-C is generally considered a hybrid-like thing between C and Smalltalk. One setback due to the learning curve can be the necessity of having basic knowledge of C programming before entering the goal C world like syntax and directing programming, often providing a long and difficult learning curve for new programmers and Objective C is also no exception.

Go is a member of the C family as well, but I think Go is able to break the coding style and make it different in some way. Compared to Objective C, statements are underdeveloped. In C, the idea is that a variable is defined as an expression that indicates its type like Basic, which is a great idea in my opinion.

In Go: var a, b * int;

I find an approach to natural human language for example this statement: "variable a integer" can appear as follows:

Var int;

This is clearer, smarter and more regular.

Go also allows multiple assignments, which are done in parallel.

i, j = j, i // Swap i and j.

Go control phrases do not accept parentheses. While the most common control term, if, would take the form "if (self) {" in Objective C and most other OO languages. But in Go, it will have the following form:

If self

Another difference in Go is that semicolons are not recommended. However, you can end any Go statement with an optional semicolon. In fact, the semicolon is intended for analysts and Google wanted to eliminate it as much as possible. One statement does not require a semicolon at all which I find somewhat comfortable.

Go is a translated language similar to C. There are currently two Go codecs available, one for the x86 platform and the other for AMD. Go collection speed is very fast. When I first tried it (without any intended or appropriate measurement) it was really fast! My experience with programming languages ​​is limited and somewhat focuses on object oriented languages ​​like Java, so I've never seen speed like this! One of Go Go's primary promised goals is the ability to quickly collect things. According to the official GoD demo video, Go performance is in the range of 10 – 20% of C. However, I don't think this is trustworthy until we reach some performance standards in the near future.

3.3. Genetic exceptions and drugs

Objective C does not contain generic types unless the programmer decides to use C ++ templates in his or her custom group classes. Object-C uses dynamic writing, which means that the runtime takes care of the object type because all objects can receive messages. When a programmer adds an object to a merged group, it is treated as if it is defined by type. Similar to C ++, Objective-C contains syntax to handle exceptions.

The Go system does not support generic types. At least for now, they do not consider it necessary. Generic medicines are comfortable but impose a high load on typing and runtime, and Go can't afford it! Like generic drugs, exceptions remain an open issue. The "exception" approach is often innovative and useful, which is difficult for many programs. The Google database is not tolerant of the exception, so exceptions are a similar story and have been excluded from the language. Alternatively, the programmer can now use multiple return values ​​from a call to handle errors. Since Go is collected by garbage, lack of exceptions is less of a problem compared to C ++, but there are still cases where you need to clean things like file handles or external resources. Many programmers believe that exceptions are absolutely necessary in modern programming language. However, I love the fact of not being the exception because I find the exception treated with most ugly languages. In a language like Go, where multiple values ​​can be returned from functions, programmers can do things like return the result and status code, and handle errors via status codes.

3.4. Type systems

Compared to other C-based object oriented languages, Objective C is very dynamic. Nowadays, programmers tend to choose dynamically typed languages ​​like Objective C. The result is that there is less information at compile time. This dynamic means that we can send a message to an unspecified object in its interface. The compiler contains detailed information about the objects themselves for use at run time. Decisions that can be taken at the time of translation will be delayed until the program is run. This gives Objective-C programs flexibility and strength.

Dynamically written languages ​​encounter an endless runtime error that can be uncomfortable and confusing. However, Objective-C allows the programmer to select the object class optionally, in which cases, the compiler will apply the strong writing methodology. Objective-C makes most decisions at runtime. Weakly written pointers are often used for things like group categories, as the exact type of objects in a group may be unknown. For programmers who are accustomed to heavily written languages, using weak typing can cause problems so some may give up on flexibility and dynamism. At the same time, while the dynamic dispatch of Objective C makes it slower than static languages. Many developers think that additional flexibility is definitely worth the price, and they say that most desktop applications rarely use more than 10% of modern CPU. I don't agree with the justification mentioned above which we use only 10% of the CPU. So what ?! It is not a good trend to dispense with simple methods aimed at efficiency and performance by wasted software that highly bet on the power of the device, and I personally prefer working with fixed type verification.

Go also tries to respond to this increasing trend of dynamically written languages ​​and provides an innovative writing system. Go end up giving a language programmer with Pythonish Duck Writing. The Go system really does have an unusual system: it excludes inheritance and does not spend time identifying relationships between species. Alternatively, programmers can define structure types and then create ways to work on them. Like Objective C, programmers can also define interfaces. Go is heavily written, but the good thing is that it isn't that strong! The programmer does not need to clearly declare the types of variables. Instead, Go implicitly assigns the type to the non-standard variable when the value is assigned to the variable first. There is dynamic writing information under the covers that programs can use to do interesting things.

3.5. Collect garbage

It is very important these days that garbage collection is one of the biggest sources of keeping everything clean and managing memory. In Objective C 2.0, the garbage collection was shown. It was definitely good news for new iPhone and Mac developers who may be familiar with Java. Garbage collection has simplified things but programmers still have to be careful when dealing with memory management. Objective-C 2.0 Garbage Collector is a conservative collector which means that not only developers have full access to the power of C language, but also C&C's ability to integrate with C ++ code and libraries are kept. The programmer can create the bulk of its application using Objective C, allowing the garbage collector to manage the memory and wherever needed, we can escape to the power of C and C ++.

In Go, as concurrent and multi-threaded programming, memory management is very difficult because objects can move between threads, and it becomes extremely difficult to ensure their editing is safe once we get rid of them. Automatic garbage collection relieves simultaneous coding. When looking at it with the possibility that someone like me has been accustomed to high-level, safe and rubbish-collecting languages ​​for many years now, much of this is just boring news. On the other hand, in the low-level language of programming languages, these types of changes are revolutionary, especially if the required performance can be achieved. Go focuses on speed, and in the garbage collection the overheads lie in performance. However, advances in garbage collection technology allowed her to acquire any significant latency and enabled Google to include it in Go.

4. The future and conclusion

There must be a reason why the popularity of these two languages ​​has grown. Perhaps the reason for this is that Microsoft's light is declining. Apple and Google quickly outperform each other with their own ecosystem. Go is a language promoted by Google, giving it an undeniable advantage in terms of popularity, reputation, and technical coverage, and Goal C is supported by the Steve Job empire.

Objective C has the advantages of the cocoa libraries that come with Mac OS. Mac OS X and iPhone are the largest language apps by a large margin. Lately, there has been a tremendous trend for iPhone applications and the ability to easily make money with easy programming projects is extremely high. I believe that this basic human truth will contribute more to the future growth of Goal C. Because more developers use language and test it in different situations, the better and stronger the language will become.

Back is actually an interesting language. Thanks to support and resources from Google, programmers can rest assured that Go will have some kind of future even if it's not too shiny! I think language has potential, but it will take some time, not a very short time, before it can attract developers to drop the current platform and choose a transition. Going still is a small language. It is experimental and not recommended for production environments. There is no IDE integration and there are some code examples. Go incomplete they have shown what they got and encouraged the developers' contribution. As an open source project supported by Google, I think Go will soon be developing an IDE and an ecosystem, as it appears to have been well received as mentioned before in the TIOBE index. But it is impossible to predict the size of the ecosystem. If the language is able to create an ecosystem, things can go smoothly. I think Windows OS support is needed later and also integrated with Eclipse IDE to expand it among programmers.

Apple and Objective C focus on object oriented programming and all language documents are geared towards object oriented programming. Therefore, there is a big difference between Goal C and Going. However, like any human or other language, Goal C and Go can be compared to certain criteria and attempted to provide a general comparison between them. However, it may take a long time for the path of these two languages ​​to appear. Go young and full of doubts. This makes comparing these two programming languages ​​difficult or perhaps, as my friends say, an "impossible" programmer. Go needs appropriate evaluation by unbiased rulers for some time to be more comparable but I'm sure we'll hear more about these two languages ​​in the near future.


Related articles

SEO Web Links And Backlinks

Are web backlinks dead? What should I do for SEO? So...

Next Generation Computer Systems

Next Generation Computer Systems The change will come soon. Technology...

Data Recovery “How To Recover From A Hard Drive Failure”

How To Recover From A Hard Drive Failure Unfortunately, most...

The Pros and Cons of Keyboard Shortcuts in Excel

If you are a Microsoft Excel user, chances are...

Machine Learning: The Next Career Change Tool

Machine Learning: The Next Career Change Tool: Machine learning...

Case Studies

Compass Music Platform

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...

NewsWeek Magazine

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...

Beauty & Makeup Shop

A clothing brand wanted to launch a new e-commerce website that would allow customers to browse and purchase their products online. We developed a...