digitalmars.D - FYI: Ceylon
- Paul D. Anderson (33/33) Jul 13 2012 I took a quick look at the Ceylon language
- H. S. Teoh (13/21) Jul 13 2012 Yikes! As soon as I saw '===', I went "no way, no how". That's one of
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (8/27) Jul 13 2012 They were originally meant for some potential close-to-the-machine FPU
- Walter Bright (2/5) Jul 13 2012 Those are on the "to deprecate" list.
- Jonathan M Davis (7/13) Jul 13 2012 Which really should become the "deprecated" list. We have quite a few th...
- bearophile (4/13) Jul 13 2012 +1
- Nick Sabalausky (4/15) Jul 13 2012 Indeed. '===' operators are generally, if not always, indicative of a
- H. S. Teoh (9/26) Jul 13 2012 What boggles my mind is the fact that they have '===' *and* 'is'. I
- Paulo Pinto (3/26) Jul 14 2012 Easily doable in any language where operators are plain function names,
- Timon Gehr (3/5) Jul 14 2012 'is' is not a binary operator. It is the equivalent of 'instanceof' in J...
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (9/24) Jul 14 2012 The way Ceylon did it is definitely insane. But, I don't think having
I took a quick look at the Ceylon language (http://ceylon-lang.org/) which is supposed to be a follow on to Java (they disavow the name "Java Killer" <wink, wink, nudge, nudge>). One of their design goals is "familiar, readable syntax", but they seemed to have missed the boat on that one. Their type system is Byzantine and it is the heart of the language. But I thought this little fragment from their spec dealing with type constraints was interesting: (The words "given", "satisfies", "abstracts", "of" and "is" are keywords.) <quote> There are five different kinds of type constraint: • an upper bound, given X satisfies T, specifies that the type parameter X is a subtype of a given type T, • a lower bound, given X abstracts T, specifies that a given type T is a subtype of the type parameter X, • an enumerated bound, given X of T|U|V specifies that the type parameter X represents one of the enumerated types, • a parameter bound, given X(...) specifies that the type parameter X is a concrete class with the given parameter types, and • a metatype bound, given X is T, specifies that the concrete metatype of the type parameter is a subtype of a given type T. </quote> They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively. They have an identity operator but also have the keyword 'is', which should give you an inkling of the languages complexity. I assume 'compare' is the same as D's 'opCmp', and it strikes me as a useful operator. (Although I think the unusual comparison operators in D ('!<>=') wound up high on the list of the "too many features" post. Paul
Jul 13 2012
On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:I took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!They have an identity operator but also have the keyword 'is', which should give you an inkling of the languages complexity. I assume 'compare' is the same as D's 'opCmp', and it strikes me as a useful operator. (Although I think the unusual comparison operators in D ('!<>=') wound up high on the list of the "too many features" post.[...] Yeah... when I got to operators in my D lexer toy implementation, I was dumbstruck at how many ASCII UFOs ^W^W I mean, comparison operators D has. Most of which I have a hard time imagining a use for. T -- The most powerful one-line C program: #include "/dev/tty" -- IOCCC
Jul 13 2012
On 14-07-2012 01:49, H. S. Teoh wrote:On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:They were originally meant for some potential close-to-the-machine FPU code. I have yet to see any actual code that needed them (i.e. as opposed to library helper routines). -- Alex Rønne Petersen alex lycus.org http://lycus.orgI took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!They have an identity operator but also have the keyword 'is', which should give you an inkling of the languages complexity. I assume 'compare' is the same as D's 'opCmp', and it strikes me as a useful operator. (Although I think the unusual comparison operators in D ('!<>=') wound up high on the list of the "too many features" post.[...] Yeah... when I got to operators in my D lexer toy implementation, I was dumbstruck at how many ASCII UFOs ^W^W I mean, comparison operators D has. Most of which I have a hard time imagining a use for. T
Jul 13 2012
On 7/13/2012 4:49 PM, H. S. Teoh wrote:Yeah... when I got to operators in my D lexer toy implementation, I was dumbstruck at how many ASCII UFOs ^W^W I mean, comparison operators D has. Most of which I have a hard time imagining a use for.Those are on the "to deprecate" list.
Jul 13 2012
On Friday, July 13, 2012 17:58:27 Walter Bright wrote:On 7/13/2012 4:49 PM, H. S. Teoh wrote:Which really should become the "deprecated" list. We have quite a few things that we've long said we're getting rid of but haven't yet, and in many cases, people continue to write code which uses them without realizing that they won't be around long term. We're creating headaches for ourselves and others by delaying the deprecation of this stuff. - Jonathan M DavisYeah... when I got to operators in my D lexer toy implementation, I was dumbstruck at how many ASCII UFOs ^W^W I mean, comparison operators D has. Most of which I have a hard time imagining a use for.Those are on the "to deprecate" list.
Jul 13 2012
Jonathan M Davis:Which really should become the "deprecated" list. We have quite a few things that we've long said we're getting rid of but haven't yet, and in many cases, people continue to write code which uses them without realizing that they won't be around long term. We're creating headaches for ourselves and others by delaying the deprecation of this stuff.+1 Bye, bearophile
Jul 13 2012
On Fri, 13 Jul 2012 16:49:03 -0700 "H. S. Teoh" <hsteoh quickfur.ath.cx> wrote:On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:Indeed. '===' operators are generally, if not always, indicative of a thoroughly broken '=='.I took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!
Jul 13 2012
On Sat, Jul 14, 2012 at 01:00:18AM -0400, Nick Sabalausky wrote:On Fri, 13 Jul 2012 16:49:03 -0700 "H. S. Teoh" <hsteoh quickfur.ath.cx> wrote:What boggles my mind is the fact that they have '===' *and* 'is'. I don't think I want to know what's the difference between them. One of these days, I should invent a language that sports the ==== operator. Along with the associated <====> operator and the ^_^ operator. T -- The two rules of success: 1. Don't tell everything you know. -- YHLOn Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:Indeed. '===' operators are generally, if not always, indicative of a thoroughly broken '=='.I took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!
Jul 13 2012
Am 14.07.2012 07:13, schrieb H. S. Teoh:On Sat, Jul 14, 2012 at 01:00:18AM -0400, Nick Sabalausky wrote:Easily doable in any language where operators are plain function names, like ML-family, Lisp, Smalltalk, ...On Fri, 13 Jul 2012 16:49:03 -0700 "H. S. Teoh"<hsteoh quickfur.ath.cx> wrote:What boggles my mind is the fact that they have '===' *and* 'is'. I don't think I want to know what's the difference between them. One of these days, I should invent a language that sports the ==== operator. Along with the associated<====> operator and the ^_^ operator.On Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:Indeed. '===' operators are generally, if not always, indicative of a thoroughly broken '=='.I took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!
Jul 14 2012
On 07/14/2012 07:13 AM, H. S. Teoh wrote:What boggles my mind is the fact that they have '===' *and* 'is'. I don't think I want to know what's the difference between them.'is' is not a binary operator. It is the equivalent of 'instanceof' in Java. is Type object
Jul 14 2012
On 14-07-2012 07:00, Nick Sabalausky wrote:On Fri, 13 Jul 2012 16:49:03 -0700 "H. S. Teoh"<hsteoh quickfur.ath.cx> wrote:The way Ceylon did it is definitely insane. But, I don't think having === *or* is, in addition to ==, is inherently bad. === would just be the reference comparison operator, while == would always be for whatever equality a class/interface has defined. -- Alex Rønne Petersen alex lycus.org http://lycus.orgOn Sat, Jul 14, 2012 at 01:31:02AM +0200, Paul D. Anderson wrote:Indeed. '===' operators are generally, if not always, indicative of a thoroughly broken '=='.I took a quick look at the Ceylon language (http://ceylon-lang.org/)[...]They also have couple of operators, '===' and '<=>' meaning 'identical' and 'compare', respectively.Yikes! As soon as I saw '===', I went "no way, no how". That's one of the most egregious flaws of languages like JavaScript. And they have 'is' on top of that?! Double yikes! What _must_ their type system look like?!
Jul 14 2012