Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I would rather spend my time writing generic, elegant functions that help developers think deeply and correctly about their programs. Like Alex, falling back on for-loops and mutable state makes me feel like a bad programmer. But there is a certain tension between all that and shipping things today.

(Emph. mine)

It hits the nail on the head: there's a certain tension between speed and correctness. For some, there's never enough time to do the right thing, but always (inevitably) enough time to keep fixing a wrong thing.

There are also diminishing returns of typing imperative code fast top to bottom, but having to deal with constant boilerplate and manually checking things that a machine could check, were the language more expressive.

Somebody called Go "systems PHP"; I think it's very fitting.




Ehhh I dunno about the PHP thing. I can see what you mean, but there’s a certain negative implication to it which isn’t accurate. PHP is bad because it’s inconsistent and doesn’t really have a coherent design. You can tell that it evolves by having things bolted on to it, and there’s all sorts of weird dark corners. Go really isn’t like that at all.


I disagree that Go isn't like that at all. On that contrary, that's exactly how I'd describe it. It's the jankiest language after PHP.

I think people coming to Go are coming from at least 3-4 different angles and it dictates their judgment.

There's people coming from languages that aren't statically type checked, from javascript to python. They like doing systems programming and having real concurrency. They like the plain style. They don't notice how weak Go's type system and abstraction faculties are, because it's already better than nothing.

There's people coming from C, who really like some things like easy concurrency, easy compiling, a package manager, and automatic pointer de-referencing, and (where applicable) GC.

There's people coming from C++ who will like the return to simplicity, but also hate it.

There's people coming from JVM and .NET who are just going to dislike almost everything about the language ergonomics of Go. You can get an actor model library and write those languages almost exactly like Go if you want to (without the bad syntax) but nobody does, because it's worse.

From my perspective, I wish people would stop complaining about Go's lack of generics. It's really an understatement. The real problem is Go basically doesn't have a type system.


I came from Java and don’t really miss anything most of the time. What you get out of the simplicity of the libraries and raw productivity more than makes up for the lack of OO features (which are abused and misused more often than not in static languages anyways). I don’t need an actor model, and I don’t miss Futures or RxJava stuff either. Channels and goroutines are plenty good enough for the vast majority of use cases. If the type system is really so bad that it basically doesn’t exist, I must be a godlike programmer to rarely have my Go code do something I don’t expect. The end product has always been stable, easy to read, and easy to debug in my experience.

Perhaps if we were to rebuild the ecosystems of each platform today things would look differently, but Java has so much baggage and shitty library APIs that it’s almost as if everything were written to abstract ideas with no regard for the human programmer using the final product. Even if your assertion that Go is the jankiest language after PHP aid correct, it basically doesn’t matter because it’s ecosystem is much more pleasant to work with than Java’s.


> The real problem is Go basically doesn't have a type system.

I don’t understand what “basically” means in this context. If you mean to say that Go’s type system isn’t formally sound, I think it would be better to argue that than to argue that it essentially has “no type system”. That strikes me as a very weird thing to say in general.


Go has plenty of weird, inconsistent dark corners. To name one off the top of my head, indexing a value in a nil map returns a zero value, while indexing a value in a nil slice panics.


>PHP is bad because it’s inconsistent and doesn’t really have a coherent design.

Same for Go. Built-in special case generic behavior -- but only for specially blessed types, and many other things besides:

https://medium.com/@tucnak/why-go-is-a-poorly-designed-langu...


I do not think an equivalence class of "incoherent languages" that includes Go and PHP is a reasonable place to argue from.


Comparing to PHP, I mostly mean the mindset: the no-frills, "just code it in a few hours" approach. Solving the problem with the minimum care of any abstraction. It works pretty well for simple scripts.

The problem is, of course, that the scope grows, and with it, the need for more powerful tools. Go does not have C's macros (phew), but has nothing else either, so people end up writing code generators.


Ahh okay, I get it. This is pretty accurate. I do think they arrived to that from different places though. PHP being more about getting shit done and iterating quickly, and Go having the opinion that the wrong abstraction is worse than no abstraction at all. In Go’s case, it’s more of a reaction against the overuse of abstraction and GoF patterns in C++/Java/C# IMO.


I disagree that PHP does not have a consistent design. Since PHP 7 they have been intentionally removing all old PHP warts and pushing the language to real consistency. They even have an RFC process now for proposing new features from the community so they can be more responsive.

It’s not statically typed like Go but it’s far from inconsistent IMO


https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

> Unlike (literally!) every other language with a similar operator, ?: is left associative. So this:

  $arg = 'T';
  $vehicle = ( ( $arg == 'B' ) ? 'bus' :
               ( $arg == 'A' ) ? 'airplane' :
               ( $arg == 'T' ) ? 'train' :
               ( $arg == 'C' ) ? 'car' :
               ( $arg == 'H' ) ? 'horse' :
               'feet' );
  echo $vehicle;
> prints horse.

In what world is this sane language design?!


I do PHP a lot and it is extremely inconsistent. Even PHP7. Like half of standard library uses _ and other half does without them (var_dump(), phpinfo(), gettype(), get_class()). Half uses to other half 2 (deg2rad(), strtotime()). So many bugs because of comparsion and operators doing wierd stuff.

PHP is mad. I think they have to keep it for legacy reasons.

Don't get me wrong i think the way php handles requests is useful for the small websites i create and i would probably not use any other language for that. But PHP is THE dirtiest most inconsistent language that people actually use.


Perhaps I have a little bit of a knee jerk reaction. I've gotten a new job where I have to do php development pretty heavy, and I haven't done it since I was 19 when I was interning at my first programming job and I absolutely hated it. Back then php 5.5 I think was the latest version and it just felt incredibly impossible to get anywhere with it. It wasn't long after that I moved to Python. I only recently got a different job all these years later where I am doing it again but PHP 7 is just so much better. 7.2 in particular even though its a point release has even done a lot to improve it.

So I feel like there is this level of people who look at people who have to do PHP and actually enjoy it (and I have to say I am enjoying it, warts and all. Drupal is OK but where it really shines is https://laravel.com ) like we aren't 'real' programmers unless we somehow know its a terrible language and are only doing it because we have to.

I really like it.

With that said, if I'm being completely honest here, there are parts of the PHP community that just down right drive me nuts. There are a lot of scammy companies out there trying to sell PHP solutions that are such garbage. Its like JavaScript. PHP does have a low barrier to entry (but a high bar to being good at wielding it, much like JS. You could probably make this argument for a lot of web tech in general) that all kinds of people use it and really feels like it sullies the language quite a bit and some of the community around it.

Alas however, much like everyone hating jQuery without ever actually explaining themselves or what is the technical aspects of jQuery that make it so undesirable, PHP occupies the same space: everyone loves to hate it, it seems.


I feel confused. Are you really saying that your justification for PHP having a consistent design is that, on its seventh major version, twenty years into its lifetime, an effort has been started to attempt to establish consistency by removing some old features, and adopting a community RFC process, or am I misunderstanding your claim here?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: