News for hackers. Stuff that matters.
Re:Early exit is a tail call optimization of procedural lang... by SideburnsOfDoom on Monday December 14, 2015 @01:02PM (#10732606)
Right - that single-exit-point rule is generally a holdover from C.

It is pointless in languages like C# or Java which have GC and 'try' or 'using' blocks. In some cases the single return is nicer, but this is not universal nor is single return "required" in all cases.

In functional languages such as F#, Haskell or Erlang where the method is usually side-effect free and uses pattern-matching, multiple return-points are completely normal and no-one even sees an issue.

There are no comments on this comment yet.