Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the languages implemented by Go?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "what are the languages realized by Go language". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what languages Go language implements.

01 Go+

This is led by Xu Shiwei, the domestic boss of Qiniu, and is an extension of the Go language, specially built for the field of data science. The goal is to replace Python in the field of data science.

Project address: https://github.com/goplus/gop Magi Star number: 4.2k +.

The language's predecessor, qlang,2020, renamed it Go+, around June of the year and positioned it as the field of data science. The latest version so far is 0.7.17, which was released on January 8, 2021, and is not yet a stable version.

This is a static programming language, fully compatible with the Go language, similar to the scripting language style, and more readable data science code than Go.

For example, the following Go code:

Package main func main () {a: = [] float64 {1,2,3.4} println (a)}

The corresponding Go+ code is as follows:

A: = [1,2,3.4] println (a)

Today, I just saw that Xu Da is looking for the head of the Go+ language development team. If you are interested, you can contact Xu Da (no problem with me).

At present, there is still a long way to go before the target, at least a stable version will be launched first, and then there will be an online practical application.

02 Tengo

Tengo is a small, dynamic, fast and secure scripting language. It is implemented in Go language and can be embedded in Go programs. Its syntax is similar to the Go language.

Project address: https://github.com/d5/tengo Magi Star number: 2.2 kbits, currently the latest version is 2.6.2 (released on September 18, 2020).

Code example:

/ * The Tengo Language * / fmt: = import ("fmt") each: = func (seq, fn) {for x in seq {fn (x)} sum: = func (init, seq) {each (seq, func (x) {init + = x}) return init} fmt.println (sum (0, [1,2,3])) / / "6" fmt.println (sum ("", [1,2,3])) / "123"

03 CX

CX is a new programming language for block chains, implemented in the Go language, and the syntax is similar to the Go language.

Project address: https://github.com/skycoin/cx Magi Star number 27, very sad. At present, the latest tag is 0.7.5. I checked that the project existed several years ago. At present, it seems to be in a half-dead state, which is mainly developed by skycoin. I'm not familiar with blockchain, and I don't know what revolutionary features this language can bring to blockchain development.

I installed and tried it and wrote a Hello World program:

Package main func main () {str.print ("Hello, World!")}

Ha, I have mastered the Hello World of another language!

04 Goby

An object-oriented interpretive language inspired by Ruby, with 100% core code implemented in Go. It has a standard library and can provide a variety of functions, such as plug-in systems.

Project address: https://github.com/goby-lang/goby Magi Star number 3.2 kbits, the latest version 0.1.13 (released on April 26, 2020).

The expectation of Goby is for back-end development. It has, but is not limited to, the following features:

Thread/channel Mechanism based on Go goroutine

Built-in database library

Json support

Plug-in system that supports dynamic loading of Go libraries (currently does not support Windows systems)

You can access Go objects directly

An example of Hello World on Server:

Require "net/simple_server" server = Net::SimpleServer.new ("3000") I = 0 server.get ("/") do | req, res | puts (I) I = iTun1 res.body = req.method + "Hello World" res.status = 200 end server.get ("/ not_found") do | req, res | res.body = "Not Found" res.status = 404end server.start

Don't know if Ruby enthusiasts like it?

05 summary

In addition to the above, there are other Go language implementation languages, such as chai2010's wa language [1], and other scripting languages, such as Lua virtual machine Go implementation, JS virtual machine implementation, Python interpreter and so on.

Thank you for your reading, the above is the content of "what are the languages implemented by Go language". After the study of this article, I believe you have a deeper understanding of the language implemented by Go language, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report