Is there any use case for the bottom type as a function parameter type?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








12












$begingroup$


If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations.



Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever any reasons for defining such a function?










share|cite|improve this question









$endgroup$





















    12












    $begingroup$


    If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations.



    Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever any reasons for defining such a function?










    share|cite|improve this question









    $endgroup$

















      12












      12








      12


      4



      $begingroup$


      If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations.



      Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever any reasons for defining such a function?










      share|cite|improve this question









      $endgroup$




      If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations.



      Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever any reasons for defining such a function?







      type-theory type-checking






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked May 26 at 21:08









      bdslbdsl

      1614 bronze badges




      1614 bronze badges

























          5 Answers
          5






          active

          oldest

          votes


















          17














          $begingroup$

          One of the defining properties of the $bot$ or empty type is that there exists a function $bot to A$ for every type $A$. In fact, there exists a unique such function. It is therefore, fairly reasonable for this function to be provided as part of the standard library. Often it is called something like absurd. (In systems with subtyping, this might be handled simply by having $bot$ be a subtype of every type. Then the implicit conversion is absurd. Another related approach is to define $bot$ as $forall alpha.alpha$ which can simply be instantiated to any type.)



          You definitely want to have such a function or an equivalent because it is what allows you to make use of functions that produce $bot$. For example, let's say I'm given a sum type $E+A$. I do a case analysis on it and in the $E$ case I'm going to throw an exception using $mathtt{throw}:Etobot$. In the $A$ case, I'll use $f:Ato B$. Overall, I want a value of type $B$ so I need to do something to turn a $bot$ into a $B$. That's what absurd would let me do.



          That said, there's not a whole lot of reason to define your own functions of $botto A$. By definition, they would necessarily be instances of absurd. Still, you might do it if absurd isn't provided by the standard library, or you wanted a type specialized version to assist type checking/inference. You can, however, easily produce functions that will end up instantiated to a type like $botto A$.



          Even though there isn't much a reason to write such a function, it should generally still be allowed. One reason is that it simplifies code generation tools/macros.






          share|cite|improve this answer









          $endgroup$















          • $begingroup$
            So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
            $endgroup$
            – bdsl
            May 28 at 9:05












          • $begingroup$
            If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
            $endgroup$
            – Derek Elkins
            May 28 at 18:50



















          6














          $begingroup$

          To add to what has been said about the function absurd: ⊥ -> a I have a concrete example of where this function is actually useful.



          Consider the Haskell data-type Free f a which represents a general tree structure with f-shaped nodes and leaves containing as:



          data Free f a = Op (f (Free f a)) | Var a



          These trees can be folded with the following function:



          fold :: Functor f => (a -> b) -> (f b -> b) -> Free f a -> b
          fold gen alg (Var x) = gen x
          fold gen alg (Op x) = alg (fmap (fold gen alg) x)


          Briefly, this operation places alg at the nodes and gen at the leaves.



          Now to the point: all recursive datastructures can be represented using a Fixed-point datatype. In Haskell this is Fix f and it can defined as type Fix f = Free f ⊥ (i.e. Trees with f-shaped nodes and no leaves outside of the functor f). Traditionally this structure has a fold as well, called cata:



          cata :: Functor f => (f a -> a) -> Fix f -> a
          cata alg x = fold absurd alg x


          Which gives a quite neat use of absurd: since the tree cannot have any leaves (since ⊥ has no inhabitants other than undefined), it is never possible to use the gen for this fold and absurd illustrates that!






          share|cite|improve this answer









          $endgroup$























            2














            $begingroup$

            The bottom type is a subtype of every other type, which can be extremely useful in practice. For example, the type of NULL in a theoretical type-safe version of C must be a subtype of every other pointer type, otherwise you couldn't e.g. return NULL where a char* was expected; similarly, the type of undefined in theoretical type-safe JavaScript must be a subtype of every other type in the language.



            As a function return type, it's also very useful to have certain functions that never return. In a strongly-typed language with exceptions, for instance, what type should exit() or throw() return? They never return control flow to their caller. And since the bottom type is a subtype of every other type, it's perfectly valid for a function returning Int to instead return $bot$—that is, a function returning Int can also choose not to return at all. (Maybe it calls exit(), or maybe it goes into an infinite loop.) This is good to have, because whether a function ever returns or not is famously undecidable.



            Finally, it's very useful for writing constraints. Suppose you want to constrain all parameters on "both sides", providing a type that must be a supertype of the parameter, and another type that must be a subtype. Since bottom is a subtype of every type, you can express "any subtype of S" as $bot prec T prec S$. Or, you can express "any type at all" as $bot prec T prec top$.






            share|cite|improve this answer











            $endgroup$











            • 3




              $begingroup$
              NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
              $endgroup$
              – bdsl
              May 26 at 23:18










            • $begingroup$
              I'm not sure quite what ≺ means in type theory.
              $endgroup$
              – bdsl
              May 26 at 23:18






            • 1




              $begingroup$
              @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
              $endgroup$
              – Draconis
              May 26 at 23:40






            • 1




              $begingroup$
              @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
              $endgroup$
              – Draconis
              May 26 at 23:42






            • 2




              $begingroup$
              Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
              $endgroup$
              – Derek Elkins
              May 27 at 1:50



















            2














            $begingroup$

            There is one use I can think of, and it's something that has been considered as an improvement to the Swift programming language.



            Swift has a maybe Monad, spelled Optional<T> or T?. There are many ways to interact with it.





            • You can use conditional unwrapping like



              if let nonOptional = someOptional {
              print(nonOptional)
              }
              else {
              print("someOptional was nil")
              }


            • You can use map, flatMap to transform the values


            • The force unwrap operator (!, of type (T?) -> T) to forcefully unwrap the contents, otherwise triggering a crash


            • The nil-coalescing operator (??, of type (T?, T) -> T) to take its value or otherwise use a default value:



              let someI = Optional(100)
              print(someI ?? 123) => 100 // "left operand is non-nil, unwrap it.

              let noneI: Int? = nil
              print(noneI ?? 123) // => 123 // left operand is nil, take right operand, acts like a "default" value



            Unfortunately, there was no concise way of saying "unwrap or throw an error" or "unwrap or crash with a custom error message". Something like



            let someI: Int? = Optional(123)
            let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


            doesn't compile, because fatalError has type () -> Never (() is Void, Swift' unit type, Never is Swift's bottom type). Calling it produces Never, which isn't compatible with the T expected as a right operand of ??.



            In an attempt to remedy this, Swift Evolution propsoal SE-0217 - The “Unwrap or Die” operator was put forth. It was ultimately rejected, but it raised interest in making Never be a subtype of all types.



            If Never was made to be a subtype of all types, then the previous example will be compilable:



            let someI: Int? = Optional(123)
            let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


            because the call site of ?? has type (T?, Never) -> T, which would be compatible with the (T?, T) -> T signature of ??.






            share|cite|improve this answer









            $endgroup$























              0














              $begingroup$

              Swift has a type "Never" which seems to be quite like the bottom type: A function declared to return Never can never return, a function with a parameter of type Never can never be called.



              This is useful in connection with protocols, where there may be a restriction due to the type system of the language that a class must have a certain function, but with no requirement that this function should ever be called, and no requirement what the argument types would be.



              For details you should have a look at the newer posts on the swift-evolution mailing list.






              share|cite|improve this answer









              $endgroup$











              • 7




                $begingroup$
                "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                $endgroup$
                – Derek Elkins
                May 27 at 2:10













              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "419"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });















              draft saved

              draft discarded
















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109897%2fis-there-any-use-case-for-the-bottom-type-as-a-function-parameter-type%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              17














              $begingroup$

              One of the defining properties of the $bot$ or empty type is that there exists a function $bot to A$ for every type $A$. In fact, there exists a unique such function. It is therefore, fairly reasonable for this function to be provided as part of the standard library. Often it is called something like absurd. (In systems with subtyping, this might be handled simply by having $bot$ be a subtype of every type. Then the implicit conversion is absurd. Another related approach is to define $bot$ as $forall alpha.alpha$ which can simply be instantiated to any type.)



              You definitely want to have such a function or an equivalent because it is what allows you to make use of functions that produce $bot$. For example, let's say I'm given a sum type $E+A$. I do a case analysis on it and in the $E$ case I'm going to throw an exception using $mathtt{throw}:Etobot$. In the $A$ case, I'll use $f:Ato B$. Overall, I want a value of type $B$ so I need to do something to turn a $bot$ into a $B$. That's what absurd would let me do.



              That said, there's not a whole lot of reason to define your own functions of $botto A$. By definition, they would necessarily be instances of absurd. Still, you might do it if absurd isn't provided by the standard library, or you wanted a type specialized version to assist type checking/inference. You can, however, easily produce functions that will end up instantiated to a type like $botto A$.



              Even though there isn't much a reason to write such a function, it should generally still be allowed. One reason is that it simplifies code generation tools/macros.






              share|cite|improve this answer









              $endgroup$















              • $begingroup$
                So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
                $endgroup$
                – bdsl
                May 28 at 9:05












              • $begingroup$
                If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
                $endgroup$
                – Derek Elkins
                May 28 at 18:50
















              17














              $begingroup$

              One of the defining properties of the $bot$ or empty type is that there exists a function $bot to A$ for every type $A$. In fact, there exists a unique such function. It is therefore, fairly reasonable for this function to be provided as part of the standard library. Often it is called something like absurd. (In systems with subtyping, this might be handled simply by having $bot$ be a subtype of every type. Then the implicit conversion is absurd. Another related approach is to define $bot$ as $forall alpha.alpha$ which can simply be instantiated to any type.)



              You definitely want to have such a function or an equivalent because it is what allows you to make use of functions that produce $bot$. For example, let's say I'm given a sum type $E+A$. I do a case analysis on it and in the $E$ case I'm going to throw an exception using $mathtt{throw}:Etobot$. In the $A$ case, I'll use $f:Ato B$. Overall, I want a value of type $B$ so I need to do something to turn a $bot$ into a $B$. That's what absurd would let me do.



              That said, there's not a whole lot of reason to define your own functions of $botto A$. By definition, they would necessarily be instances of absurd. Still, you might do it if absurd isn't provided by the standard library, or you wanted a type specialized version to assist type checking/inference. You can, however, easily produce functions that will end up instantiated to a type like $botto A$.



              Even though there isn't much a reason to write such a function, it should generally still be allowed. One reason is that it simplifies code generation tools/macros.






              share|cite|improve this answer









              $endgroup$















              • $begingroup$
                So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
                $endgroup$
                – bdsl
                May 28 at 9:05












              • $begingroup$
                If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
                $endgroup$
                – Derek Elkins
                May 28 at 18:50














              17














              17










              17







              $begingroup$

              One of the defining properties of the $bot$ or empty type is that there exists a function $bot to A$ for every type $A$. In fact, there exists a unique such function. It is therefore, fairly reasonable for this function to be provided as part of the standard library. Often it is called something like absurd. (In systems with subtyping, this might be handled simply by having $bot$ be a subtype of every type. Then the implicit conversion is absurd. Another related approach is to define $bot$ as $forall alpha.alpha$ which can simply be instantiated to any type.)



              You definitely want to have such a function or an equivalent because it is what allows you to make use of functions that produce $bot$. For example, let's say I'm given a sum type $E+A$. I do a case analysis on it and in the $E$ case I'm going to throw an exception using $mathtt{throw}:Etobot$. In the $A$ case, I'll use $f:Ato B$. Overall, I want a value of type $B$ so I need to do something to turn a $bot$ into a $B$. That's what absurd would let me do.



              That said, there's not a whole lot of reason to define your own functions of $botto A$. By definition, they would necessarily be instances of absurd. Still, you might do it if absurd isn't provided by the standard library, or you wanted a type specialized version to assist type checking/inference. You can, however, easily produce functions that will end up instantiated to a type like $botto A$.



              Even though there isn't much a reason to write such a function, it should generally still be allowed. One reason is that it simplifies code generation tools/macros.






              share|cite|improve this answer









              $endgroup$



              One of the defining properties of the $bot$ or empty type is that there exists a function $bot to A$ for every type $A$. In fact, there exists a unique such function. It is therefore, fairly reasonable for this function to be provided as part of the standard library. Often it is called something like absurd. (In systems with subtyping, this might be handled simply by having $bot$ be a subtype of every type. Then the implicit conversion is absurd. Another related approach is to define $bot$ as $forall alpha.alpha$ which can simply be instantiated to any type.)



              You definitely want to have such a function or an equivalent because it is what allows you to make use of functions that produce $bot$. For example, let's say I'm given a sum type $E+A$. I do a case analysis on it and in the $E$ case I'm going to throw an exception using $mathtt{throw}:Etobot$. In the $A$ case, I'll use $f:Ato B$. Overall, I want a value of type $B$ so I need to do something to turn a $bot$ into a $B$. That's what absurd would let me do.



              That said, there's not a whole lot of reason to define your own functions of $botto A$. By definition, they would necessarily be instances of absurd. Still, you might do it if absurd isn't provided by the standard library, or you wanted a type specialized version to assist type checking/inference. You can, however, easily produce functions that will end up instantiated to a type like $botto A$.



              Even though there isn't much a reason to write such a function, it should generally still be allowed. One reason is that it simplifies code generation tools/macros.







              share|cite|improve this answer












              share|cite|improve this answer



              share|cite|improve this answer










              answered May 27 at 2:10









              Derek ElkinsDerek Elkins

              11.2k1 gold badge24 silver badges38 bronze badges




              11.2k1 gold badge24 silver badges38 bronze badges















              • $begingroup$
                So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
                $endgroup$
                – bdsl
                May 28 at 9:05












              • $begingroup$
                If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
                $endgroup$
                – Derek Elkins
                May 28 at 18:50


















              • $begingroup$
                So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
                $endgroup$
                – bdsl
                May 28 at 9:05












              • $begingroup$
                If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
                $endgroup$
                – Derek Elkins
                May 28 at 18:50
















              $begingroup$
              So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
              $endgroup$
              – bdsl
              May 28 at 9:05






              $begingroup$
              So this means something like (x ? 3 : throw new Exception()) gets replaced for analysis purposes with something more like (x ? 3 : absurd(throw new Exception()))?
              $endgroup$
              – bdsl
              May 28 at 9:05














              $begingroup$
              If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
              $endgroup$
              – Derek Elkins
              May 28 at 18:50




              $begingroup$
              If you didn't have subtyping or hadn't defined $bot$ as $forall alpha.alpha$, then the former wouldn't type check and the latter would. With subtyping, yes, something like absurd would implicitly be being inserted. Of course, you could put the absurd inside the definition of throw which is effectively what defining $bot$ as $forallalpha.alpha$ would do.
              $endgroup$
              – Derek Elkins
              May 28 at 18:50













              6














              $begingroup$

              To add to what has been said about the function absurd: ⊥ -> a I have a concrete example of where this function is actually useful.



              Consider the Haskell data-type Free f a which represents a general tree structure with f-shaped nodes and leaves containing as:



              data Free f a = Op (f (Free f a)) | Var a



              These trees can be folded with the following function:



              fold :: Functor f => (a -> b) -> (f b -> b) -> Free f a -> b
              fold gen alg (Var x) = gen x
              fold gen alg (Op x) = alg (fmap (fold gen alg) x)


              Briefly, this operation places alg at the nodes and gen at the leaves.



              Now to the point: all recursive datastructures can be represented using a Fixed-point datatype. In Haskell this is Fix f and it can defined as type Fix f = Free f ⊥ (i.e. Trees with f-shaped nodes and no leaves outside of the functor f). Traditionally this structure has a fold as well, called cata:



              cata :: Functor f => (f a -> a) -> Fix f -> a
              cata alg x = fold absurd alg x


              Which gives a quite neat use of absurd: since the tree cannot have any leaves (since ⊥ has no inhabitants other than undefined), it is never possible to use the gen for this fold and absurd illustrates that!






              share|cite|improve this answer









              $endgroup$




















                6














                $begingroup$

                To add to what has been said about the function absurd: ⊥ -> a I have a concrete example of where this function is actually useful.



                Consider the Haskell data-type Free f a which represents a general tree structure with f-shaped nodes and leaves containing as:



                data Free f a = Op (f (Free f a)) | Var a



                These trees can be folded with the following function:



                fold :: Functor f => (a -> b) -> (f b -> b) -> Free f a -> b
                fold gen alg (Var x) = gen x
                fold gen alg (Op x) = alg (fmap (fold gen alg) x)


                Briefly, this operation places alg at the nodes and gen at the leaves.



                Now to the point: all recursive datastructures can be represented using a Fixed-point datatype. In Haskell this is Fix f and it can defined as type Fix f = Free f ⊥ (i.e. Trees with f-shaped nodes and no leaves outside of the functor f). Traditionally this structure has a fold as well, called cata:



                cata :: Functor f => (f a -> a) -> Fix f -> a
                cata alg x = fold absurd alg x


                Which gives a quite neat use of absurd: since the tree cannot have any leaves (since ⊥ has no inhabitants other than undefined), it is never possible to use the gen for this fold and absurd illustrates that!






                share|cite|improve this answer









                $endgroup$


















                  6














                  6










                  6







                  $begingroup$

                  To add to what has been said about the function absurd: ⊥ -> a I have a concrete example of where this function is actually useful.



                  Consider the Haskell data-type Free f a which represents a general tree structure with f-shaped nodes and leaves containing as:



                  data Free f a = Op (f (Free f a)) | Var a



                  These trees can be folded with the following function:



                  fold :: Functor f => (a -> b) -> (f b -> b) -> Free f a -> b
                  fold gen alg (Var x) = gen x
                  fold gen alg (Op x) = alg (fmap (fold gen alg) x)


                  Briefly, this operation places alg at the nodes and gen at the leaves.



                  Now to the point: all recursive datastructures can be represented using a Fixed-point datatype. In Haskell this is Fix f and it can defined as type Fix f = Free f ⊥ (i.e. Trees with f-shaped nodes and no leaves outside of the functor f). Traditionally this structure has a fold as well, called cata:



                  cata :: Functor f => (f a -> a) -> Fix f -> a
                  cata alg x = fold absurd alg x


                  Which gives a quite neat use of absurd: since the tree cannot have any leaves (since ⊥ has no inhabitants other than undefined), it is never possible to use the gen for this fold and absurd illustrates that!






                  share|cite|improve this answer









                  $endgroup$



                  To add to what has been said about the function absurd: ⊥ -> a I have a concrete example of where this function is actually useful.



                  Consider the Haskell data-type Free f a which represents a general tree structure with f-shaped nodes and leaves containing as:



                  data Free f a = Op (f (Free f a)) | Var a



                  These trees can be folded with the following function:



                  fold :: Functor f => (a -> b) -> (f b -> b) -> Free f a -> b
                  fold gen alg (Var x) = gen x
                  fold gen alg (Op x) = alg (fmap (fold gen alg) x)


                  Briefly, this operation places alg at the nodes and gen at the leaves.



                  Now to the point: all recursive datastructures can be represented using a Fixed-point datatype. In Haskell this is Fix f and it can defined as type Fix f = Free f ⊥ (i.e. Trees with f-shaped nodes and no leaves outside of the functor f). Traditionally this structure has a fold as well, called cata:



                  cata :: Functor f => (f a -> a) -> Fix f -> a
                  cata alg x = fold absurd alg x


                  Which gives a quite neat use of absurd: since the tree cannot have any leaves (since ⊥ has no inhabitants other than undefined), it is never possible to use the gen for this fold and absurd illustrates that!







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered May 27 at 16:28









                  J_mie6J_mie6

                  2201 silver badge7 bronze badges




                  2201 silver badge7 bronze badges


























                      2














                      $begingroup$

                      The bottom type is a subtype of every other type, which can be extremely useful in practice. For example, the type of NULL in a theoretical type-safe version of C must be a subtype of every other pointer type, otherwise you couldn't e.g. return NULL where a char* was expected; similarly, the type of undefined in theoretical type-safe JavaScript must be a subtype of every other type in the language.



                      As a function return type, it's also very useful to have certain functions that never return. In a strongly-typed language with exceptions, for instance, what type should exit() or throw() return? They never return control flow to their caller. And since the bottom type is a subtype of every other type, it's perfectly valid for a function returning Int to instead return $bot$—that is, a function returning Int can also choose not to return at all. (Maybe it calls exit(), or maybe it goes into an infinite loop.) This is good to have, because whether a function ever returns or not is famously undecidable.



                      Finally, it's very useful for writing constraints. Suppose you want to constrain all parameters on "both sides", providing a type that must be a supertype of the parameter, and another type that must be a subtype. Since bottom is a subtype of every type, you can express "any subtype of S" as $bot prec T prec S$. Or, you can express "any type at all" as $bot prec T prec top$.






                      share|cite|improve this answer











                      $endgroup$











                      • 3




                        $begingroup$
                        NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                        $endgroup$
                        – bdsl
                        May 26 at 23:18










                      • $begingroup$
                        I'm not sure quite what ≺ means in type theory.
                        $endgroup$
                        – bdsl
                        May 26 at 23:18






                      • 1




                        $begingroup$
                        @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                        $endgroup$
                        – Draconis
                        May 26 at 23:40






                      • 1




                        $begingroup$
                        @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                        $endgroup$
                        – Draconis
                        May 26 at 23:42






                      • 2




                        $begingroup$
                        Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                        $endgroup$
                        – Derek Elkins
                        May 27 at 1:50
















                      2














                      $begingroup$

                      The bottom type is a subtype of every other type, which can be extremely useful in practice. For example, the type of NULL in a theoretical type-safe version of C must be a subtype of every other pointer type, otherwise you couldn't e.g. return NULL where a char* was expected; similarly, the type of undefined in theoretical type-safe JavaScript must be a subtype of every other type in the language.



                      As a function return type, it's also very useful to have certain functions that never return. In a strongly-typed language with exceptions, for instance, what type should exit() or throw() return? They never return control flow to their caller. And since the bottom type is a subtype of every other type, it's perfectly valid for a function returning Int to instead return $bot$—that is, a function returning Int can also choose not to return at all. (Maybe it calls exit(), or maybe it goes into an infinite loop.) This is good to have, because whether a function ever returns or not is famously undecidable.



                      Finally, it's very useful for writing constraints. Suppose you want to constrain all parameters on "both sides", providing a type that must be a supertype of the parameter, and another type that must be a subtype. Since bottom is a subtype of every type, you can express "any subtype of S" as $bot prec T prec S$. Or, you can express "any type at all" as $bot prec T prec top$.






                      share|cite|improve this answer











                      $endgroup$











                      • 3




                        $begingroup$
                        NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                        $endgroup$
                        – bdsl
                        May 26 at 23:18










                      • $begingroup$
                        I'm not sure quite what ≺ means in type theory.
                        $endgroup$
                        – bdsl
                        May 26 at 23:18






                      • 1




                        $begingroup$
                        @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                        $endgroup$
                        – Draconis
                        May 26 at 23:40






                      • 1




                        $begingroup$
                        @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                        $endgroup$
                        – Draconis
                        May 26 at 23:42






                      • 2




                        $begingroup$
                        Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                        $endgroup$
                        – Derek Elkins
                        May 27 at 1:50














                      2














                      2










                      2







                      $begingroup$

                      The bottom type is a subtype of every other type, which can be extremely useful in practice. For example, the type of NULL in a theoretical type-safe version of C must be a subtype of every other pointer type, otherwise you couldn't e.g. return NULL where a char* was expected; similarly, the type of undefined in theoretical type-safe JavaScript must be a subtype of every other type in the language.



                      As a function return type, it's also very useful to have certain functions that never return. In a strongly-typed language with exceptions, for instance, what type should exit() or throw() return? They never return control flow to their caller. And since the bottom type is a subtype of every other type, it's perfectly valid for a function returning Int to instead return $bot$—that is, a function returning Int can also choose not to return at all. (Maybe it calls exit(), or maybe it goes into an infinite loop.) This is good to have, because whether a function ever returns or not is famously undecidable.



                      Finally, it's very useful for writing constraints. Suppose you want to constrain all parameters on "both sides", providing a type that must be a supertype of the parameter, and another type that must be a subtype. Since bottom is a subtype of every type, you can express "any subtype of S" as $bot prec T prec S$. Or, you can express "any type at all" as $bot prec T prec top$.






                      share|cite|improve this answer











                      $endgroup$



                      The bottom type is a subtype of every other type, which can be extremely useful in practice. For example, the type of NULL in a theoretical type-safe version of C must be a subtype of every other pointer type, otherwise you couldn't e.g. return NULL where a char* was expected; similarly, the type of undefined in theoretical type-safe JavaScript must be a subtype of every other type in the language.



                      As a function return type, it's also very useful to have certain functions that never return. In a strongly-typed language with exceptions, for instance, what type should exit() or throw() return? They never return control flow to their caller. And since the bottom type is a subtype of every other type, it's perfectly valid for a function returning Int to instead return $bot$—that is, a function returning Int can also choose not to return at all. (Maybe it calls exit(), or maybe it goes into an infinite loop.) This is good to have, because whether a function ever returns or not is famously undecidable.



                      Finally, it's very useful for writing constraints. Suppose you want to constrain all parameters on "both sides", providing a type that must be a supertype of the parameter, and another type that must be a subtype. Since bottom is a subtype of every type, you can express "any subtype of S" as $bot prec T prec S$. Or, you can express "any type at all" as $bot prec T prec top$.







                      share|cite|improve this answer














                      share|cite|improve this answer



                      share|cite|improve this answer








                      edited May 26 at 23:43

























                      answered May 26 at 23:08









                      DraconisDraconis

                      6,3271 gold badge10 silver badges21 bronze badges




                      6,3271 gold badge10 silver badges21 bronze badges











                      • 3




                        $begingroup$
                        NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                        $endgroup$
                        – bdsl
                        May 26 at 23:18










                      • $begingroup$
                        I'm not sure quite what ≺ means in type theory.
                        $endgroup$
                        – bdsl
                        May 26 at 23:18






                      • 1




                        $begingroup$
                        @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                        $endgroup$
                        – Draconis
                        May 26 at 23:40






                      • 1




                        $begingroup$
                        @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                        $endgroup$
                        – Draconis
                        May 26 at 23:42






                      • 2




                        $begingroup$
                        Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                        $endgroup$
                        – Derek Elkins
                        May 27 at 1:50














                      • 3




                        $begingroup$
                        NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                        $endgroup$
                        – bdsl
                        May 26 at 23:18










                      • $begingroup$
                        I'm not sure quite what ≺ means in type theory.
                        $endgroup$
                        – bdsl
                        May 26 at 23:18






                      • 1




                        $begingroup$
                        @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                        $endgroup$
                        – Draconis
                        May 26 at 23:40






                      • 1




                        $begingroup$
                        @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                        $endgroup$
                        – Draconis
                        May 26 at 23:42






                      • 2




                        $begingroup$
                        Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                        $endgroup$
                        – Derek Elkins
                        May 27 at 1:50








                      3




                      3




                      $begingroup$
                      NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                      $endgroup$
                      – bdsl
                      May 26 at 23:18




                      $begingroup$
                      NULL is a unit type isn't it, distinct from ⊥ which is the empty type?
                      $endgroup$
                      – bdsl
                      May 26 at 23:18












                      $begingroup$
                      I'm not sure quite what ≺ means in type theory.
                      $endgroup$
                      – bdsl
                      May 26 at 23:18




                      $begingroup$
                      I'm not sure quite what ≺ means in type theory.
                      $endgroup$
                      – bdsl
                      May 26 at 23:18




                      1




                      1




                      $begingroup$
                      @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                      $endgroup$
                      – Draconis
                      May 26 at 23:40




                      $begingroup$
                      @bdsl The curved operator here is "is a subtype of"; I'm not sure if it's standard, it's just what my professor used.
                      $endgroup$
                      – Draconis
                      May 26 at 23:40




                      1




                      1




                      $begingroup$
                      @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                      $endgroup$
                      – Draconis
                      May 26 at 23:42




                      $begingroup$
                      @gnasher729 True, but C also isn't particularly type-safe. I'm saying if you couldn't just cast an integer to void*, you'd need a specific type for it that could be used for any pointer type.
                      $endgroup$
                      – Draconis
                      May 26 at 23:42




                      2




                      2




                      $begingroup$
                      Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                      $endgroup$
                      – Derek Elkins
                      May 27 at 1:50




                      $begingroup$
                      Incidentally, the most common notation I've seen for the subtyping relation is <: e.g. System $F_{mathtt{<:}}$.
                      $endgroup$
                      – Derek Elkins
                      May 27 at 1:50











                      2














                      $begingroup$

                      There is one use I can think of, and it's something that has been considered as an improvement to the Swift programming language.



                      Swift has a maybe Monad, spelled Optional<T> or T?. There are many ways to interact with it.





                      • You can use conditional unwrapping like



                        if let nonOptional = someOptional {
                        print(nonOptional)
                        }
                        else {
                        print("someOptional was nil")
                        }


                      • You can use map, flatMap to transform the values


                      • The force unwrap operator (!, of type (T?) -> T) to forcefully unwrap the contents, otherwise triggering a crash


                      • The nil-coalescing operator (??, of type (T?, T) -> T) to take its value or otherwise use a default value:



                        let someI = Optional(100)
                        print(someI ?? 123) => 100 // "left operand is non-nil, unwrap it.

                        let noneI: Int? = nil
                        print(noneI ?? 123) // => 123 // left operand is nil, take right operand, acts like a "default" value



                      Unfortunately, there was no concise way of saying "unwrap or throw an error" or "unwrap or crash with a custom error message". Something like



                      let someI: Int? = Optional(123)
                      let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                      doesn't compile, because fatalError has type () -> Never (() is Void, Swift' unit type, Never is Swift's bottom type). Calling it produces Never, which isn't compatible with the T expected as a right operand of ??.



                      In an attempt to remedy this, Swift Evolution propsoal SE-0217 - The “Unwrap or Die” operator was put forth. It was ultimately rejected, but it raised interest in making Never be a subtype of all types.



                      If Never was made to be a subtype of all types, then the previous example will be compilable:



                      let someI: Int? = Optional(123)
                      let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                      because the call site of ?? has type (T?, Never) -> T, which would be compatible with the (T?, T) -> T signature of ??.






                      share|cite|improve this answer









                      $endgroup$




















                        2














                        $begingroup$

                        There is one use I can think of, and it's something that has been considered as an improvement to the Swift programming language.



                        Swift has a maybe Monad, spelled Optional<T> or T?. There are many ways to interact with it.





                        • You can use conditional unwrapping like



                          if let nonOptional = someOptional {
                          print(nonOptional)
                          }
                          else {
                          print("someOptional was nil")
                          }


                        • You can use map, flatMap to transform the values


                        • The force unwrap operator (!, of type (T?) -> T) to forcefully unwrap the contents, otherwise triggering a crash


                        • The nil-coalescing operator (??, of type (T?, T) -> T) to take its value or otherwise use a default value:



                          let someI = Optional(100)
                          print(someI ?? 123) => 100 // "left operand is non-nil, unwrap it.

                          let noneI: Int? = nil
                          print(noneI ?? 123) // => 123 // left operand is nil, take right operand, acts like a "default" value



                        Unfortunately, there was no concise way of saying "unwrap or throw an error" or "unwrap or crash with a custom error message". Something like



                        let someI: Int? = Optional(123)
                        let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                        doesn't compile, because fatalError has type () -> Never (() is Void, Swift' unit type, Never is Swift's bottom type). Calling it produces Never, which isn't compatible with the T expected as a right operand of ??.



                        In an attempt to remedy this, Swift Evolution propsoal SE-0217 - The “Unwrap or Die” operator was put forth. It was ultimately rejected, but it raised interest in making Never be a subtype of all types.



                        If Never was made to be a subtype of all types, then the previous example will be compilable:



                        let someI: Int? = Optional(123)
                        let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                        because the call site of ?? has type (T?, Never) -> T, which would be compatible with the (T?, T) -> T signature of ??.






                        share|cite|improve this answer









                        $endgroup$


















                          2














                          2










                          2







                          $begingroup$

                          There is one use I can think of, and it's something that has been considered as an improvement to the Swift programming language.



                          Swift has a maybe Monad, spelled Optional<T> or T?. There are many ways to interact with it.





                          • You can use conditional unwrapping like



                            if let nonOptional = someOptional {
                            print(nonOptional)
                            }
                            else {
                            print("someOptional was nil")
                            }


                          • You can use map, flatMap to transform the values


                          • The force unwrap operator (!, of type (T?) -> T) to forcefully unwrap the contents, otherwise triggering a crash


                          • The nil-coalescing operator (??, of type (T?, T) -> T) to take its value or otherwise use a default value:



                            let someI = Optional(100)
                            print(someI ?? 123) => 100 // "left operand is non-nil, unwrap it.

                            let noneI: Int? = nil
                            print(noneI ?? 123) // => 123 // left operand is nil, take right operand, acts like a "default" value



                          Unfortunately, there was no concise way of saying "unwrap or throw an error" or "unwrap or crash with a custom error message". Something like



                          let someI: Int? = Optional(123)
                          let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                          doesn't compile, because fatalError has type () -> Never (() is Void, Swift' unit type, Never is Swift's bottom type). Calling it produces Never, which isn't compatible with the T expected as a right operand of ??.



                          In an attempt to remedy this, Swift Evolution propsoal SE-0217 - The “Unwrap or Die” operator was put forth. It was ultimately rejected, but it raised interest in making Never be a subtype of all types.



                          If Never was made to be a subtype of all types, then the previous example will be compilable:



                          let someI: Int? = Optional(123)
                          let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                          because the call site of ?? has type (T?, Never) -> T, which would be compatible with the (T?, T) -> T signature of ??.






                          share|cite|improve this answer









                          $endgroup$



                          There is one use I can think of, and it's something that has been considered as an improvement to the Swift programming language.



                          Swift has a maybe Monad, spelled Optional<T> or T?. There are many ways to interact with it.





                          • You can use conditional unwrapping like



                            if let nonOptional = someOptional {
                            print(nonOptional)
                            }
                            else {
                            print("someOptional was nil")
                            }


                          • You can use map, flatMap to transform the values


                          • The force unwrap operator (!, of type (T?) -> T) to forcefully unwrap the contents, otherwise triggering a crash


                          • The nil-coalescing operator (??, of type (T?, T) -> T) to take its value or otherwise use a default value:



                            let someI = Optional(100)
                            print(someI ?? 123) => 100 // "left operand is non-nil, unwrap it.

                            let noneI: Int? = nil
                            print(noneI ?? 123) // => 123 // left operand is nil, take right operand, acts like a "default" value



                          Unfortunately, there was no concise way of saying "unwrap or throw an error" or "unwrap or crash with a custom error message". Something like



                          let someI: Int? = Optional(123)
                          let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                          doesn't compile, because fatalError has type () -> Never (() is Void, Swift' unit type, Never is Swift's bottom type). Calling it produces Never, which isn't compatible with the T expected as a right operand of ??.



                          In an attempt to remedy this, Swift Evolution propsoal SE-0217 - The “Unwrap or Die” operator was put forth. It was ultimately rejected, but it raised interest in making Never be a subtype of all types.



                          If Never was made to be a subtype of all types, then the previous example will be compilable:



                          let someI: Int? = Optional(123)
                          let nonOptionalI: Int = someI ?? fatalError("Expected a non-nil value")


                          because the call site of ?? has type (T?, Never) -> T, which would be compatible with the (T?, T) -> T signature of ??.







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered May 27 at 15:57









                          AlexanderAlexander

                          4722 silver badges7 bronze badges




                          4722 silver badges7 bronze badges


























                              0














                              $begingroup$

                              Swift has a type "Never" which seems to be quite like the bottom type: A function declared to return Never can never return, a function with a parameter of type Never can never be called.



                              This is useful in connection with protocols, where there may be a restriction due to the type system of the language that a class must have a certain function, but with no requirement that this function should ever be called, and no requirement what the argument types would be.



                              For details you should have a look at the newer posts on the swift-evolution mailing list.






                              share|cite|improve this answer









                              $endgroup$











                              • 7




                                $begingroup$
                                "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                                $endgroup$
                                – Derek Elkins
                                May 27 at 2:10
















                              0














                              $begingroup$

                              Swift has a type "Never" which seems to be quite like the bottom type: A function declared to return Never can never return, a function with a parameter of type Never can never be called.



                              This is useful in connection with protocols, where there may be a restriction due to the type system of the language that a class must have a certain function, but with no requirement that this function should ever be called, and no requirement what the argument types would be.



                              For details you should have a look at the newer posts on the swift-evolution mailing list.






                              share|cite|improve this answer









                              $endgroup$











                              • 7




                                $begingroup$
                                "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                                $endgroup$
                                – Derek Elkins
                                May 27 at 2:10














                              0














                              0










                              0







                              $begingroup$

                              Swift has a type "Never" which seems to be quite like the bottom type: A function declared to return Never can never return, a function with a parameter of type Never can never be called.



                              This is useful in connection with protocols, where there may be a restriction due to the type system of the language that a class must have a certain function, but with no requirement that this function should ever be called, and no requirement what the argument types would be.



                              For details you should have a look at the newer posts on the swift-evolution mailing list.






                              share|cite|improve this answer









                              $endgroup$



                              Swift has a type "Never" which seems to be quite like the bottom type: A function declared to return Never can never return, a function with a parameter of type Never can never be called.



                              This is useful in connection with protocols, where there may be a restriction due to the type system of the language that a class must have a certain function, but with no requirement that this function should ever be called, and no requirement what the argument types would be.



                              For details you should have a look at the newer posts on the swift-evolution mailing list.







                              share|cite|improve this answer












                              share|cite|improve this answer



                              share|cite|improve this answer










                              answered May 26 at 23:21









                              gnasher729gnasher729

                              14.7k21 silver badges26 bronze badges




                              14.7k21 silver badges26 bronze badges











                              • 7




                                $begingroup$
                                "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                                $endgroup$
                                – Derek Elkins
                                May 27 at 2:10














                              • 7




                                $begingroup$
                                "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                                $endgroup$
                                – Derek Elkins
                                May 27 at 2:10








                              7




                              7




                              $begingroup$
                              "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                              $endgroup$
                              – Derek Elkins
                              May 27 at 2:10




                              $begingroup$
                              "Newer posts on the swift-evolution mailing list" is not a very clear or stable reference. Is there not a web archive of the mailing list?
                              $endgroup$
                              – Derek Elkins
                              May 27 at 2:10



















                              draft saved

                              draft discarded



















































                              Thanks for contributing an answer to Computer Science Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              Use MathJax to format equations. MathJax reference.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109897%2fis-there-any-use-case-for-the-bottom-type-as-a-function-parameter-type%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum

                              He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

                              Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029