Go Interfaces - HedgeDoc – Slide dkec on Go Interfaces I’m presenting today 👌
cool, what time and is it online?
@prologic@twtxt.net Nice! A few things (I can’t fix them myself I reckon):
- Code blocks would benefit from proper indentation.
- Interfaces have adverbs as names? I reckon they’re nouns instead.
- I don’t get what convention
ServeHTTP
is breaking here.
- Typo in section “Live Coding Time”: “its”.
- Typo in section “Receivers Matter”: “Pointer”
@lyse@lyse.isobeef.org Thanks for the review! I’ll quickly fix this up before the presentation today (midday) 😅 In terms of conventions and naming however, yes these are actually called “adverbs”. An adverb is a noun that describes a verb, usually be putting an “er” on the end of a verb. But thi doesn’t always work and sometimes it’s hard to do, so that’s why ServeHTTP
instead of Handle()
for the Handler
interface. Even though there is the Handle
and HandleFunc
function types 🤷♂️
Also the code-blocks not being indented properly is a bug with Hedge Doc’s display. When you go into “Slide Mode” it does render properly I think (I hope!)
@screem@yarn.yarnpods.com Really we’ll 😆
@prologic@twtxt.net Cool. Well, when I think of classic interfaces, then Reader
, Writer
, Seeker
, Closer
, Stringer
, Formatter
come to mind. Unless my definition of adverbs is completely off, these are nouns in my point of view. Granted, they end in er
and start with a verb, but they’re nouns. Adverbs are something different: https://en.wikipedia.org/wiki/Adverb Anyways, good writeup. :-)