Account Options

  1. Anmelden
Das alte Google Groups wird demnächst nicht mehr unterstützt. Die neue Version ist jedoch nicht kompatibel mit Ihrem Browser.
Google Groups-Startseite
« Google Groups-Startseite
Nachricht von Diskussion Enumeration must DIE...

Received: by 10.42.63.72 with SMTP id b8mr3892659ici.29.1350862458855;
        Sun, 21 Oct 2012 16:34:18 -0700 (PDT)
X-BeenThere: scala-internals@googlegroups.com
Received: by 10.42.210.198 with SMTP id gl6ls8582680icb.4.gmail; Sun, 21 Oct
 2012 16:34:17 -0700 (PDT)
Received: by 10.50.191.130 with SMTP id gy2mr4595567igc.4.1350862457791;
        Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
Received: by 10.50.191.130 with SMTP id gy2mr4595566igc.4.1350862457771;
        Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
Return-Path: <icho...@gmail.com>
Received: from mail-ia0-f173.google.com (mail-ia0-f173.google.com [209.85.210.173])
        by gmr-mx.google.com with ESMTPS id s15si1140757igi.1.2012.10.21.16.34.17
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
Received-SPF: pass (google.com: domain of icho...@gmail.com designates 209.85.210.173 as permitted sender) client-ip=209.85.210.173;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of icho...@gmail.com designates 209.85.210.173 as permitted sender) smtp.mail=icho...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-ia0-f173.google.com with SMTP id m10so2193133iam.18
        for <scala-internals@googlegroups.com>; Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=fNSGCUdt8G1bXLJkYlWDoZDre2llEfW5mdK7jy6XFuQ=;
        b=LKS4IbECMPmYNnxWVAxkdlxhkad/Qe1acZITNbzJuij2sozuZsC/M9x/1UG4l2KwUJ
         KtdWdLiRSwuXfu0GGZFLzabSbv0nbwTV2Oc6fAoTi8xCq1e47HelZu6E+TjM+6rE9d1p
         pdrZxLLQ44tqj0v6yy6jc/BnOFtcnwE8cisWAfqmtguQVZXszMRYeJO+XlxurElk13mR
         5MJhkrNZfVNULpy3Vb1MueruPIH/nr/pJfFGhTJp8kt0q60YPp5p4Bp8xTLy9WuWO0gm
         C6C1xzg5DVvGoFlcEJCucVnsGrzT8KI48AjK0sqfZHsOX/yG0wyEQqbEXgJ9Btqf3oM4
         XCbg==
MIME-Version: 1.0
Received: by 10.50.158.201 with SMTP id ww9mr14907074igb.22.1350862457625;
 Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
Received: by 10.64.8.111 with HTTP; Sun, 21 Oct 2012 16:34:17 -0700 (PDT)
In-Reply-To: <99dfd188-3eea-4284-b472-2624e2233436@googlegroups.com>
References: <CAPaMnL5eOVk5MDDPW--MTvht090f5oZavXyhzBnPxv-gH7v...@mail.gmail.com>
	<72bbb53c-41ec-496e-9631-621eb241c1e7@googlegroups.com>
	<CAENVNkb+9QOioiM1FuALnCVA32v3sbh2YHC03DkmppjKSFZ...@mail.gmail.com>
	<CAEaELhRdmdRZzpVzsdjjUBsprvi9kqD4tqGtCtxwqtSVwXz...@mail.gmail.com>
	<CAENVNkbNqydE=sLLKvBU9Lm-1h6Dwah2CC53qcA2dJJQXPq...@mail.gmail.com>
	<CAP_xLa3bGbzpvZgXfr=9Zo+sX2v_0irH_nUrcKQKAQFbmBW...@mail.gmail.com>
	<CAENVNkaMxdoJ+LiTDdAnY1P+T195dC8jwBCxPCD1kOjjVJ9...@mail.gmail.com>
	<4f8ff7d4-f9f3-4240-b328-b5994f76bb0c@googlegroups.com>
	<CAP_xLa3694VTtSM3-zJmgre5-LAcMVASvVTayx3D-xfbKa+...@mail.gmail.com>
	<8c11ede4-1bf8-4c10-8b4e-7237edc17ce5@googlegroups.com>
	<CAP_xLa3y_fehTqZvc3Dk6ZePCjsH+ZHApmnKwA2A=OabFX7...@mail.gmail.com>
	<99dfd188-3eea-4284-b472-2624e2233436@googlegroups.com>
