I dissent.
It has long been the rule that taxing costs and settling a cost bill are judicial functions, the result of which is a judgment for costs. (See Hopkins v. Superior Court (1902) 136 Cal. 552, 554 [69 P. 299].) The result may not be a determination on the merits of the underlying claim, but it is in all respects a final judgment.
Thus if, as the majority appear to agree, the defendant is entitled to his costs upon plaintiff’s filing a voluntary dismissal, the defendant thereby satisfies the only requirement of Civil Code section 1717 for becoming a “prevailing party”: he is “the party in whose favor final judgment is rendered.”
When attorney’s fees are recoverable pursuant to statutory authorization, they are deemed an element of costs. For example, Code of Civil Procedure section 874.010, relating to actions for partition of property, provides for recovery of the “costs of partition” which include “Reasonable attorney’s fees”; section 836, relating to libel actions, provides a prevailing defendant shall recover $100 “to cover counsel fees in addition to the other costs”; and in eminent domain proceedings recoverable “litigation expenses,” i.e., costs, include reasonable attorney’s fees (Code *226Civ. Proc., § 1235.140), and these, significantly, are to be awarded to a defendant whenever the “proceeding is wholly or partly dismissed for any reason” (Code Civ. Proc., § 1268.610).
Many authorities also refer to attorney’s fees as an element of costs. (See e.g., System Inv. Corp. v. Union Bank (1971) 21 Cal.App.3d 137, 162 [98 Cal.Rptr. 735].) In Woodward v. Bruner (1951) 104 Cal.App.2d 83, 85 [230 P.2d 861], the court declared that the “rule of the common law that counsel fees were to be classed as costs and not damages is a part and parcel of our law,” unless, of course, a statute or contract provides otherwise.
In view of the consistent references to statutory and contractual attorney’s fees as an element of costs, we should construe section 1717 as providing for recovery of such attorney’s fees whenever other costs are properly recoverable. Code of Civil Procedure section 1032 awards to a defendant “as to whom the action is dismissed” his costs, not merely part of his costs. Yet reduction to only a small fraction of actual costs results from the majority’s strained interpretation permitting recovery of the filing fee but not attorney’s fees pursuant to contract.
A voluntary dismissal terminates litigation with finality comparable to a formal judgment based on sustaining a demurrer, or on findings or a verdict on the facts. That there has been no determination of the merits and that a new lawsuit on the same subject may be filed have no bearing on the pragmatic result: termination of the pending litigation. No persuasive reason appears to insulate a plaintiff from his obligation to pay costs, including attorney’s fees, merely because he elects to terminate litigation by means of dismissal rather than by pursuit to a conclusion on the merits.
I would reverse the order of the trial court.
Tobriner, J., concurred.