Reputation
729
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 9
Newest
 Student
Impact
~19k people reached

  • 0 posts edited
  • 1 helpful flag
  • 27 votes cast
Oct
12
comment I can't remember programming 5 mins after learning?
Don't just book learn. Programming requires projects and specific problems to solve to stick in your brain.
Sep
26
awarded  Nice Answer
Sep
8
comment Difference between Idiom and Design Pattern?
Another interesting example: Fluent syntax APIs. They make up for the fact that you don't have direct DSL support in your language, and it steps across language boundaries. I am not sure it has graduated to a "Design Pattern" status yet, and it rings like a syntactic idiom...
Sep
8
comment Difference between Idiom and Design Pattern?
I like where you're going with the definition of idiom being different than a "poor man's design pattern", which is sort of how my model treats it (see my answer). It is less "here is how to implement this" and more "here is the right way to implement this". For example, I can't imagine "Big Three" evolving to a design pattern. And there is the syntactic component, too, e.g. do_something() or die "..."; (stolen from another comment on here). It is based on specific language features, but it is a common way to use those features. It is not cross-language, and probably won't be.
Sep
8
comment Difference between Idiom and Design Pattern?
That's the point. Users of that language would consider the "design pattern" an idiom, because their language is cooler :)
Sep
8
comment Difference between Idiom and Design Pattern?
@Nawaz: Okay I gave it a shot anyway :)
Sep
8
answered Difference between Idiom and Design Pattern?
Sep
8
comment Difference between Idiom and Design Pattern?
+1; Good answer. Tho I'm inclined to believe everything here except the last bit. There are languages that have direct support for multiple-dispatch, so the Visitor pattern wouldn't need to exist there. From their perspective, the "pattern" might be more of an idiom. From the ultimate high-level language, all patterns might become idioms...
Sep
8
comment Difference between Idiom and Design Pattern?
@Nawaz: The comment was about the other answers. This one is already nearly perfect. I'd ideally like samples in an answer, but it seems no one is getting them right. I probably couldn't either, otherwise I'd happily oblige :)
Sep
8
comment Difference between Idiom and Design Pattern?
+1 for drawing a distinction with few words and few inaccuracies.
Sep
8
comment Difference between Idiom and Design Pattern?
I think "where's the beef" is more a meme than an idiom. Might have another continuum there ;) There might be more to an idiom than simply the implementation in the language, since things might be partial or failed implementations of that idiom - C++'s "Big Three", for example. In that case, the idiom is the name and description of "Big Three".
Sep
8
comment Difference between Idiom and Design Pattern?
event listener is a language feature that implements signal/slots (pattern?) or the Observer pattern. There are also things in C++ called idioms that simply don't matter or don't fit in other languages (as far as I know) - e.g. the copy-and-swap idiom.
Sep
8
comment Difference between Idiom and Design Pattern?
In practical terms the distinction may be difficult to determine (and there may be some continuum between an idiom and a design pattern). But it probably derives from the term "idiom" in natural language: en.wikipedia.org/wiki/Idiom (which doesn't really fit the usage).
Feb
25
comment Harmful temptations in programming
If a test is hard to write, you might not be programming it right :)
Dec
22
answered Is anything in programming truly evil?
Dec
22
comment Is anything in programming truly evil?
Maybe they should have conducted business in such a way that they understood that before they took on the project...
Dec
22
awarded  Critic
Nov
6
awarded  Commentator
Nov
6
comment How do you use blank lines in your code?
if (i % 3 != 0) { <newline here> array[i] += 2; <newline here> }, but I see your point :)
Oct
28
comment What are the drawbacks of Python?
@dsimcha: "Nested functions kind of suck in that you can't modify variables in the outer scope". Do you mean that it doesn't have closures?