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

I'll take verbose and simple code over terse trickery every day.

People who disagree have never had to wake up at 3 in the morning to fix a critical production issue in someone else's code. And that someone else really loved "elegant and terse" code.

It's not fun to grok your brain around weird language trickery when you're half-awake and in a hurry to fix stuff before the customers wake up.



I personally think that writing so called "terse, clever" (misnomer) code, is not an issue with the language, rather the user. Do we really want to have worse tools, just because some people are writing bad code? Clearly it's an issue with the software engineering process rather than language itself. A good language should allow a skilled user to write code as clear as day, while properly modelling the problem domain and making incorrect states logically unrepresentable. We have a tool for that, type system and a compiler.


> Do we really want to have worse tools, just because some people are writing bad code?

People tend to write bad code. It's a fact of life. Tools forcing people who write bad code to write better code can't be worse tools by definition. They are better tools.


The fundamental issue is that humans contrary to machines will never know for sure whether whatever they do write is in fact correct code. One can think they are writing good and readable code, but that doesn't mean anything if the code is incorrect. And if you write lots of boilerplate that means more possible bugs. That's also why no one sane writes assembly (or increasingly these days C) unless they have to. We generally prefer more complex languages which put a constraint on the amount of possible bugs.


> is not an issue with the language, rather the user

Go actively prevents you from writing stupid code, it doesn't give you the tools to do cool code golf tricks


You don’t write terse tricky code. That’s just silly. But you can write beautiful Typescript constructs that are completely impenetrable but will disallow all wrongdoing.




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

Search: