Talk:Mercury (programming language): Difference between revisions

Content deleted Content added
Examples of difficulties introduced by declarativeness?: "harder to express" needs a reliable source
Line 56:
day_openhours(_OtherDay, 8-17). % possibly add a check that the first argument is in fact a day
:It's not very pretty, but it gets the job done, is deterministic, and is friendly to clause indexing (i.e., it can possibly compile to smart code that's more efficient than an if-else cascade). Without the cuts, the "default" rule would have to contain some kind of "not one of the days above" condition. That would mean more---redundant!---code, which might justify the "harder to express" judgement. [[Special:Contributions/77.117.184.155|77.117.184.155]] ([[User talk:77.117.184.155|talk]]) 19:04, 2 December 2009 (UTC)
::I find the Prolog construct cuts-in-all-cases-except-the-last more readable than the Mercury equivalent. But that's just my opinion which of course falls foul of [[WP:OR]]. But there is no issue of expressiveness. The claim "harder to express" needs removing or a reliable source. [[User:Pgr94|pgr94]] ([[User talk:Pgr94|talk]]) 10:57, 3 December 2009 (UTC)
 
== "Good" principles ==