Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.php > #3846

Re: return types

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups de.comp.lang.php
Subject Re: return types
Date 2016-03-31 14:16 +0200
Organization solani.org
Message-ID <ndj4e7$ol6$1@solani.org> (permalink)
References <1t56fced94i14b9n3e8%sfroehli@Froehlich.Priv.at>

Show all headers | View raw


Stefan Froehlich schrieb:

> Ich habe mich jetzt einmal ein wenig mit return types herumgespielt, weil
> ich mir davon ein bisschen an zusätzlicher Kontrolle verspreche. Zum einen
> erfüllt sich das (noch) nicht, weil sicherlich die Hälfte meiner Methoden
> alternativ auch NULL zurückgeben kann, was momentan nicht unterstützt wird.

Das Thema wird seit einer Weile viel diskutiert (u.a. bzgl. der "Typed
Properties"[1]); eine mögliche Lösung wären "Union Types"[2], eine
andere "Nullable Types" wie von Hack unterstützt[3].

[1] <https://wiki.php.net/rfc/typed-properties>
[2] <https://wiki.php.net/rfc/union_types>
[3] <https://docs.hhvm.com/hack/types/type-system#nullable>

-- 
Christoph M. Becker

Back to de.comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-03-31 09:35 +0000
  Re: return types k@rl.pflaesterer.de (Karl Pflästerer) - 2016-03-31 12:42 +0200
  Re: return types "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-03-31 14:16 +0200
    Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-04-15 06:37 +0000
    Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-06-22 08:48 +0000
      Re: return types "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-22 12:25 +0200
        Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-06-22 14:49 +0000
          Re: return types "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-22 17:47 +0200
            Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-06-23 08:23 +0000
              Re: return types "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-07-02 01:03 +0200
  Re: return types Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-31 21:40 +0200
    Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-04-01 16:26 +0000
      Re: return types "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-04-02 19:23 +0200
        Re: return types Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 20:36 +0200
        Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-04-11 21:18 +0000
      Re: return types Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 20:33 +0200
        Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-04-11 21:32 +0000
          Re: return types Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-19 20:24 +0200
            Re: return types Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2016-04-20 07:05 +0000
              Re: return types Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-21 02:55 +0200

csiph-web