Reputation
3,165
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 15 31
Newest
 Electorate
Impact
~183k people reached

Dec
23
comment At what point is it taboo to have loops within loops?
Indentation styles definitely depend on the language. Many functional or functional-inspired languages, such as Haskell or Scala, use 2-space indentations. The "shape" of the code you write is very different to C. If you tried to use 8-space identation in those languages, it'd look weird and nonstandard.
Dec
18
comment best practices for packaging in Scala projects?
You could try clarifying your comment instead of being dismissive. BTW, you accepted the wrong "answer". You should accept the answer that, you know, happens to be correct and actually references official Scala docs.
Dec
17
reviewed Approve Should I use HTTP status codes to describe application level events
Dec
15
awarded  Electorate
Dec
15
comment Why is UML not used in most free software (e.g. on Linux)?
+1 Very comprehensive answer. In my opinion, the preceding paragraphs explain the conclusion. Well done!
Dec
12
comment Is it reasonable to not write unit tests because they tend to get commented out later or because integration tests are more valuable?
I think fragile unit tests aren't a inherent trait of unit testing, but instead of misunderstanding what unit testing is there for. What we need here is better education for developers. If you unit test implementation details, you are doing it wrong. If you make private methods public "in order to test them", you are doing it wrong. Always test the public interface & behavior, which should change less often than implementation details!
Dec
12
comment Is it reasonable to not write unit tests because they tend to get commented out later or because integration tests are more valuable?
+1 For "you have to work on your definition of done". Well said!
Dec
2
comment How does “repeat x = x:repeat x” return a list in Haskell?
@Giorgio Sure! When I have time I'll start a chat with you and we can discuss all about lists :) I find the topic interesting too. I may very well be mistaken about this, anyway.
Dec
2
comment How does “repeat x = x:repeat x” return a list in Haskell?
@Giorgio Note that (undefined : 1 : []) and (1 : 2: undefined) are different (i.e the first doesn't "break" lists). I was referring to the latter in my comment. By the way, your answer has my +1.
Dec
2
comment How does “repeat x = x:repeat x” return a list in Haskell?
@JanDvorak Thanks for the explanation! I wasn't aware of that.
Dec
2
comment How does “repeat x = x:repeat x” return a list in Haskell?
@Giorgio I'm sure you replied to me by mistake. I understand how both lazy lists and undefined work in Haskell :) My point was that said "list" was neither a finite nor an infinite list (because it doesn't have the properties of either), which arguably can be considered as making it "not a list". I'm splitting hairs here.
Dec
2
comment How does “repeat x = x:repeat x” return a list in Haskell?
@JanDvorak I don't understand. Your definition of repeat' is still infinitely recursive... (unless I'm missing something) Re: your second comment, I might be splitting hairs, but are you sure 1:2:3:undefined is a list? It types and compiles, but it's neither a finite list (what's the length of 1:2:3:undefined?) nor an infinite list (because you cannot take as many consecutive elements as you want). So is it a list at all? :)
Dec
1
reviewed Approve Why should I use “functional operations” instead of a for loop?
Dec
1
comment How does “repeat x = x:repeat x” return a list in Haskell?
@MasonWheeler Silly or not, it's standard practice for many eager-by-default languages, which I guess was Giorgio's original comment... It's even Java's accepted terminology, as of Java 8. I guess they "got with the times" ;)
Dec
1
comment How does “repeat x = x:repeat x” return a list in Haskell?
@MasonWheeler You mean like InputStream et al? Those are from Java (though of course they can be used in Scala). In Scala, Streams are unrelated to file I/O and actually refer to lazy lists.
Dec
1
comment How does “repeat x = x:repeat x” return a list in Haskell?
@MasonWheeler Well, in Scala they are called Streams. I don't know if this is an universally accepted terminology outside Scala, though.
Dec
1
comment Is Functional Programming possible in Java?
I disagree this is primarily opinion-based. While FP as a term is not that well defined (as it often happens in our industry) we have plenty of questions about it, and this question in particular is answerable, as shown by the accepted answer. Voting to re-open.
Nov
30
comment Intentional misspellings to avoid reserved words
It doesn't tell you anything because it's not "code", it's an isolated variable declaration. A "class" or "klass" may very well tell you all you need to know. For example, a generic method may receive a Class<T> parameter, and this can make sense. So I disagree that it's a code smell.
Nov
29
comment Why would I not need an ORM in a functional language like Scala?
+1000 People who insist on using Scala as if it were Java++ make me afraid for the future of the language :(
Nov
29
comment Why would I not need an ORM in a functional language like Scala?
@sourcedelica As I said, if using Hibernate is a requirement, then Scala is no good for you (and in my experience, it's never a requirement to use both Hibernate and Scala). Writing unidiomatic Scala is always the wrong choice. I wouldn't write Hibernate code in Scala, because it's the wrong fit -- there is no "right" way to do it. Are you familiar with the phrase "using the right tool for the job"?