News for hackers. Stuff that matters.
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @10:52AM (#2540740)
I find it incredibly ironic that they have called the company Typesafe when type-safety is something Scala definitely does not have.
Re:Martin Odersky (Scala creator) launches company to commer... by CaptainLurk on Thursday May 12, 2011 @10:56AM (#2540754)
Say what? Scala is statically typed, and does some awesome type inference so that you don't have to declare your type every place you declare a variable. It may look dynamically typed, but its not (http://programming-scala.labs.oreilly.com/ch12.html).
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @10:57AM (#2540760)
There are numerous holes in the type system. Just browse their bug tracker to see. And several of them are not just "bugs" but deep flaws in the type system.
Re:Martin Odersky (Scala creator) launches company to commer... by kikibobo69 on Thursday May 12, 2011 @11:05AM (#2540793)
I think the key thing is that there is no mechanism to be sure that messages you send to actors are immutable. There is a compiler plugin in development to help, though.
Re:Martin Odersky (Scala creator) launches company to commer... by gtani on Thursday May 12, 2011 @02:52PM (#2541848)
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @11:10AM (#2540816)
That's really a different issue than type safety.
Re:Martin Odersky (Scala creator) launches company to commer... by kikibobo69 on Thursday May 12, 2011 @11:18AM (#2540849)
Indeed, you are right...
Re:Martin Odersky (Scala creator) launches company to commer... by KirinDave on Thursday May 12, 2011 @11:40AM (#2540933)
The same could be argued of Haskell and many ML derivatives. Do you think this is particularly clever to point out?
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @11:45AM (#2540951)
So I'm curious, can you point to known problems with Haskell or ML that do not involve using the unsafe features? Scala has problems even without resorting to "unsafe" features like casting or native methods.
Re:Martin Odersky (Scala creator) launches company to commer... by swannodette on Thursday May 12, 2011 @12:11PM (#2541066)
GHC 7 recently broken with the traditional ML type checking / inference mechanism because it's not expressive enough for the kind of the code that Haskell wants to support. Noone has this stuff figured out, certainly not ML, Haskell, or Scala. Benjamin C Pierce has even written about how some domains are positively painful w/ strong type systems and how contracts are a more expressive solution.

I'd like to see the ideas behind the Art of the Metaobject Protocol applied to type systems. Allow users to selectively fill those holes that relevant for their domain.

Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @12:17PM (#2541097)
I don't see any mention of a specific safety problems. Plus, I am given to believe that there are actually numerous papers on the extensions involved in the Haskell type system. Consider http://haskell.org/haskellwiki/Simonpj/Talk:OutsideIn
Re:Martin Odersky (Scala creator) launches company to commer... by swannodette on Thursday May 12, 2011 @12:39PM (#2541207)
That is the paper I'm referring to. Type safety is an arms race with expressiveness and the paper pretty much says so.

REPLY: You're argument is reductive to the point of being useless - i.e. you could write a type checker for a domain of programs so small as to be comical. type safety and the domain of the provable programs are inextricably intertwined.

Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @12:41PM (#2541220)
I guess I'm not following, because type safety is a property of typed language. Expressive power is orthogonal. There are type systems that are more expressive and less expressive and ideally you design your language so that regardless of where it lies on the spectrum it has type safety. Otherwise, the type system does not really provide you with any real guarantees.
Re:Martin Odersky (Scala creator) launches company to commer... by KirinDave on Thursday May 12, 2011 @01:12PM (#2541361)
"I guess I'm not following, because type safety is a property of typed language. Expressive power is orthogonal."

This is where you have it wrong, and it's well known that it's wrong. Anyways...

Scala's is a series of compromises made to give a more expressive type system to a language that interacts with the JVM and and Java libraries. Saying its not "safe" to some arbitrary metric is neither insightful nor helpful to anyone. You can find it as "ironic" as you like, but it's not a particularly fair criticism by many metric.

Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @01:54PM (#2541568)
I'm guessing you've never actually proven type safety for a non-trivial language, if any. While there are many ways type safety could be stated for Scala, I'm pretty sure most Scala programmers would like the version of type safety that states "if I never use a type cast, I can never get a class cast exception." If you think that is too strong of a statement, then fine, but I think most people would agree this is a reasonable expectation for Scala.
Re:Martin Odersky (Scala creator) launches company to commer... by andrewcooke on Thursday May 12, 2011 @05:26PM (#2542388)
a type system can be both logically consistent and expressive. the trade-off is with things like the efficiency with which it can prove the program is correct (and even the possibility that it cannot be proved at all).

what typesafety is talking about is errors. not trade-offs. that the type system says something is safe when it is not.

Re:Martin Odersky (Scala creator) launches company to commer... by jordibunster on Thursday May 12, 2011 @11:02AM (#2540780)
Please point to a few.
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @11:05AM (#2540791)
Re:Martin Odersky (Scala creator) launches company to commer... by jjm on Thursday May 12, 2011 @12:23PM (#2541122)
Hm... As an early Scala/Akka developer, and contributor I would like to see these issues addressed by the team because I'm seeing a lot of trac jacking going on. This usually only happens when there isn't a response to issues.
Re:Martin Odersky (Scala creator) launches company to commer... by cmkrnl on Thursday May 12, 2011 @03:15PM (#2541926)
Are you of the opinion that the problems with the Scala type system are unfixable?
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @03:17PM (#2541935)
I would like them to be fixable, because otherwise Scala is a decent language, but it is too early to say.
Re:Martin Odersky (Scala creator) launches company to commer... by smcj on Thursday May 12, 2011 @04:34PM (#2542209)
Hi Tony,

isn't #963 more or less fixed? (It crashes the compiler, but doesn't fail at runtime anymore ...)

Could you post a new example of it if it isn't?

Re:Martin Odersky (Scala creator) launches company to commer... by shasta on Thursday May 12, 2011 @05:43PM (#2542459)
Isn't crashing the compiler pretty far to the "less" side of "more or less fixed"?
Re:Martin Odersky (Scala creator) launches company to commer... by smcj on Friday May 13, 2011 @03:56PM (#2545950)
Failure to compile is always better than generating wrong bytecode.
Re:Martin Odersky (Scala creator) launches company to commer... by shasta on Saturday May 14, 2011 @09:34AM (#2547630)
Right, but I don't think "fixed: replaced with compiler crash" is a resolution you'll see in many bug databases
Re:Martin Odersky (Scala creator) launches company to commer... by harryh on Thursday May 12, 2011 @12:34PM (#2541184)
Tony? This has got to be Tony....
Re:Martin Odersky (Scala creator) launches company to commer... by KirinDave on Thursday May 12, 2011 @01:21PM (#2541401)
I laughed. Hard.
Re:Martin Odersky (Scala creator) launches company to commer... by gtani on Thursday May 12, 2011 @02:58PM (#2541871)
Re:Martin Odersky (Scala creator) launches company to commer... by CodeMage on Thursday May 12, 2011 @06:10PM (#2542545)
Sorry, I don't get it. Can you explain the joke (even if it kills it)?
Re:Martin Odersky (Scala creator) launches company to commer... by foobarbazetc on Thursday May 12, 2011 @10:25PM (#2543284)
Hehehehehe.
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @02:29PM (#2541741)
Good one.
Re:Martin Odersky (Scala creator) launches company to commer... by shasta on Thursday May 12, 2011 @11:50AM (#2540973)
Incredibly ironic? It sounds like you've found a couple of bugs. What's with the throw away hatchet account?
Re:Martin Odersky (Scala creator) launches company to commer... by typesafety on Thursday May 12, 2011 @11:59AM (#2541027)
I didn't find these bugs, they're just ones that have been accumulating over the years. If all of these were as simple as being "bugs" rather than flaws in the type system why wouldn't they have been fixed by now?

Is there something wrong with trying to encourage them to fix these problems and make Scala all the better for it?