Golang : Constant and variable names in native language
Stumbled upon a discussion in Quora about the abilities of Golang. One of them is that Go allows developers to use their own native language and font to identify constants and variables.
I've tried couple of languages with the help of Google Translate. Most will work except for languages from South-Asia( as of Go version 1.4) :
package main
import (
"fmt"
)
func main() {
// Chinese
var 你好 string = "Hi!"
fmt.Println(你好)
// Hebrew
var היי string = "Hi!"
fmt.Println(היי)
// Arabic
const مرحبا = "Hi!"
fmt.Println(مرحبا)
// Greek
var γεια string = "Hi!"
fmt.Println(γεια)
// Japanese
var こんにちは string = "Hi!"
fmt.Println(こんにちは)
// Polish
var cześć string = "Hi!"
fmt.Println(cześć)
// Ukrainian
var привіт string = "Hi!"
fmt.Println(привіт)
// Hindi
// var हाय string = "Hi!" // will cause error
// fmt.Println(हाय)
// Bengali
//var হাই string = "Hi!" // will cause error
//fmt.Println(হাই)
// Gujarati
//var હાય string = "Hi!" // will cause error
//fmt.Println(હાય)
// Tamil
//var வணக்கம் string = "Hi!" // will cause error
//fmt.Println(வணக்கம்)
}
Output :
Hi!
Hi!
Hi!
Hi!
Hi!
Hi!
Hi!
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+5.4k Grep : How to grep for strings inside binary data
+6.2k Golang : Of hash table and hash map
+4.8k Linux : Disable and enable IPv4 forwarding
+6.2k Golang : Use modern ciphers only in secure connection
+23.8k Golang : Convert uint value to string type
+4.1k Linux/Unix/MacOSX : Find out which application is listening to port 80 or use which IP version
+16k Golang : How to make a file read only and set it to writable again?
+11.1k Golang : Forwarding a local port to a remote server example
+7k Findstr command the Grep equivalent for Windows
+16.4k Golang : Read data from config file and assign to variables
+8.4k Golang : Convert(cast) string to int64
+8.9k Golang : Get current, epoch time and display by year, month and day