LitMy.ru - литература в один клик

Know Go (Go 1.24 edition)

  • Добавил: literator
  • Дата: Сегодня, 06:30
  • Комментариев: 0
Название: Know Go (Go 1.24 edition)
Автор: John Arundel
Издательство: Bitfield Consulting
Год: 2025
Страниц: 165
Язык: английский
Формат: pdf (true), epub
Размер: 12.0 MB

If you know Go, then you need to know all about interfaces, generics, and iterators: they’re key parts of modern Go. Learn all about type parameters and constraints in Go and how to use them, with this easy-to-read but comprehensive guide to programming with generics and iterators in Go.

If you’re new to Go and generics, and wondering what all the fuss is about, this book is for you! If you have some experience with Go already, but want to learn about the new generics features, this book is also for you. And if you’ve been waiting impatiently for Go to just get generics and iterators already so you can use them, don’t worry: this book is for you too!

You don’t need an advanced degree in computer science or tons of programming experience. Know Go: Generics explains what you need to know in plain, ordinary language, with simple examples that will show you what’s new, how the language changes will affect you, and exactly how to use generics in your own programs and packages.

As you’d expect if you enjoyed my previous books, For the Love of Go and The Power of Go: Tools, this is fun and easy reading, but it’s also packed with powerful ideas, concepts, and techniques that you can use in real-world applications.

What you’ll learn:

By reading through this book and completing the exercises, you'll learn:

What we mean by generic programming in general, and specifically how that applies to Go
What type parameters are, and how they’re different from interfaces
How to declare and write generic functions, and when that's necessary (and when it's not)
How generics are implemented in Go, and how that affects the way we write programs
How to define and use constraints on type parameters, and what constraints are provided in the standard library and the Go language itself
How to write type element and type approximation constraints, as well as understanding the changes to interfaces
What operations are allowed on generic types, and how to choose the right constraints for them
How to define and use generic container types such as slices and maps, and add methods to them
How to use the new official cmp, slices, and maps packages, and how standard library APIs are changing
Where generics are useful and what new kinds of programs and packages we can write using them
What generics can’t do (at least in Go) and when it doesn’t make sense to use them
What iterators are, and how to create and use them, along with the new iterator APIs in the standard library

Who is the book for?
This book is for people who are new to the generics and iterators features in Go and want to know what they are, how to use them, and what they should do differently now that Go has them. If you have some experience using Go prior to the introduction of these features, and you just want to know what’s new, you’ll find everything you need to know right here.

If you’re used to using generics and iterators in other languages, such as Java or C++, and you’d like to know how that experience will translate to Go, this book is also for you. If you’ve considered using Go in the past but decided against it for one reason or another, maybe the latest changes will tip the balance for you. This book will help you decide whether you’ll be able to do what you want to do with Go.

And whether you have any experience with Go or not, you may be worried that these recent changes add unnecessary complexity to the language and will make it harder for you to understand, or even write, programs. This book is for you too! I hope you’ll find that generic programming in Go isn’t as difficult or complicated as it might sound. In fact, it’s extremely straightforward, when we approach it the right way.

Скачать Know Go (Go 1.24 edition)












[related-news] [/related-news]
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.