Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NateDad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
63 ms
·
631.
▲
by
NateDad
12y ago
Go is not intended to be a fast and loose "bang it out in an afternoon" language. If you're comfortable with the language, then you can be really productive in it, but that includes error handling. You have to handle errors,
632.
▲
by
NateDad
12y ago
I should just stop making assumptions about python and assume that if there's anything you ever would like to do with python, that someone has already built it :)
633.
▲
by
NateDad
12y ago
There are some subtle differences.... but these would likely be exposed in almost any language with or without a VM. For example, when porting some of our Linux Go code to Windows, we realized we were renaming a file while we held the file
634.
▲
by
NateDad
12y ago
I didn't really know what eco-system you were talking about, so I looked at your comment history, from that I assume you're talking about Java. So, I really didn't mean to denigrate any communities or languages, there's
635.
▲
by
NateDad
12y ago
It's actually a really great fit for C# and Java developers too... C# guys like it because it's cross platform and they get to stop the madness of worrying about what version of the .Net platform is installed. It's also nice
636.
▲
by
NateDad
12y ago
All Go applications are statically linked. There are no libraries. It's a single executable that you can copy to your target machine and run.
637.
▲
by
NateDad
12y ago
Go applications require no installed runtime, they compile to native code. You can have no Go installed or any Go installed on the system, and the executable will neither know nor care.
638.
▲
by
NateDad
12y ago
Yeah, many of the ruby applications I've seen recommend RVM so that you can isolate yourself from the system-installed version of ruby. That's the nice thing about go - each application carries around everything it needs to run i
639.
▲
by
NateDad
12y ago
The parents rail against the new style of teaching because they were taught with the old style and never properly comprehended math other than by rote memorization. This is exactly the problem the new methods are trying to fix. I bet most
640.
▲
by
NateDad
12y ago
So, most functions return two things - output data and an error. You have to assign both to something, like this: data, err := foo() and go forces you to use variables somehow, or it'll give you a compile time error, so you can
641.
▲
by
NateDad
12y ago
My expectation is that they'll end up giving us something that'll make it easier to work around the lack of generics, but I don't know about getting actually full-on generics. Honestly, I don't want them - they make it
642.
▲
by
NateDad
12y ago
Intellisense is a good point. If you already have the variable there, getting the free "list of stuff I can do with this" can be pretty handy.
643.
▲
by
NateDad
12y ago
A minor nitpick - it's still type safe in Go, you can check the type of what's in interface{} and convert the value to that type. You'll never have to worry about getting complete garbage out. However, it's not pretty,
644.
▲
by
NateDad
12y ago
C# is a very good language. It's also ridiculously huge. There are so many language features, you could use a new one in every class and not run out until you'd rewritten Windows. I worked in C# for a decade, and I still have to
645.
▲
by
NateDad
12y ago
So, I think the key thing here is unboxed. You can write methods on values whose in-memory representation is the same as an int. It performs in all ways like an int (you can do arithmetic operations on it, etc). It's not boxed, th
646.
▲
by
NateDad
12y ago
This is awesome. fmt all the things!
647.
▲
by
NateDad
12y ago
btw, I don't know if it's just me, but I found it confusing that you had main.go in the subfolders... I generally assume main.go is only used in packages are that are executables, so it looked like the project had 3 executables in
648.
▲
by
NateDad
12y ago
gofmt without flags does not change your code. Yes, you can ask it to change your code if you want it to, but by default, it won't.
649.
▲
by
NateDad
12y ago
I didn't specifically take the time to make code that would break in python, obviously, I could, and it would be trivial to do so. Yes, it's just leading spaces that are different in Python, I know. I actually like python, but th
650.
▲
by
NateDad
12y ago
My car doesn't have a blender, a mini-fridge, or a hot tub. Some cars do. I don't think my car is worse off because of their lack. Along the same lines, my mother used to always buy cars that were manual transmission and without
651.
▲
by
NateDad
12y ago
This seems like a logical fallacy. Of course you have to separate your language's tokens with something. This is not "significant" whitespace. It's token delimiters, and they don't generally need whitespace. for
652.
▲
by
NateDad
12y ago
I'm curious to know what you think proper dependency management looks like.
653.
▲
by
NateDad
12y ago
Newlines are important, but that's true of pretty much every language. Go does have more stringent requirements on where open braces are placed, but it's not a hard rule to remember (they always go on the same line as the code tha
654.
▲
by
NateDad
12y ago
It's mainly a result of the morass of outdated banking regulations in the US.... any "new" bank would have to follow the same rules and would end up with the same problems.
655.
▲
by
NateDad
12y ago
This is a really good point.
656.
▲
by
NateDad
12y ago
The US's personal banking industry is like 20 years behind the rest of the developed world. Not sure why, probably because the banks have all the money to lobby to keep things the same.
657.
▲
by
NateDad
12y ago
Wire transfers tend to have a $35-$50 fee and require you to schlep down to the bank during business hours and fill out annoying paperwork. So, yeah, we don't use them except in emergencies.
658.
▲
by
NateDad
13y ago
Tabs are just customizable whitespace. If you like 6 space indents and I like 2 space, we can both be happy if it's tabs, and just configure our editors the way we like. With gofmt, there's no danger of mixing spaces and tabs (no
659.
▲
by
NateDad
13y ago
It's elegant, because all code generally lives in a repo online somewhere, and by having a canonical place for that code to live on your local disk, it's trivial to have code that references other code that lives online somewhere
660.
▲
by
NateDad
13y ago
I work on Juju, a 240k loc Go project which spans 4 executables across multiple machines all working in concert, coordinating through a replicated Mongo database. It's pretty big. Go was designed by people at Google for large projects
More ›