Тёмный

The Go Language: What Makes it Different? - Jay McGavren 

ChariotSolutions
Подписаться 9 тыс.
Просмотров 62 тыс.
50% 1

The Go programming language emphasizes simplicity and speed. Common programming mistakes are detected by the compiler. The language itself encourages proper error handling. It has first-class concurrency support using goroutines and channels. And on top of all this, Go offers lightning-fast compilation and execution. This talk will cover all the unique features that could make Go the ideal choice for your next project!
Philly ETE 2019 Playlist: • Philly ETE 2019
On the Chariot Solutions site: chariotsolutions.com/screencasts/

Наука

Опубликовано:

 

9 май 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@catwhisperer911
@catwhisperer911 Год назад
I. had spent most of the '80s and '90s coding in C and C++ and I have to say that I am loving the Go language. I was anticipating investing my time in Rust but, for me at least, Go makes much more sense for the applications I write. Go is just awesome and I think it has a very unique place in the developer stack, between C/C++ and interpreted languages, which makes it ideal for performant application development.
@abcdefg-nu4xj
@abcdefg-nu4xj Год назад
could you elaborate more about where Golang makes more sense over Rust, or were Rust could make more sense over Golang in your opinion?
@DagangWei
@DagangWei 5 лет назад
Fantastic talk for me Go beginner!
@priteshugrankar6815
@priteshugrankar6815 4 года назад
Wish more Golang talks were like this...
@pss_crs
@pss_crs 2 года назад
43:00 Channels can close sender or receiver but the go idiomatic/recommended sender will close. Use close() function for it. ⬇️ chn := make(chan int, 5) --- Code.. --- Close(chn)
@broyojo
@broyojo 3 года назад
I still feel like not using a variable or import shouldn't be a compile error, maybe only a compiler warning. maybe gofmt would remove the extraneous stuff or the compiler would optimize it away? I feel like it will obstruct creative flow when you have to remove lots of code just to test something out, then to ctrl-z everything back.
@fernando-loula
@fernando-loula 2 года назад
I see no reason why it can't seamlessly be optimized out. Feels like needless compiler intrusion.
@broyojo
@broyojo 2 года назад
@@fernando-loula maybe go wants to promote clean code since could easily optimize unused imports or variables
@Megalcristo2
@Megalcristo2 2 года назад
That is because no one listen to warnings. It's not very rare to compile open source code and find the "warning: variable not used".
@Qrzychu92
@Qrzychu92 2 года назад
One option would be to have it as a warning in debug build, and error in release
@FPChris
@FPChris 2 года назад
This drives me nuts. Let the programmer decide. A warning is fine.
@BryanChance
@BryanChance Год назад
Two deal breaker: 1) "import and not used", 2) Declared and unused variable, 3) ...
@gcxs
@gcxs 4 года назад
Nice talk but select statement is also worth noting
@erikecoologic
@erikecoologic 2 года назад
24:32 > "Go implements composition over inheritance at the language level." - I don't get it, looks like multiple inheritance to me, what am I missing?
@ITech2005
@ITech2005 2 года назад
Thats not inheritance dude. Landmark doesnt implement or extend Coordinates. The only relationship there is that Landmark INCLUDES a Coordinates object in its type definition. My only gripe here is them making it seem like some special feature of Go when you can also do this in other languages like Java. In other words, the lack of inheritance is treated like some additional feature. This may be where the confusion is happening.
@Megalcristo2
@Megalcristo2 Год назад
You can't do dynamic polymorphism with composition. If you have the class "Human" and then creat "Male" and "Female" which inheritance form "Human", you could create a vector of "Human" and add "Male" and "Female" items. Also you could pass to s function that receive a "Human", a "Male" or "Female". But composition doesn't allow you to do that. In Go you would use interfaces. This is better overall, because you have 2 independent features, instead of one that is bloated and hard to maintain. Maybe inheritance might be better in some cases, like videogame development, byt composition + interfaces (duck typing) feels more lightweight and make you approach your code differently.
@MrCoOrtexX841
@MrCoOrtexX841 4 года назад
not a web dev, but the purpose of request in paramater at 17:57 ? it's not used after in the code function, i don't understand
@leo69105
@leo69105 4 года назад
Probably for the type of the procedure, so you can pass it to HandleFunc on the next slide.
@TheSurvivor1963
@TheSurvivor1963 3 года назад
This demo shows only extremely simple examples. The request-parameter may f.ex contain query-, path- and post-parameters that you will need in a proper web-application. If an application also accepts f.ex JSON it will need to read the request-body.
@DagangWei
@DagangWei 5 лет назад
30:17 seems there is no guarantee for the order, e.g., the 1st size might not be from the 1st page.
@TheSurvivor1963
@TheSurvivor1963 3 года назад
That's right, but there are other ways to fix that,- but why not design you program in such a way that order doesn't matter? ;)
@OMGclueless
@OMGclueless 3 года назад
This is by design. The point is to be efficient and run the three requests concurrently, and respond to them as they come in, in whichever order they come in.
@luizfelipels7
@luizfelipels7 3 года назад
Wrong output @ 33:23 ?
@chuganator
@chuganator 4 года назад
5:08 "We all know how to clean up after, still its so nice not worry about it" . People are in silos. Lol
@mikasd9
@mikasd9 2 года назад
We all know how to do it yet it's still the biggest software issue to date
@1wisestein
@1wisestein 3 года назад
18:49 wtf, is that an inline anonymous struct definition no AND instantiation, immediately assigned to a variable? Dense.
@enriquebenedicto9429
@enriquebenedicto9429 4 года назад
I do not like using return values for errors. What a pain in the a$$ to always check for returned errors. Just at 16:26. Maybe there are cleaner way of checking for them.
@wilsonfreitas8418
@wilsonfreitas8418 4 года назад
A large sized project would require hundreds of lines of code just to check for generic errors. Maybe go was designed for specific use cases where there are no large call stacks. A generic error handler is extremely effective for web applications. I can't imagine how this return value approach would be better.
@beatricemeyers4640
@beatricemeyers4640 4 года назад
@@wilsonfreitas8418 Go is modeled after the C mentality where errors should be handled as soon as they happen, preferably recovering from expected errors and continuing on without crashing. Errors can be compared (equality) with other errors just like you might do with integer error codes in C, but with the added benefit of built in textual error messages and a host of other new features added in Go 1.13. You can easily declare different errors as package variables to make error-checking far less generic. In practice, most errors are handled by the function caller rather than being passed back up the call stack. If the error needs to be passed up further, it is common practice to return a new error which is more specific to the context of that function or package than the previously encountered error. This can help significantly to reduce all of that generic / ambiguous behavior.
@wilsonfreitas8418
@wilsonfreitas8418 4 года назад
@@beatricemeyers4640 I get that. I agree with the benefits of taking care of errors as soon as possible, but if you have to write error handlers for every single function that is a lot of lines of code not really related to the problem you are trying to solve. I believe the reason for this approach is to streamline the concurrency support. And I can see how that helps. But it is not a good path for code simplicity.
@beatricemeyers4640
@beatricemeyers4640 4 года назад
@@wilsonfreitas8418 We don't return errors for every function. Functions are written whenever possible to avoid returning errors. This is part of the reason for handling them immediately when they are encountered: the caller doesn't need to know that an error occurred if it was recovered from.
@wilsonfreitas8418
@wilsonfreitas8418 4 года назад
@@beatricemeyers4640 here is a very common scenario in web applications. 1. User submits a request, 2. A request handler receives the parameters and invoke some business layer function, 3. The business layer function performs some complex logic that includes invoking multiple functions and this can many levels deep. The user is waiting for the request to complete and needs to know if it worked. How would you report back to the user an error that happened many layers down?
@SB-rf2ye
@SB-rf2ye 2 года назад
"encourage you to explicitly check for errors" no ... not encourage ... you force the devs to do so.
@Megalcristo2
@Megalcristo2 2 года назад
You just have to be explicit when ignoring errors using value, _ := foo()
@FPChris
@FPChris 2 года назад
What if you had 30 RGBA defined globals that aren’t used? Super annoying
@Cylain
@Cylain Год назад
constants can be defined without being used
@HiddenLotus9
@HiddenLotus9 2 года назад
Content is good, but speaker would have been slightly better served rehearsing it or by using a script
@defabc8572
@defabc8572 4 года назад
과제 ㅎㅇㅌ! :)
@thatkindcoder7510
@thatkindcoder7510 4 года назад
*Visual confusion*
@FPChris
@FPChris 2 года назад
Just have slices or make arrays dynamic. Both seem pointless
@user-zd9wd
@user-zd9wd 3 года назад
I used to write go code but the switched to rust; Can only recommend rust but Go is nice too
@unknownsoul7043
@unknownsoul7043 3 года назад
i am sold when i see you can parse a string to bool in GO, i am done Go Vue is the way to go sorry
@ms77grz
@ms77grz 6 месяцев назад
👍👍
@stephendelacruzone
@stephendelacruzone Год назад
💎✨👍
@soho1080
@soho1080 4 года назад
W The fuck does one need to invent a new PL every fucking weekend.
@megetmorsomt
@megetmorsomt 9 месяцев назад
It was "invented" 13 years before this comment...
@abdlhamidwaziz9164
@abdlhamidwaziz9164 Год назад
hello gir go😅
@LaPingvino
@LaPingvino 4 года назад
I generally consider the way Go does OOP as the only way that is useful and acceptable xD
@richdobbs6595
@richdobbs6595 4 года назад
Hmmm. I guess you consider the vast amount of OOP code written in other languages to have not been useful. That seems like an extreme position.
@LaPingvino
@LaPingvino 4 года назад
@@richdobbs6595 No, not that the resulting code is not useful, I just consider the OOP element syntactic grease.
@richdobbs6595
@richdobbs6595 4 года назад
@@LaPingvino Well, you can call higher level languages as syntactic grease on top of assembly language. But there seems to be a lot of folks that use that grease to make things go smoothly. I have tended to avoid much use of inheritance, but the general ideas of associating methods with chunks of state has seemed useful to me in solving a lot of issues and making code easier to understand.
@LaPingvino
@LaPingvino 4 года назад
@@richdobbs6595 Yep, but that is not what OOP is originally as a design method or what those languages are originally made for. the way it does work is exactly distilled in Go. Disclaimer, I'm a programmer since my 8th but as I never had a formal programming education I managed to skip OOP as a main programming philosophy, growing up with imperative, procedural, functional and Go's way of OOP instead. I had a job programming in Common Lisp for example. All OOP-based code bases I saw or touched were an absolute nightmare. With syntactic grease I mean the evil equivalent of syntactic sugar: it is an abstraction on top, but instead of making it sweeter, it makes everything sticky.
@LaPingvino
@LaPingvino 4 года назад
@@richdobbs6595 I fully agree. But procedural languages already have that. C already has that.
@yapayzeka
@yapayzeka 4 года назад
go losts me at handlefunc function :D goodbye
@LaPingvino
@LaPingvino 4 года назад
That kinda grew organically out of the design. It's a jump in thinking, but really worth it!
@TheIsraelMendoza
@TheIsraelMendoza 2 года назад
👋 Bye
@nathanruben3372
@nathanruben3372 Год назад
I literally hate go syntax....
@terragame5836
@terragame5836 9 месяцев назад
Go code might be nice to read, but it's not nice to write. So I don't see why any independent developer would chose it willingly. I can see it being imposed by a project manager, but it's absolutely not something I'd use without being forced to
Далее
The Go Programming Language and Environment
41:54
Просмотров 20 тыс.
UZmir & Mira - Qani qani (Snippet)
00:26
Просмотров 526 тыс.
KO’P GAP ESHAKKA YUK!😂
00:57
Просмотров 948 тыс.
Webinar on Accelerate AI Transformation
2:01:00
Просмотров 1,6 тыс.
Python 3 Metaprogramming
3:00:24
Просмотров 243 тыс.
The Why of Go
48:47
Просмотров 173 тыс.
The One BIG Reason to Learn Google's Go Language
17:55
Просмотров 153 тыс.
10 Things I Hate About Go
30:48
Просмотров 8 тыс.
Плохие и хорошие видеокарты
1:00
Мой странный компьютер 2024
18:33
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
Просмотров 895 тыс.