News for hackers. Stuff that matters.
Re:Why I Left Google by jemfinch on Thursday May 31, 2012 @08:37PM (#4051247)
Every time here at Google that I've started a project in Python, I've finished it in C++ because Python had neither the speed I needed nor the maintainability I wanted. Every. single. time.
Re:Why I Left Google by arkitaip on Thursday May 31, 2012 @08:41PM (#4051263)
I can understand the speed part but maintainability? Sounds interesting, would you like to elaborate?
Re:Why I Left Google by jemfinch on Thursday May 31, 2012 @11:11PM (#4051760)
Static typing is a godsend when you're working with code that you only vaguely remember from the last time you worked with it a year ago. It also gives me much more confidence when refactoring: the compiler will find the callsites I missed.
Re:Why I Left Google by yummyfajitas on Friday June 01, 2012 @08:49AM (#4053085)
C++ also has a great feature which a lot of more modern languages (Java, Python) have forgotten about: const correctness.

    class Foo {
        type_t getValue() const;
    }
When I call foo.getValue(), I can be certain [1] that foo has not been mutated.

[1] In C++, things like memset((void*)this, val, 1024) are always possible.

Re:Why I Left Google by heretohelp on Friday June 01, 2012 @04:39PM (#4055629)
>const correctness

I love that C++ programmers still believe in the false gods of the const keyword.

Zen: reflect upon the meaning of a const volatile pointer.

-> exits stage right

Re:Why I Left Google by herval on Friday June 01, 2012 @01:07PM (#4054465)
Won't proper testing help on that matter too?

I've worked on rather big projects in Ruby and Javascript, and testing always managed to keep things sane. Static typing helps you refactor things or make sure certain variables are the correct type, but in the grand scheme of things, I'm not sure type casting is the major source of bugs/errors in any system

Re:Why I Left Google by dmaz on Thursday May 31, 2012 @09:35PM (#4051445)
I do like Python but haven't used it for anything more than a few thousand lines.

The dynamic nature puts many errors into the runtime stage and increases verification complexity. Can be limited by static code checking, but grows cumbersome.

Re:Why I Left Google by swah on Friday June 01, 2012 @08:22AM (#4053014)
What do you use for longer programs?
Re:Why I Left Google by dmaz on Friday June 01, 2012 @03:51PM (#4055364)
Go if possible, C++ otherwise.
Re:Why I Left Google by djmdjm on Thursday May 31, 2012 @09:23PM (#4051410)
Duck typing makes for difficult debugging in large programs.
Re:Why I Left Google by philsnow on Friday June 01, 2012 @12:39AM (#4051998)
python's loose typing can cause some problems when new people start contributing to a sizeable project, that can be caught earlier in languages with stronger/earlier type checking.
Re:Why I Left Google by swah on Thursday May 31, 2012 @11:31PM (#4051815)
But isn't Java the middleground between those two?
Re:Why I Left Google by neild on Friday June 01, 2012 @01:48AM (#4052148)
Not even close.

I'd say Go is, though.