Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Not to sound like an ass, but... (Score 1) 173

Moreover, the DoAndIfThenElse extension merely extends the "do" syntax with if/then/else clauses; it is syntactic sugar. Empty data declarations are essentially union types unioned over no labels and therefore can have no values except for the bottom value.

References:
http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse
http://hackage.haskell.org/trac/haskell-prime/wiki/EmptyDataDecls

Comment Re:Strongly typed language? (Score 1) 299

What would be the result of 354+true? What is the result of true+true? What is the result of false-true? What is the result of true^3? What is the squareroot of true? Does it make any sense? Is it well defined?

In C, any non-zero int value is synonymous with true and the int value 0 is synonymous with false. So, 354+true is something besides 354; true+true is the sum of two non-zero int values; false-true is simply the arithmetic negation of some non-zero int value; true^3 is some non-zero int value multiplied by itself twice; sqrt(true) is some non-zero int value cast into a double and given to sqrt. It does not have to make sense because these operations are well-defined.

Comment Re:Strongly typed language? (Score 4, Informative) 299

Strongly typed languages usually make type conversions explicit and enforce type restrictions; whereas weakly typed languages usually allow implicit type conversions and relax type restrictions.

Explicit type conversions disallow a value of type T to be treated as a value of type S without invoking a function that takes a value of type T and returns a corresponding value of type S. For example, a conversion from an integer type to a floating point type requires the invocation of a function that performs the conversion. Contrast this with implicit type conversions where a value can be treated as almost any type depending on how it is to be used.

Type restrictions only allow certain operations to be done to certain types. For example, numerical addition mïay only be performed on numerical types. A lack of type restrictions allow for numerical addition to apply for, say, booleans, for example.

Comment Re:Learn as hobby, not at school (Score 1) 141

A web developer or a functional programmer wouldn't stand a chance here as normal programming only in rare cases involves advanced algoritms like maximum bipartite matchings, maximul flow or other graph related algorithms.

Functional programmers will stand a better chance in these competitions. It is arguably easier to implement graph algorithms in functional programming languages than in imperative programming languages. There are proportionally more functional programmers who have a firm grasp of algorithm design and implementation than programmers who have not used functional programming languages.

Comment Re:Why should PUBLIC records be behind a paywall? (Score 1) 145

Forbidding competition among providers of services is bad everywhere. User fees for road tolls and taxes as well as public schools are bad if private entities are not allowed to respectively provide access to their own privately owned roads and private schools. Moreover, these court records can be distributed by private individuals without incurring any additional costs to the federal government.

Comment Re:You need trust (Score 4, Interesting) 207

Self-enforcing protocol participants do not require the level of trust that are required of impartial middle-men. One way of looking at self-enforcing protocols is to think of the protocol itself as serving the role of a middle-man. The protocol can be scrutinized more thoroughly than any self-serving middle-man and a higher level of trust can be placed on the protocol.

Slashdot Top Deals

"God is a comedian playing to an audience too afraid to laugh." - Voltaire

Working...