1,651 reputation
56
bio website sivut.koti.soon.fi/~terop
location Finland
age 40
visits member for 3 years, 9 months
seen 11 secs ago

2d
revised Taking strong, static typing to an extreme?
added 262 characters in body
2d
answered Taking strong, static typing to an extreme?
2d
comment Taking strong, static typing to an extreme?
@gallais: yes, but the trick in haskell would be to use Maybe type with the nothing-branch, instead of asserts terminating the program. The logic will still be part of the runtime program, instead of just comments. Just the checking is not being done by the compiler.
May
26
comment Taking strong, static typing to an extreme?
haskell already have this feature implemented. It cannot check it on compile-time, or even on runtime, but the rule basically is as follows: "before you create instance of a type with constructor, you must check invariant of the type." If you follow this rule, you'll never get prime type with non-prime instances, even though the internal data structure is described by ints.
Feb
28
comment Polymorphism Question
that's why the prototype needs to be present in the base class and all Triangle functions need to have the same prototype as the functions in the base class.
Feb
28
comment Bad sign if nobody can comprehend one's code?
Programmers need to actually design their code. Most of the time clear nice code is the best alternative, but there are also situations where cryptic code is better -- for example if the logic is important and you don't want people to modify it unnecessarily; cryptic code might prevent unwanted modifications to the code. It's also better for job security....
Feb
27
comment Polymorphism Question
Your example is almost exactly valid polymorphism example, except that Rectangle and Triangle are missing constructors with additional parameters.
Feb
27
answered Polymorphism Question
Feb
26
comment An embedded C developer wishing to interface some code with a web page
cgi scripts can run any C code in the web server, and then its just matter of passing the data to correct place.
Feb
22
answered How to refactor my project to have less mutable objects?
Oct
9
answered How to abide the “allocate in caller” rule when the size is computed in the callee?
Oct
8
comment Does C++ abuse the stack?
c++ stack usage could be calculated on compile-time, except for recursive functions.
Oct
3
comment Is it possible to antialias existing lines, circles, text, etc. of a single color?
good plan is to render to (larger) bitmap, and then blit to screen and use multiple pixels of large bitmap to generate single pixel on output bitmap.
Sep
16
comment Are Git branches, in fact, “homeomorphic endofunctors mapping submanifolds of a Hilbert space”?
Sounds like someone tried to read a math book, but failed.
Aug
30
awarded  Yearling
Aug
2
comment How modularized should my interfaces be?
No the real problem is that to call enqueue, you must first check if the operation is allowed. Now If you have algorithm void algo(queue<int> &q); then that algo is NOT asking permission to call enqueue, and thus the algo would not work for bounded_queue. Thus the empty() and full() needs to be in original queue interface.
Aug
2
comment How modularized should my interfaces be?
They should be in same interface. Reason: full() is a condition whether you're allowed to call enqueue(), and empty() is a condition whether you're allowed to call dequeue(). Thus they should be in same interface.
Jul
15
answered Programming with emacs instead of a debugger-integrated IDE
Jul
6
comment Screen out software engineers with poor communication skills?
@michaelT: Well, the outsourced folks from india managed to write good enough design documents, and they definitely didn't have perfect english language skills. I wouldnt show the docs to paying clients, but they managed to communicate the information programmers need to understand the code.
Jul
4
revised How many mistakes does a good software developer make?
added 4 characters in body