JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • &x and *T: addresses, dereferencing, and the nil pointer

    Go SELF
    19 level,0 lecture
    We break down pointers in Go without mysticism: what the type * T means, how the address-of operator & works, what dereferencing * p does, and why the nil pointer is dangerous when reading. With small examples, we’ll show in-place changes via & balance, print an address via fmt.Printf ( "%p" , p ), and explain the mechanics of fmt.Scan ( & x ).
    Open
  • In Go, everything is passed by value

    Go SELF
    19 level,1 lecture
    We break down Go’s parameter passing model: why arguments are always copied, how “changing a variable” differs from “changing data at an address,” and where the “reference-like” behavior of map and slices comes from. With examples, we’ll show that pointers * T are also passed by value (the address is copied), why after append you often need return, and how, in a mini-project with a task list, to carefully combine []string and map [ string ] bool.
    Open
  • new(T) vs make in Go are different tools

    Go SELF
    19 level,2 lecture
    We break down how new and make differ in Go: what exactly they create, what they return ( * T vs a value of type T), and why slice/ map/ chan specifically require make. Using short examples, we’ll show new ( int ), make ( map [ K ] V ), working with append/ len/ cap, and common pitfalls like writing to a nil- map. At the end, we’ll assemble a mini TaskBox example: new for tasks and make for storage.
    Open
  • Escape analysis

    Go SELF
    19 level,3 lecture
    We break down escape analysis in Go at a practical level: a simple memory model stack/ heap, why the expression return & x is safe, and why new is not the same as “always heap”. Using the functions NewInt, addOne, parseOptionalInt as examples, we show when values “escape”, how to work with optionality via [] * int, and why you must handle nil correctly to avoid a panic.
    Open
  • Pointer pitfalls in Go: the address of a range variable

    Go SELF
    19 level,4 lecture
    We break down one of the most common “rakes” in Go when working with pointers: why inside a for range loop you can’t mindlessly take & v and expect changes to affect the original slice. Using examples with []string and []*string, we’ll look at the difference between the address of an element ( & tasks [ i ]) and the address of the loop variable, learn to diagnose the problem with %p, and also build a practical function FindTaskPtrs that returns pointers to the real elements of the slice.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush