101 reputation
4
bio website
location
age 17
visits member for 1 year, 9 months
seen 9 hours ago

Sep
26
comment Why do most programming languages have special keyword or syntax for declaring functions?
I think it is because a function or method simply is not just another named entity. In functional languages, they are (you can pass them around etc.) but in other languages (like Java) a function or method is something entirely different from a simple variable and cannot be treated as such (I admit Java 8 kind of weakens this statement), so it makes sense to define functions/methods differently, since they behave differently.
Sep
6
awarded  Commentator
Sep
6
comment What does this function do?
Have a look at this: programmers.stackexchange.com/questions/25052/…
Aug
26
comment Is method overloading anything more than syntactic sugar?
Like this: getPayment :: PaymentInfo -> a getPayment CashOnDelivery = error "Should have been paid already" getPayment (Adress addr) = -- code to notify administration to send a bill getPayment (UserInvoice cust) = --whatever. I took the data type from a Haskell tutorial and have no idea what an invoice is. I hope this comment is somewhat understandable.
Aug
26
comment Is method overloading anything more than syntactic sugar?
Given a datatype like data PaymentInfo = CashOnDelivery | Adress String | UserInvoice CustomerInfo you can pattern match on the type constructors.
Aug
26
comment Is method overloading anything more than syntactic sugar?
Haskell is a good example of why operator overloading is not syntactic sugar, but I think a better example would be deconstructing an algebraic data type with pattern matching (something that is as far as I know impossible without pattern matching).
Jul
19
comment Is OOP hard because it is not natural?
Sounds like you would enjoy giving Lojban a try.
Mar
12
comment Version number as a part of a file name
@sawa Suppose jQuery.com/jquery.js is the URL of the latest version and that's what your code refers to. What would happen if jQuery would publish a radical update? Of course, you'd link to your own local copy but I think this is what ratchet freak means
Feb
19
awarded  Editor
Feb
18
awarded  Citizen Patrol
Jan
20
awarded  Supporter