PeterGriffin
Joined 12 years ago
Joined 12 years ago
EDIT: Ok this is starting to get a little weird. What's with the comical negative overreaction to my posts. What exactly did I say to warrant that?
When writing posts and news, typically you want the headline to focus on a new feature, a new app, or if it'll be a number, focus on a meaningful number, like number of users, something that could engage those who aren't engaged right now.
Way it is, a birthday party of some company I know little about is someone else's party, and I won't even open the article.
But computer languages, unlike human languages, are precise. Their intent is clear. And you'll never encounter a case where the Python 3 interpreter hasn't heard of that particular Python 3 keyword you're using.
It's also not an excuse to avoid certain features of a language, when using them leads to a better and simpler solution, just because they're less popular. Programming is not an exercise in popularity.
On the other hand, human language is fuzzy and full of phrases that consist of statements having nothing to do with their meaning. Such as me saying "your argument doesn't hold water".
Human languages also have additional layers entirely separate from the primary meaning of a conversation, such as sending social cues like "how smart am I", "do I like you", "do I fit in this group", and "am I a leader or a follower". Each layer of concern drives a certain way of expression and imitation, none of which occurs (or should occur) when writing computer code.
A better example to compare to programming code would be mathematical notation. As long as you express your intent shortly, using the available mathematical notation, people will be fine, and your intent will be clear.
I've never seen someone ask in a math forum if their formula is more Mathematic one way, or another way.
SQL is declarative only when you don't care about data integrity and performance.
Maybe a bit better example for this kind of behavior are compilers. They're pretty "declarative" these days. You write what code you want to compile, and the compiler will pass it through a thousand transformation stages, deciding which trick to apply at every instruction, which code isn't really needed and so on.
Of course, then you also need to deal with compilers getting it wrong too, so you start tweaking your code with special words like "volatile" and "restricted", mess with compiler options, and sometimes even disassemble code to see why turning the "fast" options makes your code slow. But in general, high quality compilers do this dance way better than SQL.
So what's the moral here? Two things.
First, calling something "declarative" doesn't really mean anything. It means the language is built on a very thick abstraction that lets the computer do more work than usual, so you can do less work.
Second, thick abstractions are leaky. Works for basic cases, past that you'll still end up doing a lot of work, but now you have to fight your computer while doing it, as well.
The Z3 Theorem Prover is an interesting toy, but I wouldn't trust it to do anything right in the real world. Much like most Microsoft Research projects, unfortunately.
Nothing.
This is hardly the first time this happens. There are about half a dozen cases of this kind in mainstream media every year. Plenty more go unreported. Nothing changes, because everyone feels comfortable being outraged talking about it, but they wouldn't touch the problem with a 20 foot pole when it comes to acting about it.
Don't ask what's "more Pythonic" or "less Pythonic", Python is not a cult, it's a very practical scripting language. Ask for benefits and weaknesses of a given approach in given circumstances.
I've tainted the Jesus of bookmarks by even implicitly suggesting in my post that they might be writing with the intention to be read. No, I suppose their intention is way more cosmic and godly than such low earthly concerns, how stupid of me.
Aight, aight. I never stop learning when I'm here on HN.