or Connect
New Posts  All Forums:

Posts by JavaCowboy

 Not the same thing.If you read this, you'll understand:http://ceylon-lang.org/documentation/1.1/tour/types/
 I guess we should agree to disagree, because I see a monumental difference between syntactic sugar around a struct with conditional members and a fundamental feature of many language's type systems, including Haskell, ML, OCaML, Ceylon, etc.If I want a union between String and Integer, how do I do this in your subclassing example? I would need to treat both as Object? In my switch statement, I would need to explicitly check for String or Integer and then throw an...
Read thishttp://en.m.wikipedia.org/wiki/Tagged_union
Your childish comment was uncalled for. Perhaps I misinterpreted your assertion as implying an imaginary Apple infallibility, but a misinterpretation of a comment and an attempt at some petty squabbling are two vastly different things.I'm simply pointing out a possibility that you seem to steadfastly deny that Apple made one or more mistaking designing their newfangled language. My seeming misinterpretation of as supposed belief in Apple's infallibility comes from your...
 [sarcasm]Yes, Apple never makes any mistakes, and has never made any[/sarcasm]. Apple does consumer hardware and software better than most other companies most of the time, it doesn't mean they don't occasionally screw up. Or are you one of those people that would blame others for legitimate Apple mistakes? (ex the Cube).
What's wrong with different companies having different programming languages? Java's ubiquity has not been without problems, and with ubiquity there is the danger of complacency. Red Hat has Ceylon, Typesafe has Scala, Microsoft has C# and F#, etc. Apple has specific requirements for Swift, first and foremost is integrating with the Objective-C runtime and the Cocao libraries. Just because I disagree with some of their language design choices doesn't mean I'm...
Maybe it didn't occur to Apple's engineers to do so. It looks like a lot of the inspiration for Swift came from Scala, including the variablename:Type syntax.Either way, Java's final is by far the worst way to do this.
Huh? Are we talking about he same thing? A union type is a common supertype to two otherwise unrelated types. For example, a String | Integer. Having this feature at the language level allows for some very powerful features.
It's simple. The absence of a keyword should mean the variable is immutable. The presence of a keyword should mean the variable is mutable. For example, In Ceylon, a variable is immutable if there is no modifying keyword. So String text is immutable and variable String text is mutable. Thus, the developer must make a conscious decision to make a variable mutable.
I agree that exceptions can be abused but I think eliminating them takes away a useful tool that should be applied sparingly. For instance, exceptions are useful for assertions. That is, if you're expecting a List to contain something and it doesn't, and you know is is due to a programming error, making such an assertion is useful, especially early in he development cycle. With Swift, you'll need to check every single possibility with conditional logic. With the...
New Posts  All Forums: