TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Gok – Webapps in Go the PHP way

8 pointsby saltcookieover 10 years ago

2 comments

btownover 10 years ago
The fact that a modern language encourages developers to do something like<p>``` func (self <i>Gok) SetCookie_4(name string, value string, duration int64, urlPath string){ ... } func (self </i>Gok) SetCookie_5(name string, value string, duration int64, urlPath string, domain string) { ... } func (self *Gok) SetCookie_7(name string, value string, duration int64, urlPath string, domain string, secure bool, httpOnly bool) { ... } ```<p>is simply baffling to me.
评论 #8311716 未加载
marcofisetover 10 years ago
No developer worth his salary is writing PHP this way anymore, so I just can&#x27;t understand why one would consider to do that with Go. Inline script tags are most of the time a very bad code smell. Unless you are extremely disciplined and use them only as a templating mechanism, which your library does not restrict at all, then it&#x27;s not so bad. You&#x27;re way better off using a templating engine.