Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prayag2003/go-the-next-gen-lang
https://github.com/prayag2003/go-the-next-gen-lang
go golang
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/prayag2003/go-the-next-gen-lang
- Owner: Prayag2003
- Created: 2023-02-23T17:54:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-07T07:43:42.000Z (11 months ago)
- Last Synced: 2024-06-22T15:50:54.963Z (7 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 1.25 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Golang
01-Basics
- Go is a compiled language and has different executables for different Operating Systems.
- It is an object oriented programming language but doesn't contain Classes and Objects , rather has Structs instead classes. The concept of overriding and overloading are also not present.
```go
package mainimport "fmt"
func main() {
fmt.Println("Hello , I am Learning GOLANG !!! ")
}
```- package main() is the entry point of the program
- Statically defined types : once a variable type is declared , it is fixed and hence type cannot be changed. Almost Everything in the Golang is a type.
Types Include:
1) String 6) Arrays
2) Boolean 7) Slices
3) Integer 8) Maps
4) Floating 9) Structs
5) Complex 10) Pointers-- Functions, Channels are types as well
- LEXER ensures the rules of Grammar are properly followed. Also takes care of semi-colons ;)
10-Slices
- Slices are similar to vectors in C++. They are much more powerful than arrays in Go.
- Append vs Make
Make : Allocates fixed memory
Append : Reallocates new memory, therefore making room for new elements
13-Structs
- Similar to classes in OOP languages
- There is no inheritance in Go, no Super or parent concepts