A Tour of Go for the C# Developer - Jeremy Clark - NDC London 2021

Ғылым және технология

Learning other programming languages enhances our work in our primary language. From the perspective of a C# developer, the Go language (golang) has many interesting ideas. Go is opinionated on some things (such as where curly braces go and what items are capitalized). Declaring an unused variable causes a compile failure; the use of "blank identifiers" (or "discards" in C#) are common. Concurrency is baked right in to the language through goroutines and channels. Programming by exception is discouraged; it's actually called a "panic" in Go. Instead, errors are treated as states to be handled like any other data state. We'll explore these features (and others) by building an application that uses concurrent operations to get data from a service. These ideas make us think about the way we program and how we can improve our day-to-day work (in C# or elsewhere).

Пікірлер: 10

  • @mackenmd
    @mackenmd3 жыл бұрын

    Superb Go into. Thank you very much!

  • 3 жыл бұрын

    Nice presentation. Thank you.

  • @filippopasseggieri1693
    @filippopasseggieri16932 жыл бұрын

    Thank you, Jeremy!

  • @TheSurvivor1963
    @TheSurvivor19638 ай бұрын

    The lecture is wrong about errors, errors are not glorified strings. They are structs/objects and are created by errors.New(string), which is not uncommon for any language with separate error-objects.

  • @justanaveragebalkan
    @justanaveragebalkan2 ай бұрын

    Want to remove an element from a slice, yeah... start writing because what's 1 liner in any language is a function here. It's good to know, and it lets you think about what you're doing, especially after you do it for the 100th time today. Probably at that point you start to consider your life choices and actually get a coherent general purpose language and give up trying to use system languages for APIs. C# much better than go in any aspect, not sure why people are even wasting their time chasing the trend...

  • @animatus
    @animatus Жыл бұрын

    You're having a brain freeze because it's a stupid delineation

  • @MagicNumberArg
    @MagicNumberArg3 жыл бұрын

    Go is kind of useless. It's from those times when every company wanted its own language without thinking "but why?" And it's difference from C# is mostly in features Go lacks. Otherwise - just another basic Garbage Collected language that somehow manages to be BOTH slower and less expressive then C#. If you really want to expand your horizons, for speed and safety take a look at Rust (as fast as C++ and yet memory/thread safe); for expressiveness - look at Typescript with its union and mapped types and string literal templates.

  • @relaxed-rider

    @relaxed-rider

    Жыл бұрын

    Been a C# developer for over 8 years who recently switched to Go I disagree.. This is true that it is less expressive but Go is definitely not slower sometimes even much faster and much easier too..

  • @tehseensajjad1003

    @tehseensajjad1003

    10 ай бұрын

    Damn two years ago was wild lmao

  • @TheOchita

    @TheOchita

    5 ай бұрын

    ​@relaxed-rider all c# good performance comes entirely from the admittedly good jit compiler, so benchmarks that involves simple math run a million times, they favor C# over Go, because Go optimizing compiler really is not that good, but that's something they've started looking at in 1.22 where you can enable the new experimental optimizer

Келесі