Live data from Hacker News

Underscore.go

tobyhede.github.io

11–20 of 62 posts

Re: Underscore.go

#13
post #2

Underscore was chosen in JS presumably because it is a valid variable name that isn't used for anything. Underscore in Go actually means something, which is why this is actually double -underscore, which makes it even visually more confusing. The approach is interesting, but I'd really rather see a better name.

It's Python all over again.

Re: Underscore.go

#15
post #2

Underscore was chosen in JS presumably because it is a valid variable name that isn't used for anything. Underscore in Go actually means something, which is why this is actually double -underscore, which makes it even visually more confusing. The approach is interesting, but I'd really rather see a better name.

Module systems really ought to allow renaming on import. (Such as: rename individual functions, add a prefix to all of the functions, or even do a regexp style replace of all existing prefixes if any.)

But unfortunately, from a quick glance it looks like Go's doesn't, is that correct?

Re: Underscore.go

#16
post #2

Underscore was chosen in JS presumably because it is a valid variable name that isn't used for anything. Underscore in Go actually means something, which is why this is actually double -underscore, which makes it even visually more confusing. The approach is interesting, but I'd really rather see a better name.

Module systems really ought to allow renaming on import. (Such as: rename individual functions, add a prefix to all of the functions, or even do a regexp style replace of all existing prefixes if any.) But unfortunately, from a quick glance it looks like Go's doesn't, is that correct?

It does. See http://golang.org/ref/spec#Import_declarations

Re: Underscore.go

#17
post #2

Underscore was chosen in JS presumably because it is a valid variable name that isn't used for anything. Underscore in Go actually means something, which is why this is actually double -underscore, which makes it even visually more confusing. The approach is interesting, but I'd really rather see a better name.

Module systems really ought to allow renaming on import. (Such as: rename individual functions, add a prefix to all of the functions, or even do a regexp style replace of all existing prefixes if any.) But unfortunately, from a quick glance it looks like Go's doesn't, is that correct?

You can rename the package on import http://play.golang.org/p/V01jD_EZyX

Re: Underscore.go

#19
Underscore is not a perfect fit for JS, but it's close enough; if you like coding in the style Underscore promotes, Underscore.js makes Javscript programming simpler.

Underscore seems like it would not at all be a good fit for Golang. Golang really wants you to just use a for-loop.

Post reply on HN