7,855 reputation
32972
bio website
location
age
visits member for 2 years, 10 months
seen 6 hours ago

0x2B | ~0x2B


Mar
8
revised What is Java's primary focus? Why does it take so long to get new features?
added 1 characters in body
Mar
8
revised What is Java's primary focus? Why does it take so long to get new features?
added 1 characters in body
Mar
8
answered What is Java's primary focus? Why does it take so long to get new features?
Mar
8
reviewed Leave Open What is Java's primary focus? Why does it take so long to get new features?
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
@Jarrod Roberson: Leonardo da Vinci: "Simplicity is the ultimate sophistication", Antoine de Saint Exupéry: "It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away".
Mar
8
comment Should developers be worried about automation that make them redundant eventually?
Don't worry, even if automation boosts our productivity by 100 times, we'll still be working 40 hours per week.
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
@SK-logic: I do not know where you got the information that CFG's are pretty dead. I have been speaking to a former colleague of mine who's been teaching compiler construction for the last 20 years and CFG's seem to be far from dead.
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
@Ingo: Lisp has a very simple grammar compared to other languages but it is still CFG. That's what allows to construct a fast parser that can recognize inductive (tree-like) program structures.
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
+1 for addressing this statement (Computers are powerful enough now days to be able to infer meanings from context). I think the reason why CFG's grammars are preferred is that they allow program structure to be defined inductively. I do not see why one would like to change this even in 100 years, maybe I just lack imagination?
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
"What non theoretical practical programming language": How do you define theoretical and practical programming languages?
Mar
8
comment What non-theoretical, practical programming language has no reserved keywords?
I agree with Jörg. I think one can speak about keywords when a language has tokens that must be defined explicitly as special to be distinguished from tokens with a similar structure. Different tokens lead to different syntax trees. For example, if in C would be a valid identifier if it were not defined to be special (a keyword). This means that if is not an identifier and if = 10 gives a syntax error. If I am not mistaken, Lisp's minimal syntax does not distinguish defun from f, x, y and + in (defun f (x y) (+ x y)).
Mar
7
reviewed Leave Closed Is memory management in programming becoming an irrelevant concern?
Mar
7
comment Helper static methods in TDD
If you think you should be able to mock these methods, then IMO they should not be static.
Mar
7
comment What are the most popular sorting algorithms in practice?
@ratchet freak: quick sort worse time complexity is not O(n log n) but O(n ^ 2), and if you use a naive implementation this will become apparent as soon as your data set gets big enough (roughly, more than 100000 elements).
Mar
7
comment What are the most popular sorting algorithms in practice?
I think you should make it clear that by quick sort you do not mean naive quick sort (choose a random pivot, partition, sort recursively), which has worst case O(n^2). Normally, more elaborate variations of quick sort like intro sort are used.
Mar
7
comment How many are too many nested function calls?
@John R. Strohm: Languages like Java or C# do not have a strong need for tail-call optimization because when you want to linearly scan a collection of objects you use a plain old loop. Tail-call optimization is needed more strongly in languages like Scheme or Haskell that use recursion in this case (and, indeed, Haskell has no loops). Normally, I think it is OK if a language provides only one metaphor for a specific class of tasks.
Mar
6
comment How many are too many nested function calls?
+1. Very good answer, I have been implicitly using this rule but I was not aware of it.
Mar
5
comment Is imposing the same code format for all developers a good idea?
@Donal Fellows: You are right. I follow the principle that every character you type in a source file is (1) a potential error (2) introduces a change that makes the code difficult to recognize afterwards. So in my opinion each change should be as small as possible. But, yes, there are developers who change the code without thinking too much. I wonder if an automatic reformatting of the code can solve the problem. I would rather be in favour of code ownership (see e.g. point 7 at paulgraham.com/head.html).
Mar
5
comment Is imposing the same code format for all developers a good idea?
+1 for a very good answer. In my experience it can take less time to learn to read other people's code than to find an agreement on a common coding style.
Mar
5
comment Is imposing the same code format for all developers a good idea?
"It's a real pain to try to spot differences between two versions of a code base when the formatting is not consistent between developers.": I am not sure I understand the use case: every commit will change certain lines that will show up as a diff. Or do you mean there are developers that reformat the whole file before committing their changes?