Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
PySlice
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
PySlice
12y ago
Yes, bounds checking are unnecessary, you don't need those _s() functions - NSA director
2.
▲
by
PySlice
13y ago
However it's going to take some time to learn all the gotchas in string functions... Failing to zero-terminate strings (strncpy), potential buffer overflows (many), global internal buffer and overwriting an argument (strtok), etc etc e
3.
▲
by
PySlice
13y ago
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 programmer could fix, LOL. T
4.
▲
by
PySlice
13y ago
Yeah, it's so annoying. Everytime I go to the moon I remember how I hate that uneven gravity!
5.
▲
by
PySlice
13y ago
+1 just because of "I would personally prefer to tinker with a Brainfuck implementation than spend any amount of time in any bar"
6.
▲
by
PySlice
13y ago
I guess they just ran out of names, after deprecating java.util.Date (remember that there's also java.sql.Date).
7.
▲
by
PySlice
13y ago
Never using a space before the paren is more consistent. I don't know why people put a space there...
8.
▲
by
PySlice
13y ago
Same here...
9.
▲
by
PySlice
13y ago
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)
10.
▲
by
PySlice
13y ago
So enlighten me.
11.
▲
by
PySlice
13y ago
If programmers of functional languages were better at naming things, it would be easy. Let's rename g to callTwice and h to aFunction : function callTwice(aFunction) { return function(y) { return aFunction(aFunction(y)
12.
▲
by
PySlice
13y ago
Well, I guess this is going to be a fairly down-to-earth language.
13.
▲
by
PySlice
13y ago
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.
14.
▲
by
PySlice
13y ago
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 programming languages shou
15.
▲
by
PySlice
13y ago
> bring a knife to a gun fight > If the goal of the competition is to slice apples What?
16.
▲
by
PySlice
13y ago
Perl eats C++'s "most vexing parse" for breakfast.
17.
▲
by
PySlice
13y ago
The standard music notation and the criticism this new notation receives here look to me as if we were stuck for centuries with only one programming language, C++, and nobody could change it. Sure, it has been working fine for many years, a
18.
▲
by
PySlice
13y ago
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 more explicit to those w
19.
▲
by
PySlice
13y ago
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 know what "map" mean
20.
▲
by
PySlice
13y ago
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 some nice syntax suga
21.
▲
by
PySlice
13y ago
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 how data structure libr
22.
▲
by
PySlice
13y ago
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 the language, [2] dif
23.
▲
by
PySlice
13y ago
Which is better?
24.
▲
by
PySlice
13y ago
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 program in Java 5/6
25.
▲
by
PySlice
13y ago
> 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 designers need to get more pr
26.
▲
by
PySlice
13y ago
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 literals, then you get
27.
▲
by
PySlice
13y ago
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 indexing [] for collections,
28.
▲
by
PySlice
13y ago
To me, checked exceptions seem to be a second return value: you need to catch it or declare that you are going to pass it to the caller. In this sense, it is enforced by the compiler even more rigidly than the return values themselves. They
29.
▲
by
PySlice
13y ago
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 deadlock.
30.
▲
by
PySlice
13y ago
Orkut did have an edit button in the beginning, and it was removed afterwards (maybe it causes too much confusion?).
More ›