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

Nov
19
comment What is the supposed productivity gain of dynamic typing?
In general, it's not true that you can write a feature in fewer lines using a dynamic language. Which languages are you comparing, anyway?
Nov
19
comment What is the supposed productivity gain of dynamic typing?
Finally, "writing code fast" != "being more productive". Your code has to work! If you write buggy software which you must later spend time debugging and fixing, you are not being productive.
Nov
19
comment What is the supposed productivity gain of dynamic typing?
Your answer is well-meant, but has mistakes. First, it's not true that dynamic languages "have no type system", so that cannot be the reason they "make it easier to write generic code". They don't make it easier, as your own counterexample with Haskell shows (you debunk your own assertion!). "You never have to fight the type system" is false: you fight it every time you must fix a bug which was caused by not enough static typechecking. Finally, explicitly coercing the Int returned by a list is trivial; example: 1.0 + fromIntegral (length myList), i.e. just use fromIntegral.
Nov
19
comment What is the supposed productivity gain of dynamic typing?
-1 Doesn't address the actual question ("productivity gains", remember?) Also, you probably don't even want to write those "valid programs the type system rejects". Just because you can doesn't mean you should. And why would you even have a "valid program" which the typechecker rejects? What, were you coding a Javascript program and suddenly tried to make it compile in Java?
Oct
15
comment Is it normal to spend as much, if not more, time writing tests than actual code?
@Nelson I agree nested ternary operators are hard to read, but I don't think they make testing particularly difficult (a good coverage tool will tell you if you've missed one of the possible combinations). IMO, software is hard to test when it's too tightly coupled, or depends on hardwired data or data not passed as a parameter (e.g. when a condition depends on the current time, and this is not passed as a parameter). This is not directly related to how "readable" the code is, though of course, all other things equal, readable code is better!
Oct
8
comment What are the justifications for annotations in a programming language?
@MichaelT I'm not sure that's a good argument. Maybe Spring (and similar annotation-heavy frameworks) are an evolutionary dead-end. "How else would you write all this boilerplate?" is only a suitable answer if we accept the need for all that boilerplate in the first place ;)
Oct
5
reviewed Approve Separate settings and implementation class hierarchies
Oct
3
comment If null is bad, what other approaches exist that could be implemented?
No, you mostly don't have to check explicitly (instead, you use library functions that know how to handle it), and Option/Maybe composes better than null. Also, even when checking explicitly, since most languages that have Option also use pattern matching, the compiler will warn you if you forget to match against one of the cases. And finally, Option is a type that means "this may be optional". The type that says "this may be null" doesn't exist in Java... or rather, all types are.
Oct
1
comment Which language is a BIOS written in?
@TomDworzanski It strikes me that people should refrain from downvoting a valuable answer, written by someone who has practical experience in the matter, just because they disagree with a minor aspect. The tooltip for the downvote button says "This answer is not useful"; I think it's useful and if it has any problems, they are minor. But that's just me.
Oct
1
comment Which language is a BIOS written in?
I like how some people downvoted the answer of someone who has actually written a BIOS. I guess the downvoters wrote "better" BIOSes? ;)
Sep
30
comment Which language is a BIOS written in?
This is not even remotely a duplicate of a question as general as "How Do Computers Work?". Please do not close as dupe.
Sep
24
comment Is pattern-matching against types idiomatic or poor design?
I know you know this, and it probably slipped your mind while writing your answer, but note that Some and None aren't types, so you are not pattern matching on types. You pattern-match on constructors of the same type. This is not like asking "instanceof".
Sep
22
awarded  Nice Answer
Sep
21
comment Why do build tools use a scripting language different than underlying programming language?
@supercat Sure, I do not dispute that make files are hybrid systems. Hence "more declarative/high-level", not "exclusively declarative".
Sep
21
comment Why do build tools use a scripting language different than underlying programming language?
@MasonWheeler There are cases where existing build tools have made me suffer, yes. None of them would have been helped by using a low-level C-like imperative language. I see something like Ruby as probably ideal: declarative and imperative enough, as needed. C would give me nightmares for this task. To me build systems are a good use case for (mostly) declarative DSLs: you care about what to do, not about how to do it (most of the time).
Sep
21
answered Why do build tools use a scripting language different than underlying programming language?
Sep
21
comment Why do build tools use a scripting language different than underlying programming language?
Maybe the general-purpose language isn't a good enough fit for the specialist usage of the tool? For example, I wouldn't want to write make files in C! Sometimes a DSL is better.
Sep
9
reviewed Reject Best practices for constants
Sep
8
reviewed Approve Sales Manager: “Why is time-estimation so complex?”
Sep
5
revised Why do schools teach arrays over List?
removed controversial "contrary to popular belief" comment. I believe this makes this answer better.