POEEEY, J.
This action is brought against O. PL and E. R-Richards and the city of Watertown for the recovery of damages resulting from the death of the plaintiff’s husband. The defendant city of Watertown, hereinafter -to be designated as the city, appeared separately and demurred to plaintiff’s complaint on the grounds: “(i) That there is a defect of parties plaintiff 5(2) that there is a defect of parties defendant; (3) that there are several . causes of action improperly united; (4) that the complaint does not state facts sufficient to constitute a cause of action; (5) that the plaintiff has no legal capacity to sue defendant; and (6) that the court has no jurisdiction of the subject of the action.” This demurrer was overruled by the order of the trial court, and the case is brought here upon an appeal by the city from this order. •
So far as the record before us shows, the defendants O. H. and E. R. Richards, hereinafter to be designated as the Richards, have made no appearance. In order to understand the questions presented by the demurrer, it will be necessary to set out the facts alleged in plaintiff’s complaint with greater detail than is ordinarily necessary.
It appears from the complaint, the truth of which is admitted by the demurrer: That on and for some time prior to the 20th day of July, 1907, plaintiff and one William D. Rowe were husband and wife, living in the city of Watertown. That at that time the Richards were the owners of a certain lot, or tract of ground, fronting on Kemp avenue, one of the main thoroughfares in the business part of the city, and that oh the date above mentioned they were engaged in the construction of a certain one-story, brick building upon said premises. That at that time the city was a municipal corporation, with complete control over all the streets and sidewalks in the city. That it had power to establish, and by ordinance had established, certain fire limits, within which limits it had power to designate the character of the buildings that should be erected and the thickness and 'strength of the walls to be used in the construction thereof That the city had a building inspector, whose duty it was to' inspect buildings in course of erection and to enforce, the city ordinance relative to the thickness of walls, strength of materials, etc. That the city had issued a permit to the Richards to erect the said building; that, while *72the said building was in course of erection, it was dangerous for people to pass along the street in front of the said property; and that it was the duty of all of the defendants to maintain warnings and guards in -front of said property to keep people out of danger; but that there was a sidewalk along said Kemp avenue in front of said property, and this defendants allowed people to use in the usual manner without putting up any guards or giving any warning of the dangerous condition of the place. That the front wall of the said building, which abutted upon the said 'sidewalk, was composed of such weak materials and was so poorly constructed -that it was unable to sustain its own weight, and that by reason of the inefficiency of the materials used in the 'said wall and the faulty construction thereof the same became, and was, a nuisance and -a menace to the safety of people using the said sidewalk, and that in their failure to erect and maintain proper guards and warnings to prevent people from using the said sidewalk the defendants were guilty of carelessness and negligence in the performance of their duties to the public. That on the said 20th day of July, 1907, while the said William D. Rowe was passing along the sidewalk in front of the said wall, in the exercise of due -and proper care and without any knowledge or warning of the weak and dangerous condition-of the said wall, the said wall collapsed and fell over upon him, causing injuries which afterwards, on the 8th day of -February, 1912, resulted .in his death. That the defendants knew, or by the exercise of ordinary care might have known, of the weak and dangerous condition of the said wall, and that, therefore, the death of the said 'William D. Rowe was the result of their neglig'ence in failing to erect and maintain guards and give warning to -travelers along the said sidewalk of the danger existing at that point.
'The complaint further alleged that at the time of the said injury plaintiff and her said husband had one child, a son, of tender age, and that plaintiff and said child were supported 'by and were dependent upon the said William 'D. Rowe for their support and maintenance, and that, by his death, they had been deprived of the ■said means of süpport and maintenance, and thereby suffered damage.
[1,2] Appellant in support of its demurrer first contends that the complaint is fatally defective, because of its failure to allege a *73compliance with the provisions of chapter 90, Laws of 1907. This chapter, so far as it pertains to this action, reads as follows: “No action for the recovery of damages for personal injury or death against any city or * * * town on account of its negligence shall be maintained unless written notice of the time, place and cause of injury is given to the clerk of the city or * * * town, by the .person injured, his or her agent or attorney, within sixty days after the injury, and any action for such recovery must be commenced within two years from the occurrence of the accident causing the injury or death,” etc.
This presents a question' of some difficulty. It is conceded that this action can be maintained only by virtue of the statute. Therefore it must be prosecuted in the manner and under the conditions specified by the statute. It is contended by respondent, however, that the provision of this act, so far as it attempts to control the .procedure in this action, is unconstitutional and void, and therefore a compliance with the terms thereof is not required. The title of the act is as follows: “An act entitled an act concerning liability of cities and towns for personal injuries, and repealing all acts and parts of acts in conflict herewith.” It will be noted that the title of the act relates only to liability for “personal injuries,” while the act itself attempts to include liability for “personal injury or death.” The question for determination then becomes whether or not liability for personal injury also necessarily includes liability for death. Or, rather, whether or not the title pertaining to liability for personal injury is broad enough in its scope to include liability for death. After a careful consideration of the subject and an examination of the authorities relating thereto, we are forced to the conclusion that .there is a broad distinction between the two classes of liability, and that the title of the statute in question is not broad enough in its scope to include the liability or cause of action set up in plaintiff’s complaint. In the first place, the framers of the law themselves recognized the distinction; for, by the use of the term “or death” in the body of the act, they recognized that the term “personal injuries,” as used in the title and in the body of the act, was not broad enough to include liability for death. It further appears from an examination of the body of the law that its authors did not intend nor contemplate that the law should apply to liability for death; *74because, in addition to providing for the giving of the notice mentioned, it also provided by whom the notice was to be given. It must be given “by the person injured, his or her agent or attorney, within sixty days after the injury.” From this it is clear that the act applies only to liability for personal injury'as distinguished from death, because it is only during the lifetime of the person injured that be could give the notice or that he could have an agent or attorney for that purpose. Of course, if is probable that in case of the death of the injured party the notice required could be given by the executor or administrator,' if one were appointed in time, -but no- provision is made for such a contingency, and it is apparent from the law that its authors had no such contingency in mind. Again, the law requires that the action must be brought within “two years from the occurrence of the accident causing the injury or death.” If this provision were applied in a case like the one at bar, where the death - did not occur for more than two years after the injurjr, this law, if given the interpretation contended for by appellant, would be a complete bar to an action for the recovery of damages caused by death. Such an interpretation would lead to an absurdity, and the words “or death,” where they appear in this act, must be held to be mere surplusa ge.
[3] But, aside from anything appearing upon the face of the act, there is such a broad distinction between the cause of action growing out of a personal injury, as the term is used by the courts, and a cause of action growing out of death by negligence that they constitute two different subjects, and an act, the title of which mentioned but one subject, could not be made to include the other; and an attempt to do so1 would violate section 21 of article' 3 of the Constitution, and the same would therefore be void, so far as the act pertained to the subject not mentioned in the title. The elements that enter into the measure of damages in either case are entirely different from the elements that enter into the measure of damages in the other case. The cause of action growing out of a personal injury is one that results directly from the injury and in favor of the person who received the injury. The cause of action accrues during his lifetime, and he may recover for physical and mental suffering, for loss of time and loss of wages, and for such sums as 'he may have paid or become liable *75for medical and surgical attendance, nursing, etc., while, on the other hand, the cause of action accruing from death by negligence does not accrue until after the death, and is therefore in favor of some other party, usually the husband or wife and next of kin, and is limited to loss of means of support, loss of society, comfort, and care suffered by the plaintiff in the death of the decedent. While it is the duty of the court to uphold an act of the Legislature wherever it can legally be done, the court cannot gO' to the extent of holding an act, or part of an act, to be valid, the subject of which is not mentioned in nor is within the scope of the title. Metropolitan Casualty Ins. Co. of New York v. Basford, 31 S. D. 149, 139 N. W. 795. We are therefore of,the opinion that the respondent is right in this contention.
[4] It is further contended by the appellant that plaintiff cannot maintain this action in the capacity in which she is suing, that this action is governed by provisions of chapter 301, Laws of 1909, and that it can be maintained only in the name of decedent's personal representative. The action is brought by plaintiff in her own name, as the widow of the decedent, to recover for the loss of the “earnings, care and support of the said .William D. Rowe, her husband.” The provisions of chapter 301, so far as it pertains to this case, reads as follows:
“Section 1. Whenever the death of a .person shall be caused by wrongful act, neglect or default, and the act, neglect or default is such as would (if death had not ensued), have entitled the party injured to maintain an action and recover damages in respect thereof, then and in every such case, the corporation which, or the .person who, would have been liable, if death had not ensued, or the administrator or executor of the estate of such person as such administrator or executor, shall be liable to an action for damages, notwithstanding the death of the person injured, and although the death shall have been caused under such circumstances as amount in law to a felony; and when the action is against such administrator or executor, the damages recovered shall be a valid claim against the estate of such deceased person.
“Sec. 3. Every such action shall be for the exclusive benefit of the wife or husband and children, or if there be neither of them, then of the parents and next of kin of the person whose death shall be so caused; and it shall be brought in the name of the per*76sonal representative of the deceased person; and in every action the jury may give such damages, not exeoeeding in any case ten thousand dollars ($10,000.00), as they may think proportionate to the pecuniary injury resulting from such death to the persons respectively for whose benefit such action shall be brought. Every such action shall be commenced within three years after the death of such deceased person. * * *”
It is the contention of appellant that this chapter repeals and takes the place of section 746 of 'the Revised Code of Civil Procedure. While, on the other hand, it is contended by the respondent that said chapter does not repeal section 746; that said section is still in full force and effect and authorizes the maintenance of this action just as it is brought by the plaintiff; that chapter 301 and section 746 do not relate to the same subject, and that there is no conflict between the provisions of the two acts. With this contention we a-re unable to agree. While it is not true, as claimed by appellant, that chapter 301 expressly repeals section 746, both acts do relate to the same subject, and the provisions of the two acts relating to that subject are so different as to be inconsistent with each other; and therefore, by implication, the later act repeals the earlier. Respondent’s contention is based upon the wording of the first part of section 1 of the act of 1909: “Whenever the death of a person shall be caused by wrongful act, * * * such as would (if death had not ensued), have entitled the party injured to maintain an action and recover damages in respect thereof, then * * * the person who would have been liable, if death had not ensued, * * * shall be liable to an action for damages, notwithstanding the death of the person injured.” It is contended that this language has reference to the cause of action that accrued in favor of the injured party before death, and that the effect of the act is merely to revive this right of action in the name of the personal representative of the injured party after his death. This contention is wrong. The language above quoted has reference to the negligent act that caused .the death; not the cause of action that resulted from the negligent act.
There is the same difference between these two subjects that there is between the subjects mentioned in chapter 90 of the Raws of 1907. One relates to the cause of action growing out of the “personal injury” in favor of the person injured; while the other *77relates to the cause of action growing out of the death of the injured person in favor of some one w'ho has suffered pecuniary loss because of the death. The distinction between these two causes of action is one that has been the cause of no little trouble to lawyers and to the courts as well. It was the subject of careful discussion by this court in the case of Belding v. B. H. & Ft. P. Ry. Co., 3 S. D. 369, 53 N. W. 750, where the difference is made plain, and nothing would be gained by a repetition of the discussion here. It is clear that the cause of action referred to in section 1 of the act of 1909 is the same as the one provided for in section 746, C. C. Pr. This also is the action referred to in section 3 of the act of 1909, and it must be brought in the name of the personal representative of the decedent — i. e., the executor or administrator of his estate — and it must appear by affirmative allegation in the complaint that the plaintiff is suing in that capacity. The complaint contains no such allegation; and, for that reason, it fails to show that Jessie Rowe has capacity to maintain the action, and the demurrer should have been sustained on the ground that there is a “defect of parties plaintiff.” The action, being one of purely statutory origin, can be maintained only in the manner and under -the conditions named in the statute. Weidner v. Rankin, 26 Ohio St. 522; Wilson v. Bumstead, 12 Neb. 1, 10 N. W. 411; Mowry v. Chaney, 43 Iowa, 609; Kramer v. Market St. R. Co., 25 Cal. 434; Major v. B. C. R. & N. Ry. Co., 115 Iowa, 309, 88 N. W. 815; Barker v. Railroad Co., 91 Mo. 86, 14 S. W. 281; Hyde v. Railroad Co., 61 Iowa, 441, 16 N. W. 351, 47 Am. Rep. 820; Aho v. Republican Iron & Steel Co., 104 Minn. 322, 116 N. W. 591; Aho v. Jesmore, 101 Minn. 449, 112 N. W. 538, 10 R. R. A. (N. S.) 998. And the amount of recovery is limited to $10,000.
[5] While not necessary to a decision in this case, in order to prevent confusion in the future relative to the cause of action growing out of injuries to the person and the cause of action based upon death by negligence, it might be well to state that these two causes of action do not conflict with each other; nor do they merge upon the death of the injured party; neither is the prosecution or satisfaction of either a bar to the prosecution and recovery on the other. Where a person has been injured by the negligent act of another, he may maintain an action for such dam*78age as he lias suffered. If, pending the action, death should occur, the action may be revived after his death by his personal representative. If the action were not commenced during the lifetime of the injured party, his personal representative could bring the action and recover the injuries decedent suffered during his lifetime, and the amount so recovered would become a part of the general assets of his estate and would be disbursed and distributed in the same manner as other assets of the estate. The maintenance of and recovery in this action would in no wise interfere with the right of recovery by the dependents or heirs of the decedent, though, under the law as it now exists, the action for the recovery of such damages could be maintained only in the name of the personal representative. The proceeds of such a judgment, however, when collected, would not become a part of the assets of the estate nor be subject to any claims against the estate, but would be paid to said personal representative merely as a trustee, for the benefit of the dependents entitled thereto, under the order of the court in which the judgment was recovered. This doctrine has been criticised on the ground that it allows a double recovery for the same injury. The criticism is not warranted, however; for, while the injury in 'both cases is caused primarily by the same negligent act, two distinct classes of damages result therefrom, one in favor of the injured party for loss of time, for mental and physical pain and suffering, expense incurred for medical and surgical attendance, nursing, etc., and the other in favor of some third party, such as husband, wife, or heir, for such pecuniary loss as they may have suffered (Davis v. Railway, 53 Ark. 117, 13 S. W. 801, 7 L. R. A. 283), and for an extensive discussion of this entire branch of the case see Hulbert v. City of Topeka (C. C.) 34 Fed. 510; Needham v. Grand T. R. Co., 38 Vt. 294; Brown v. C. & N. W. R. Co., 102 Wis. 137, 77 N. W. 748, 78 N. W. 771, 44 L. R. A. 579.
[6] It is also urged by appellant that there are several causes of action improperly joined; that there is a defect of parties defendant, and that the complaint -does not state a cause of action.
[7] There is but one cause of action stated, to-wit, the negligent killing of plaintiff’s intestate. Neither is there a defect of parties defendant. If the complaint states a cause of action against the appellant, that is sufficient. It is immaterial to- if how many *79other defendants may be joined with it, as a “surplus of parties” does not constitute a “defect of parties.” Mader et al. v. Plano Mfg. Co., 17 S. D. 553, 97 N. W. 843. If the complaint alleges a liability against some party not made a defendant, then there would be a 'defect of parties defendant, under the provisions of section 120, Code of Civil Procedure.
[8-10] Whether the complaint states a cause of action against the appellant or not depends upon the amount of care that must be exercised -by the officers of a city to keep its streets and sidewalks in such condition that they can be used by people in the ordinary and proper manner without danger of being injured. In this case, after a very careful examination of the question, we are inclined to take the view that the complaint states facts sufficient to show a liability against the appellant, though the action can be maintained only in the name of decedent’s personal representative. It is alleged in the complaint and it is a matter of law in this state, of which the court will take judicial notice, that the city has practically unlimited control over its streets and sidewalks, subject, of course, to the use for which they are created. It is given all necessary power to exercise this control, as well as the right to prescribe its own rules and regulations for the exercise of said power. No other person, body, or public agency has any jurisdiction in regard to them, and “this power conferred upon it by the Legislature, together with the necessary means for the proper execution of the power, carries with it the corresponding' duty. * * * It is incumbent on the city having full control of the streets therein and of the improvements thereof to keep them in a reasonably safe condition; and, if it neglects to do so, it will be liable for injuries by reason of its negligence.” Larson v. Grand Forks, 3 Dak. 307, 19 N. W. 414. “A municipal corporation owes a duty to those who use its streets to exercise ordinal-)care to make them safe for passage.” City of Anderson et al. v. East, 117 Ind. 126, 19 N. E. 726, 2 L. R. A. 712, 10 Am. St. Rep. 35. In this case, it is true, the wall causing the injury was on private property. It did not encroach upon nor overhang the sidewalk, but it was in such proximity to the sidewalk that, if it fell and fell in that direction, it was bound to fall upon the sidewalk, and to injure any person who might be passing at the time. The city had granted a permit to- the owners of the prop*80erty to erect the wall, and therefore must be charged with knowledge that it was in course of construction. City v. Dougherty, 71 Ind. 5. This imposed upon the city the duty of placing proper guards or obstructions across the sidewalk, at either extremity of the wall, that would prevent people from passing along the sidewalk at that place while the wall was in course of construction. In this case the complaint alleges that the wall was so poorly and unskillfully constructed that it was unable to carry its own weight, and that by reason thereof it was a public nuisance and a menace to all people using the sidewalk at that particular place, and that it was the duty of the city to have caused the removal thereof, before the injury was caused. But, regardless of the efficiency or inefficiency of the wall, it was the duty of the city to erect and maintain such warnings and obstructions across the sidewalk as would prevent people from using it at that particular place for the time being. In addition to the danger that a wall will fall of its own weight, which, in most cases, would be very remote, there is always more or less danger of objects, such as tools, materials, etc., falling from the top of the wall while work is being done thereon and inflicting injury on whomsoever may be passing by at that particular time.
The fact that the wall did not project into the street nor upon the' sidewalk does not in any wise change the rule nor reduce the degree of care imposed upon the city to keep its streets and sidewalks in a reasonably safe condition. In Langan v. City of Atchison, 35 Kan. 318, 11 Pac. 38, 57 Am. Rep. 165, the plaintiff was injured by the falling of a billboard that blew over and struck him while passing along one of the sidewalks in the city. The billboard had been erected on private property adjacent to the sidewalk, and without permission from the city. The court held that the city was negligent in permitting the billboard, constructed as it was, to remain near enough to the sidewalk to injure a person passing along when it fell. In Kiley v. City of Kansas, 69 Mo. 102, 33 Am. Rep. 491, a wall, standing on private propery, adjacent to a city street, fell over and killed a child who- was standing some distance from the street. The wall was known to be in a dangerous condition, and the city had the power to declare the wall a nuisance and to demolish the same. The court held that, in permitting the wall to remain in its unsafe condition,, the city was *81neg'ligent and was liable for the damages caused by the falling of the wall. In Grove v. City of Ft. Wayne, 45 Ind. 429, 15 Am. Rep. 262, the plaintiff was injured by the falling of the cornice of a wall, -so built as to overhang the sidewalk. The court held that the city was negligent in permitting the cornice to be so constructed as to endanger persons using the sidewalk, and, by reason of such negligence, the city was liable for the injury so caused. In its opinion the court quotes with approval the following from Parker v. Mayor, etc., of Macon, 39 Ga. 725, 99 Am. Dec. 486: “As the charter of the city of Macon confers upon the mayor and council full power and authority to keep the streets, lanes, alleys, sidewalks, and public squares of the city in good order, and to remove any buildings, posts, steps, fences, or other obstructions or nuisance, which is a power conferred upon public officers fox the public good, it is their duty to exercise it, and to keep1 the streets, lanes, alleys, and sidewalks in such condition that persons passing over or along them may do so with safety and convenience. To this, end it is the duty of the city authorities to remove any nuisance from the streets or sidewalks; and anything that endangers the life of a person passing along the sidewalk is a nuisance which they are bound to abate. As, for instance, a deep pit dug by the sidewalk, so near it that a person passing along the street at night is in danger, by a misstep, of falling into it, anything hanging over the street in such a manner that it may fall upon a person passing and do him a serious injury. But it is insisted in this case that the wall being private property, at the edge of the sidewalk, was not embraced within the objects which the charter gives the city authorities power to remove, as it was not in the street or sidewalk. We think this too narrow a view of the subject. If the city is bound to fill up a pit dug by the edge of the sidewalk, or to fence it off, so that no one may be injured by it, or to remove anything hanging over the sidewalk, which may work injury to those passing by, why is it not bound to remove a crumbling wall standing so near the sidewalk as to fall upon it? In this case the wall was two stories high, and had stood exposed to the weather for several months after the'house was burned. It was immediately upon the edge of the sidewalk, and could not fall in that direction without falling upon it. And the declaration alleges *82that it was, from its character and position insecure, and endangered the lives of passengers upon the street. If so, it was a nuisance, which it was the duty of the mayor and council to take the necessary steps to abate, and, having- failed to do so, they are liable for the damages.” We agree with the views expressed in these cases and others on the same subject, but space forbids a review of them all. For a general discussion of the whole subject relating to the liability of a municipal corporation for injuries caused by their failure to keep their streets and sidewalks in a reasonably safe condition for people who wish to use them, see Waller v. Ross, 100 Minn. 7, 110 N. W. 252, 12 L. R. A. (N. S.) 721, 117 Am. St. Rep. 661, 10 Ann. Cas. 715; and notes appended to McKim v. Philadelphia, 19 L. R. A. (N. S.) 506-525, and Elam v. Mt. Sterling, 20 L. R. A. (N. S.) 512 to 769, inclusive.
For the failure to -show that plaintiff has capacity to sue, the demurrer should have been sustained, and the order overruling the same is reversed.