Hacker News new | ask | show | jobs
by terminalcommand 3255 days ago
I also think we should write our programs as concise and simple as we can. There should really be one obvious way to do it.

I recently read the statement that "If you can solve parsing Perl, you solve the Halting Problem "(http://www.perlmonks.org/?node_id=663393). This is not a joke, it's serious.

Python and Go keep their promise to stay simple. However I believe, metaclasses, asynchronous programming and constructs like "yield from" and the whole itertools library could be better engineered. And lastly with new approved PEPs like concerning string interpolation etc., I believe Python is making compromises in its core ideology. In contrast, in go if you want to allocate something you just use make(), if you want your code to run concurrently you just use "go", if you want to send messages between threads, you just use channels. The complexity is well hidden in the language itself.

What I don't like in Java for example is that, as a general purpose language, in each version new features are added. And these new features add complexity, and complexity leads to mistakes.

Perl I understand, it was designed as the first postmodern programming language. Javascript was written in a very short time and intended to be a browser scripting language. But Typescript?, with Typescript there is no excuse. I guess, this is Microsoft's policy: Worse is better, make everyone (or at least revenue sources) happy. You want feature x, they add it, you want lambdas, they add it etc.

Maybe I'm a bit tired of hassling through chaos, but I want my codebase to be structured. If I don't like an API, I take my time and write a simpler abstraction. One programming advice stuck in my mind from the Art of Linux Programming: you should focus on data structures (a.k.a structuring).

I think this advice is true for all aspects of life. You need to set aside a place for your things, if you want to live/work in a tidy environment. You need to plan your day, if you don't want to fall apart. You need folders to organize your e-mail/documents. You need to structure your programs in meaningful abstractions into seperate modules/subroutines.

1 comments

To be fair on typescript, I think it's inheriting most of these issues from wanting to give a better way to do things, but keeping (near-)full backwards compatibility with JS.

It's ES5, ES6 etc that is adding to it.