3 ms·
>It's a game of tradeoffs, same as everything else in nature, isn't it? My question is if tradeoffs are inherent in programming language design (some mathemati
by coldtea 12y ago
>It's a game of tradeoffs, same as everything else in nature, isn't it?
My question is if tradeoffs are inherent in programming language design (some mathematical inevitability) or due to lack of resources and other "real world" concerns that can be overcome given enough care and money.
I'm not convinced by anything that I've seen that we don't just have the latter.
E.g. one could say in 1995 "JS is an awful language for development, and it's unsuitable for anything that needs to be fast. It's an inevitable tradeoff, use the right language for that etc".
And then the big corps got interested in optimizing JS, and we can now write full 3D games, and even video encoding in it, and we have asm.js and the like that take the performance of JS 2-3x worse than C for most things, as opposed to 100 times worse back in the day.
And we got node in the server side, and tons of libs etc. And with ES6/7 we get tons of language improvements.
Even the "fundamental" issues with JS, like bizarro type coercion, global by default, no integer types etc, could be corrected, it's just compatibility concerns that makes us not fix them, not some inherent impossibility of getting a great language without those issues.
Heck, we could even introduce optional gradual typing for JS, if it wasn't for those backward compatibility concerns, and even AOT compilers to native code.
Those things maybe wouldn't make JS perfect and useful for everything, but it would make it an order of magnitude better than what it is.
And if we started from scratch, without all those compatibility constraints at all, we could get a new language pretty close to perfect with enough money and a great team.
>...and those are already some key decisions you made that reflect what's important to you personally. Every time you choose one of these properties, you open doors and close others behind you.
What door exactly closes? In the "mathematic necessity" way, not the "some people only like dynamic typing" way.
Because the thing under discussion was wether a language good for everything (or close to it) could be produced.
I chose those attributes not because I like them personally, but with this end goal in mind. Namely:
1) Without static types, you can't get the last mile of performance and safety checks, for using it for high performance apps and systems programming. They also help having a better IDE experience (autocomplete, suggestions etc) for those who like that.
2) If the types are not infered the language will feel too verbose and weighty to people wanting to use it for quick scripts and the like.
>you should also recognize that you are doing exactly the same thing as every single language designer in history.
Well, I don't have any beef with any language designer in history.
My basic problem with current languages is not that they made some choices, but that they didn't make some additional work they could PILE ON TOP of the previous choices and get much better.
- Udo 12y agoI think the issue here is that we have two opposing theses on how this works. I posit that the programming ecosystem is very much like any other ecosystem in that there is are many organisms within it, for a good reason. For example, looking at nature, you might ask yourself why biology hasn't converged on a single lifeform yet, and whether it's not simply an issue of having all the right genes and discarding those that are not so good. But that's obviously not how it works. There are niches and different strategies for solving different problems. There is no one genome that solves everything. And yes, every single codon is a decision that opens doors and closes others as well. If I understood you correctly, your position is the inverse of that thesis. You argue that there is a base abstraction that should work equally well in every context, and that specialization could come in the form of optionals piled on top of the one true base. There is no mathematical reason why this should be unworkable, but a solution so far eludes both programmers and evolutionary processes alike. That doesn't mean you shouldn't go ahead and try solving it. It's a worthy project. If you believe you can come up with common denominators that cover all aspects of all previous languages, by all means: give it a try!
- deleted 12y ago[deleted]
- coldtea 12y ago>For example, looking at nature, you might ask yourself why biology hasn't converged on a single lifeform yet, and whether it's not simply an issue of having all the right genes and discarding those that are not so good. But that's obviously not how it works. There are niches and different strategies for solving different problems. There is no one genome that solves everything. And yet, nature already has "converged" sort of into humans, who are "master of all trades" sort of, and somewhat analogous to the "full-spectrum language" I'm talking about. And as with that language and other languages, the existence of humans doesn't mean all other lifeforms will perish or dissapear. >* There is no mathematical reason why this should be unworkable, but a solution so far eludes both programmers and evolutionary processes alike.* Well, for evolutionary processes we have humans. And soon, if we are to believe some pundits, the "singularity". As for languages, we have some near damn all rounders, but my observation is that it's not because it has "eluded programmers" that we don't have it, but because of business reasons (e.g. some company wants to only target segment X), oss being underfunded, narrow scope, etc.