Yes, bounds checking are unnecessary, you don't need those _s() functions - NSA director
I think your comment is spot-on. A good Perl programmer can do wonders, but if you add just one average programmer to the team (without a very extensive training), he can write stupid things faster than the good…
Never using a space before the paren is more consistent. I don't know why people put a space there...
Same here...
I don't see how that invalidates my explanation In F# I would certainly call it "callTwice" too: let callTwice aFunction y = aFunction (aFunction y)
So enlighten me.
What one can learn from Perl: When programming in a language you hate, don't take naming arguments for granted. It could be worse: you could be programming in Perl, where all arguments come in a flattened array.
I don't think that is a misconception. Perl is the language with the highest occurrence of "subtle" and "ambiguous" in its documentation and tutorials that I have ever seen. Humans may be subtle and ambiguous, but…
> bring a knife to a gun fight > If the goal of the competition is to slice apples What?
Perl eats C++'s "most vexing parse" for breakfast.
After your excelent suggestions for names (makeMapper and makeGetter, they make everything easier, thank you), I'll try answering this, with a F#-like syntax using redundant parentheses around arguments to make them…
Your example is great, but it would be even more convincing if it used list comprehension syntax such as totals = [order.total for order in orders] (like some other poster in this thread did) Then you don't even need to…
Can I upvote you twice? More than once I have found about a new technique in language A and thought: "Wow, this is clever". Then sometime later I learnt language B where that technique is not only common place, but has…
I went in the other direction and it was enlightening too. I learned how useful hash tables can be, and that a word count algorithm need not be a complicated assignment full of segmentation faults. :-) I also learned…
That logic is just a starting point (just to avoid the "I don't need it, why can't you be just like me?"), not the whole thing. Then you have to take into account a few other criteria, such as [1] internal coherence in…
I remember some years ago when I was glad Java 5 had got some really practical new features. I didn't program in Java back then, but I wanted the language to evolve (maybe I was going to need it in the future). Now I do…
> Thus, getters and setters should not be encouraged. Damn, so why are they encouraged in Java? 11 out of 10 frameworks insist that you write getters/setters so properties can be accessed from outside. Java…
Me too. However, I don't think Java needs much to become an appealing language (for language-geeks). It's already going to get lambdas. Add some shortcuts for getters and setters (Lombok-style, maybe) and collections…
Yeah, I guess it sucks if you work with Bignums. I would be happy if BigInteger and BigDecimal were promoted String-level language support: still implemented as classes, but with compiler support. They could add…
I wonder what those dogmatic programmers do when they are confronted with a problem in the real world where they need to find a balance between "encapsulation" and "single responsibility". I guess their brains simply…
I like the fact that you can substitute a more complex expression anywhere, even in the first position (the function to be called), but everything looks so similar that it's hard to see what's going on. I read more code…
I have not written my first Go (or Scala) program yet, but I have written some F# code and loved the language (and the fact that everything is an expression too). It does have som complex features, and special syntax…
A desktop GUI in Python? Or a GUI in a web app? If you mean the former, have you tried wxPython? It comes with a huge interactive library of samples, where you can see the code and the resulting interface just by…
That looks nice, but I think it could be simply void bar(int myArray[10]), since C effectively ignores the number inside the first pair of brackets in a parameter list, they could have added some meaning to it. No need…
Why do many features added to C after the first standard have to be quirky and slightly incompatible (with C++, with existing implementations, etc.) like this? Other examples are inline (different from C++, makes use of…
Yes, bounds checking are unnecessary, you don't need those _s() functions - NSA director
I think your comment is spot-on. A good Perl programmer can do wonders, but if you add just one average programmer to the team (without a very extensive training), he can write stupid things faster than the good…
Never using a space before the paren is more consistent. I don't know why people put a space there...
Same here...
I don't see how that invalidates my explanation In F# I would certainly call it "callTwice" too: let callTwice aFunction y = aFunction (aFunction y)
So enlighten me.
What one can learn from Perl: When programming in a language you hate, don't take naming arguments for granted. It could be worse: you could be programming in Perl, where all arguments come in a flattened array.
I don't think that is a misconception. Perl is the language with the highest occurrence of "subtle" and "ambiguous" in its documentation and tutorials that I have ever seen. Humans may be subtle and ambiguous, but…
> bring a knife to a gun fight > If the goal of the competition is to slice apples What?
Perl eats C++'s "most vexing parse" for breakfast.
After your excelent suggestions for names (makeMapper and makeGetter, they make everything easier, thank you), I'll try answering this, with a F#-like syntax using redundant parentheses around arguments to make them…
Your example is great, but it would be even more convincing if it used list comprehension syntax such as totals = [order.total for order in orders] (like some other poster in this thread did) Then you don't even need to…
Can I upvote you twice? More than once I have found about a new technique in language A and thought: "Wow, this is clever". Then sometime later I learnt language B where that technique is not only common place, but has…
I went in the other direction and it was enlightening too. I learned how useful hash tables can be, and that a word count algorithm need not be a complicated assignment full of segmentation faults. :-) I also learned…
That logic is just a starting point (just to avoid the "I don't need it, why can't you be just like me?"), not the whole thing. Then you have to take into account a few other criteria, such as [1] internal coherence in…
I remember some years ago when I was glad Java 5 had got some really practical new features. I didn't program in Java back then, but I wanted the language to evolve (maybe I was going to need it in the future). Now I do…
> Thus, getters and setters should not be encouraged. Damn, so why are they encouraged in Java? 11 out of 10 frameworks insist that you write getters/setters so properties can be accessed from outside. Java…
Me too. However, I don't think Java needs much to become an appealing language (for language-geeks). It's already going to get lambdas. Add some shortcuts for getters and setters (Lombok-style, maybe) and collections…
Yeah, I guess it sucks if you work with Bignums. I would be happy if BigInteger and BigDecimal were promoted String-level language support: still implemented as classes, but with compiler support. They could add…
I wonder what those dogmatic programmers do when they are confronted with a problem in the real world where they need to find a balance between "encapsulation" and "single responsibility". I guess their brains simply…
I like the fact that you can substitute a more complex expression anywhere, even in the first position (the function to be called), but everything looks so similar that it's hard to see what's going on. I read more code…
I have not written my first Go (or Scala) program yet, but I have written some F# code and loved the language (and the fact that everything is an expression too). It does have som complex features, and special syntax…
A desktop GUI in Python? Or a GUI in a web app? If you mean the former, have you tried wxPython? It comes with a huge interactive library of samples, where you can see the code and the resulting interface just by…
That looks nice, but I think it could be simply void bar(int myArray[10]), since C effectively ignores the number inside the first pair of brackets in a parameter list, they could have added some meaning to it. No need…
Why do many features added to C after the first standard have to be quirky and slightly incompatible (with C++, with existing implementations, etc.) like this? Other examples are inline (different from C++, makes use of…