Hacker News new | ask | show | jobs
by tasuki 2209 days ago
Would you agree that a language X can be objectively superior to language Y?

I worked with PHP professionally for some 10 years, with very competent colleagues from whom I've learned a lot. The PHP ecosystem with Composer and Symfony components is quite good. Still, PHP itself is a terrible language. I have less knowledge but a similar opinion of JavaScript. Doesn't mean people working with PHP or JavaScript are losers - I admire their tenacity and do feel a little bad for them.

2 comments

The point is that a language can evolve so much they are not even the same language. I prefer ES2016 to Python for example.
Eh, the weak typing intrinsic in JS still makes Python win out between those two.
That really is use case dependent for me. In the context where I have made a thoughtful choice to use a dynamically typed language, I find strong typing seems to make things unnecessary clunky with not much gain, especially in webdev dealing with a lot of JSON and UI display. And if I’m in a situation where JS/dynamic language is not a good choice then I prefer a real statically typed language, not a middle-ground.
In what situations do you find weak typing useful? I've only ever had it introduce bugs and not make my life any easier. Meanwhile dynamic typing makes it a lot quicker to prototype things (vars that can be null or an int, for instance).
Python turns you into someone who cares how many invisible characters and of which type for each line you code. Weaking typing vs strong typing is the least of your concern
You (should) do that in other languages too. I'm not a fan of the way Python does it, but 1. it's not like you decide tabs vs spaces anew on each line, and 2. this is simply not a practical issue, unlike weak vs strong typing.
Numpy wouldn't work in JS because you can't overload operators afaik. Numpy/scipy are reasons why many people love Python.
It would work. All those overridden operators are just functions. It wouldn't be as concise or as intuitive though.
Yes, that was the point ;) Both languages are practically Turing complete so they are equivalent if you're just interested in what you can build with them.
Ah ok, by "numpy wouldn't work in JS" you meant something like it wouldn't be popular or as loved. Makes more sense now.
Terrible compared to what? What do you find a better language? What makes a language terrible for you?

Is COBOL terrible or C Or Go?

Good questions, not sure I can answer satisfactorily :)

> Terrible compared to what?

Terrible compared to other available programming languages.

> What do you find a better language?

Lisps, Haskell, Erlang, Rust, but even eg Python, Ruby, C, Java.

> What makes a language terrible for you?

Allowing me to do unreasonable things and resulting in unreasonable behaviour. Eg JavaScript:

[] + {} == [object Object]

{} + [] == 0

> Is COBOL terrible or C Or Go?

Programming languages are products of their time and context.

When COBOL was created, it might've been the best there was. By now, I think COBOL can be considered worse than many alternatives. If someone decided to write a non-toy greenfield project in COBOL today, I'd be surprised and might question their sanity.

C has two things going for it: it's a simple language and it's close to the hardware. I wouldn't call it terrible.

Go, now I really dislike Go, but I think there might be situations where it's the right tool for the job. Simple web services perhaps?

PHP was terrible already when it was created. I don't hold that against Rasmus, he just wanted to get simple things done, and didn't even intend to create a full-fledged programming language.

JavaScript... Brendan Eich wanted to put Scheme scripting in the browser, but because Java was popular, he was told by management to make it look more like Java and also to call it JavaScript. Oh also he had like a two week deadline or something.

Yea, I dunno... good hard questions :)