what do you guys think? Asking the question, and closing as a duplicate? Or editing the question it is an effective duplicate of. They are slightly different in terminology, but the answers apply equally well to both
The new question title would be short and sweet and to the point for newcomers though, and easy to find
And as a second note (and expressly pinging @Gilles due to the experience in cross-SE work), I just asked a question on law: law.stackexchange.com/questions/1410/… that is also interesting for here. Would it be a good idea to reach out on them on meta to discuss the limits of their on/off topic and our on/off topic, and how we can mutually benefit from each others off-topic questions?
free as in beer and free as in speech is more of an answer "What is the difference between freeware and free software?" than it is a duplicate question
Feel free to edit the question by the way. It's no longer possible to mark your own question community wiki, but it is my intent. Right now it's very short, but I don't know if/how making it longer will make it clearer
@Zizouz212 I was just asking here in chat if we should. I think it would be nice if law does at least know we exist and what our scope is, and that we welcome questions that are in it, but not a good fit for them
you could imagine some other interface (which doesn't exist in java or swift for example), that has a type parameter that is constrained to have some(unspecified) type parameter itself
implementation: static A anothersecret<A, B>(A p1, B p2) { return anothersecret(p1, p2); }
this is somewhat devious, but there is a good compromise for allowing this
allowing indefinite recursion allows a language to tackle a greater class of problems. If the language doesn't have a construct that allows to effectively do this, the language can't be made Turing complete
so we can live with that.
it could also crash the program
implementation: static A anothersecret<A, B>(A, p1, B p2){ throw new RuntimeError(); }
this lets you do whatever you could do before with exceptions
it's called a 'discriminated union'
or sometimes 'Either'
convention holds that what you want to return is Right, and what you don't want (what's left) is Left
static Either<A, Error> anothersecret<A, B>(A p1, B p2){ ??? }
now you can have two implementations
static Either<Error, A> anothersecret<A, B>(A p1, B p2){ return new Right<Error, A>(p1) } or static Either<Error, A> anothersecret<A, B>(A p1, B p2){ return new Left<Error, A>(new RuntimeError()); }
these are obviously all very trivial examples. But in the face of complexity, it helps you a lot if you know things about your code to be true, other than hoping it is implemented correctly
and all those silly things. Methods on objects. Runtime reflection. not breaking parametricity
in all languages that allow for simple ways to do that, there are thick best-practice guides
that say "don't ever do that"
well, if you shouldn't ever do it, don't put it in your language.
"but it's so easy for newcomers"
who you then have to tell 3 months down the road that they should have known never to do that
I never properly understood the use of the finally statement. Can anyone tell me what the difference is between:
try {
a;
block;
off;
statements;
} catch (Exception e) {
handle;
exception;
e;
} finally {
do;
some;
cleanup;
}
on the one hand and:
try {
...
Yup, since I happen to have struggled with the problems CC0 have created for people distributing recorded music in Norway, I wonder if you have any questions that are peripheral to your question about the PD.
We need to focus now on promoting the site to everyone, because our artificial questions pertain to our area of expertise: which is software development for the majority of us
There is a couple of reasons for that. Firstly, The Free/Open movement grew out of open software, and it's the oldest, best known, and probably still largest component of the culture
secondly, SE grew out of StackOverflow, which still means a lot of people on stack exchange have a programming or at least IT background