Date: Sun, 21 Oct 2012 19:34:17 -0400
Message-ID: <CAP_xLa3=jPFAhTTjhG7K4019+ninidPPbT4+cTOE2nnQoKZ...@mail.gmail.com>
Subject: Re: [scala-internals] Re: Enumeration must DIE...
From: Rex Kerr <icho...@gmail.com>
To: scala-internals@googlegroups.com
Content-Type: multipart/alternative; boundary=14dae934063ded5ba604cc9a2cf4

--14dae934063ded5ba604cc9a2cf4
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Oct 21, 2012 at 6:56 PM, Simon Ochsenreither <
simon.ochsenreit...@gmail.com> wrote:

> If the rewritten scala.Enumeration isn't compatible with Java enums, why
> even bother rewriting it? I prefer a useless implementation with known bugs
> to a useless implementation with unknown bugs.
> There is a reason why practically no-one uses scala.Enumeration and
> "incompatible with the platform' idea of enums" and "buggy" rank pretty
> high on my list of suspects.
>

So you don't think it's possible to write less buggy/non buggy code?  Why
write anything?

Okay, so, kind of a straw man--I take it that you mean that platform
compatibility is an essential requirement for you.


> Nothing against a bit of NIH, but there is only one valid definition of
> "enum" and that's the one of the JVM. If the JVM tells me "no, that's not
> an enum, I won't allow you to use this in an annotation" I don't care about
> Scala's reason for failing to work as expected.
>

Reinforced by this point.  If you want Java enums, using Java is a pretty
sensible option.  But I don't personally miss being able to stick a Scala
Enumeration in a Java annotation.  >90% of my use cases is not creating new
annotations.  Unsafe numbering, namespace pollution, ints-only (see classic
java "Planets" example for what you can't do in Scala), etc. each chip off
a big fraction for me.  I'd be happy to have something better (c.f. "The
great is the enemy of the good.").

  --Rex

--14dae934063ded5ba604cc9a2cf4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Oct 21, 2012 at 6:56 PM, Simon Ochsenrei=
ther <span dir=3D"ltr">&lt;<a href=3D"mailto:simon.ochsenreit...@gmail.com"=
 target=3D"_blank">simon.ochsenreit...@gmail.com</a>&gt;</span> wrote:<br><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">
If the rewritten scala.Enumeration isn&#39;t compatible with Java enums, wh=
y even bother rewriting it? I prefer a useless implementation with known bu=
gs to a useless implementation with unknown bugs.<br>There is a reason why =
practically no-one uses scala.Enumeration and &quot;incompatible with the p=
latform&#39; idea of enums&quot; and &quot;buggy&quot; rank pretty high on =
my list of suspects.<br>
</blockquote><div><br>So you don&#39;t think it&#39;s possible to write les=
s buggy/non buggy code?=A0 Why write anything?<br><br>Okay, so, kind of a s=
traw man--I take it that you mean that platform compatibility is an essenti=
al requirement for you.<br>
=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">Nothing against =
a bit of NIH, but there is only one valid definition of &quot;enum&quot; an=
d that&#39;s the one of the JVM. If the JVM tells me &quot;no, that&#39;s n=
ot an enum, I won&#39;t allow you to use this in an annotation&quot; I don&=
#39;t care about Scala&#39;s reason for failing to work as expected.<br>
</blockquote><div><br>Reinforced by this point.=A0 If you want Java enums, =
using Java is a pretty sensible option.=A0 But I don&#39;t personally miss =
being able to stick a Scala Enumeration in a Java annotation.=A0 &gt;90% of=
 my use cases is not creating new annotations.=A0 Unsafe numbering, namespa=
ce pollution, ints-only (see classic java &quot;Planets&quot; example for w=
hat you can&#39;t do in Scala), etc. each chip off a big fraction for me.=
=A0 I&#39;d be happy to have something better (c.f. &quot;The great is the =
enemy of the good.&quot;).<br>
<br>=A0 --Rex<br></div></div><br>

--14dae934063ded5ba604cc9a2cf4--