Slashdot Mirror


Scala, a Statically Typed, Functional, O-O Language

inkslinger77 notes a Computerworld interview with Martin Odersky on the Scala language, which is getting a lot of attention from its use on high-profile sites such as Twitter and LinkedIn. The strongly typed language is intended to be a usable melding of functional and object-oriented programming techniques. "My co-workers and I spend a lot of time writing code so we wanted to have something that was a joy to program in. That was a very definite goal. We wanted to remove as many of the incantations of traditional high-protocol languages as possible and give Scala great expressiveness so that developers can model things in the ways they want to. ... You can express Scala programs in several ways. You can make them look very much like Java programs which is nice for programmers who start out coming from Java. ... But you can also express Scala programs in a purely functional way and those programs can end up looking quite different from typical Java programs. Often they are much more concise. ... Twitter has been able to sustain phenomenal growth, and it seems with more stability than what they had before the switch, so I think that's a good testament to Scala. ... [W]e are looking at new ways to program multicore processors and other parallel systems. We already have a head start here because Scala has a popular actor system which gives you a high-level way to express concurrency. ... The interesting thing is that actors in Scala are not a language feature, they have been done purely as a Scala library. So they are a good witness to Scala's flexibility..."

57 of 299 comments (clear)

  1. pronounced ... by neonprimetime · · Score: 2

    ... skah-lah not scale-la

    1. Re:pronounced ... by Profane+MuthaFucka · · Score: 5, Funny

      Same difference. You say potato, I say you're an asshole.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
  2. Wanted: Scala Expert by sycodon · · Score: 5, Funny

    Scala Programmers: $35K - $45K

    Our company is looking for motivated individuals with 5 + years in depth experience with Scala.
    Must be familiar with all aspects of O-O Languages.

    We are an equal opportunity employer.

    --
    When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    1. Re:Wanted: Scala Expert by Thuktun · · Score: 4, Informative

      Since Scala's been out since early 2004, it's entirely possible to have had five years of experience with it.

  3. Type erasure by shutdown+-p+now · · Score: 4, Informative

    Scala is great, but one really annoying thing about it is that it inherits type erasure implementation of generics from Java. This means that you cannot overload methods on argument with the same generic class with different type parameters, cannot implement the same generic interface with different type parameters on the same class, cannot check whether a class implements a particular generic interface for a given type parameter, etc. They did fix some issues - for example, you can instantiate arrays - but it's still far from perfect.

    I understand the need to match Java's broken model for the sake of interoperability, but surely a better way can be devised for pure Scala code? It's pretty much the only area where Scala noticeably lags behind advanced .NET-hosted languages (such as Nemerle or F#).

    1. Re:Type erasure by pjt33 · · Score: 3, Informative

      The third of your listed limitations is semi-bogus: you can't check generic type information with instanceof, but java.lang.Class.getGenericInterfaces gives you the information you need if you're prepared to write a method to process it.

      I can't help feeling that the first two can be worked around too if you're prepared to be more creative with your Miranda methods than javac.

  4. Re:Reinventing the wheel is sometimes good by hey · · Score: 3, Informative

    Like mod_perl ?

  5. Re:Reinventing the wheel is sometimes good by Fnord · · Score: 2, Informative

    You mean like Mason? Possibly you're looking for something more like Catalyst?

    These things have been available for Perl for a long time.

  6. Re:Eh sonny? by iluvcapra · · Score: 4, Insightful

    To be fair, FailWhale has not been seen by me of late, and the Twitter devs attribute their salvation to Scala. However, there are some pretty good arguments that the Twitter developers Mother of All Fail was initially trying to write their own hand-rolled message queue instead of simply using one off-the-shelf.

    --
    Don't blame me, I voted for Baltar.
  7. Re:Miracle language. by Doctor+O · · Score: 2, Funny

    maybe it will make my hair grow back

    OTOH, it might as well make your back hair grow, and who wants that?

    --
    Who is General Failure and why is he reading my hard disk?
  8. Re:Strongly typed language? by Anonymous Coward · · Score: 2, Informative

    http://en.wikipedia.org/wiki/Strongly_typed

  9. Re:Strongly typed language? by Ann+Coulter · · Score: 4, Informative

    Strongly typed languages usually make type conversions explicit and enforce type restrictions; whereas weakly typed languages usually allow implicit type conversions and relax type restrictions.

    Explicit type conversions disallow a value of type T to be treated as a value of type S without invoking a function that takes a value of type T and returns a corresponding value of type S. For example, a conversion from an integer type to a floating point type requires the invocation of a function that performs the conversion. Contrast this with implicit type conversions where a value can be treated as almost any type depending on how it is to be used.

    Type restrictions only allow certain operations to be done to certain types. For example, numerical addition mïay only be performed on numerical types. A lack of type restrictions allow for numerical addition to apply for, say, booleans, for example.

  10. Re:Reinventing the wheel is sometimes good by Coryoth · · Score: 2, Insightful

    But if all you're doing is reinventing Perl with C-like syntax, it's not really a step forward.

    Perl already has C-like syntax. It doesn't, however, have static type checking, let alone robust static type checking (with nice features like variance annotation etc.); nor does it have particularly robust functional programming support -- you can certainly do functional programming in Perl, but it isn't as clean and syntactically sugared as it could be; nor does perl have particularly clean OO if we're being honest -- yes it works and can be made to work quite well, but elegant isn't a word that comes to mind when I think Perl and OO; nor does Perl have function pattern matching and algebraic data types; nor does Perl have a nice concurrent programming interface based on the Actor model. None of this is really to say that Perl is bad -- it is very good for a great many things, and the features I've mentioned needn't hold it back. My point is that Scala is most certainly not re-inventing Perl. In fact Scala doesn't even have a particularly C-like syntax: it's less C-like than Perl really.

  11. Re:Miracle language. by spun · · Score: 4, Funny

    ... Twitter has been able to sustain phenomenal growth, and it seems with more stability than what they had before the switch, so I think that's a good testament to Scala...Hmmmm, maybe I should switch my company's programming language to Scalia. After all, it cause market share to increase, computer systems to become more stable, and maybe it will make my hair grow back. I'm in!

    No, this is Scala, a language that is a blend of functional and object oriented programming. Scalia is mix of textualism and originalism with a very conservative framework. Some consider its inability to recuse itself to be its greatest asset.

    --
    - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
  12. Re:Strongly typed language? by xgr3gx · · Score: 4, Funny

    Ah - duh. Immediately started thinking typed, as in the clicky clicky kind of typing done on a keyboard.
    Man, was that a loud and smelly brain fart.
    Thanks for that.
    Sorry. Sorry Everyone!

    --
    Shameless plug alert: Game server control panel
  13. Re:Strongly typed language? by Dgtl_+_Phoenix · · Score: 2, Informative

    Assuming you're not being merely rhetorical (because the definition is kind of loose), strongly typed just means that the language makes some restrictions on how operations operating on different value types can be intermixed. Assuming that you're not a programmer, I'll give an example. Letâ(TM)s say you have a BMW Z4 roadster. It's a car. Understanding the nature of cars, you know that it can be classified as a vehicle, a sports car, a BMW sports car, and a BMW Z4 roadster. Strongly type languages make restrictions like you can't just say: roadsterCar car = myCar. This is implicitly is saying my car is roadster. Rather you have to explicitly say that the car is a roadster (called a cast) like this: roadsterCar car = (roadsterCar) myCar This concept has a number of benefits, most of which are related to catching programming mistakes before they become bugs or immediately at runtime. Without strongly typed languages, you won't notice that you tried to call a bike a BMW Z4 roadster until you try to get it up to 140 miles an hour. And by then you might have tried to do valid but nonsensical things that might have really broken something.

  14. Scala is a joy... by sitarlo · · Score: 5, Informative

    Probably the most robust JVM compatible language to date. Even the creater of Groovy digs Scala: http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html

  15. Doomed by decipher_saint · · Score: 5, Funny

    Martin Odersky is beardless, Scala is doomed.

    --
    crazy dynamite monkey
    1. Re:Doomed by Adm.Wiggin · · Score: 2, Informative

      Finally, the comment I was looking for, since I was too lazy to look up his picture.

      For the curious: http://www.alenz.org/mirror/khason/why-microsoft-can-blow-off-with-c.html
      And the followup: http://khason.net/blog/computer-languages-and-facial-hair-%E2%80%93-take-two/

  16. MVC framework by Godskitchen · · Score: 2, Funny

    Scala on Scales?

  17. Not sold on Scala by glwtta · · Score: 4, Interesting

    Am I the only one not terribly enamored with Scala? It's a massive language (have you seen the book?), but a lot of the syntax is somewhat redundant and doesn't seem to add that much. The type system is downright byzantine, and the Java interface is, let's say, somewhat inelegant. And the whole object-functional thing seems like a paradigm in search of an audience (maybe I'm just not getting it).

    And you get to pay for all this with a huge performance hit.

    I guess their "more is more" approach is mostly making Clojure look more attractive.

    --
    sic transit gloria mundi
    1. Re:Not sold on Scala by shutdown+-p+now · · Score: 3, Interesting

      Am I the only one not terribly enamored with Scala? It's a massive language (have you seen the book?), but a lot of the syntax is somewhat redundant and doesn't seem to add that much. The type system is downright byzantine, and the Java interface is, let's say, somewhat inelegant.

      I've read the book. Yes, it's fairly complicated, but then all languages tend to become that as they move from academia or design-by-committee stage into real world - witness Java. In terms of power, however, it's one of the most advanced languages today which can be used in production... and yet it's statically typed, which is a plus in my book.

      And the whole object-functional thing seems like a paradigm in search of an audience (maybe I'm just not getting it).

      You probably aren't. It's been a big thing in .NET land ever since C# 3.0 appeared, and grows even bigger now with F#. It's a pragmatic approach - it gives you both OO and FP tools, and lets you mix and match freely to get the optimal balance for the task at hand.

      And you get to pay for all this with a huge performance hit.

      I guess their "more is more" approach is mostly making Clojure look more attractive.

      Funny how you speak about performance hit, and then immediately mention Clojure...

      Anyway, where did you see the "huge" perf hit there? Examples? It's still JVM bytecode, remember, and it's statically typed, so in the end it's mostly normal Java method invocations all around. It has to fall back on reflection for some things that JVM simply doesn't support otherwise, but those are corner cases, not normal operation.

    2. Re:Not sold on Scala by JAlexoi · · Score: 3, Interesting

      whole object-functional thing seems like a paradigm in search of an audience

      Ah, young grasshopper. You are not aware of the mixed paradigm programming languages then. See OCaml, that is object/function oriented lang.

      And you get to pay for all this with a huge performance hit.

      That is definitely an overstatement. The performance hit is not huge, it's not even big.

      Now, if you want a language with truely different syntax, try erlang.

    3. Re:Not sold on Scala by TheNarrator · · Score: 2, Interesting

      I just finished reading Programming In Scala. Yes, it's a big language. There is a lot going on for sure. Extractors, Case Classes, Pattern Matching, Implicit Functions, just to name a few. Reading about scala can be a bit overwhelming. I had to really get my hands dirty with a small project before I really was able to understand and appreciate all the features and how they work together. The fun thing about Scala though is that one can start out programming in a Java style and slowly incorporate its more advanced features. While working on a toy web app in the excellent Lift web framework, I found that as I applied Scala features my code kept getting smaller and smaller. It was kind of fun to see how small I could get it as I piled on more language features. I actually found myself quite amused at the power of the language.

  18. Re:Twitter - testament to Scala - Really? by Ichoran · · Score: 4, Insightful

    A very high volume of triviality is non-trivial.

  19. Re:Reinventing the wheel is sometimes good by SL+Baur · · Score: 2, Informative

    My point is that Scala is most certainly not re-inventing Perl.

    True, it also doesn't appear to be a reimplementation of anything. It's somewhat related to Java (Scala programs execute with the JVM).

    The code snippets on the website http://www.scala-lang.org/ are intriguing. It's certainly a terse language. That's both good and bad.

  20. Re:Strongly typed language? by SL+Baur · · Score: 2, Informative

    Scala is statically typed. Most languages are strongly typed so that's not a particularly useful metric.

    Static typing means that every object type is known at compile time and thus type safeness can be enforced before the code is executed.

  21. Choosing a language by jma05 · · Score: 4, Insightful

    I could use an alternative programming language for the JVM that is more expressive than Java. Both Scala and Groovy integrate well with Java at the language level, albeit with different type systems. While I do use Groovy from time to time, what kept me from Scala was that it is not well supported by IDEs (Eclipse/Netbeans - I hear things are somewhat better with IntelliJ). The problem is the nature of Java libraries. They tend to be deeply nested and often expressed in lower level abstractions and are difficult to use without strong IDE support. I don't need an IDE for Python (flat module systems, high level libraries), but certainly do for Java. With solid IDE support however, I am nearly as productive in Eclipse + Java as with dynamic languages, even for medium apps. Scala and Groovy come with their own standard libraries and I don't need IDE support as long as I stay within them. But sooner or later, I will need to step into plain Java land and I no longer feel productive. I would rather use straight Java for them.

    The development experience is language + tools, not just the language. While Scala can piggy back on JVM and undercut the rest of the process that languages need to go through to mature and be accepted, Scala plugin (or someone else) has to provide a JDT equivalent first to have popular appeal.

    I just wish there was a well supported superset of Java with productivity considerations that maintains 1:1 byte-code compatibility on compilation. Java purists can keep their language clean. But the rest of us can be happy too. Scala has that potential.... almost. So far, Groovy has been filling that role for me. Groovy will never have the kind of edit-time IDE intelligence simply due to it's dynamic nature. But for now, it stands ahead (after all, it has been around longer).

    1. Re:Choosing a language by slartibart · · Score: 4, Interesting

      Groovy is different because it's easy for Java programmers to learn. In fact, most Java devs can understand Groovy code with little or no explanation. That's certainly not the case for JRuby or Jython. In any event, I agree Clojure is pretty sweet. However, being a Lisp, it's future is questionable. A lot of devs won't be willing to deal with the brain melting process necessary to grock it.

      Yeah I agree with you there. I do use groovy as my "java and then some" language. It looks an awful lot like ruby to me, but yes it's more java-like.

      Its unfortunate about lisp(s) and their popularily, because honestly I don't see what's so difficult about them. Macros are hard, but lisps don't force you to use them. Other languages don't even give you an option, you can't. Paren matching is done by any modern editor. Prefix notation is a bit unintuitive I guess, but that slowed me down for maybe a couple of weeks, about the same as new syntax for almost any language. I am starting to think that "a lot of devs" just don't want to understand it. Or maybe a lot of devs just don't get programming in general, they just learn their one language, and can maybe pick up a few similar ones.

  22. Re:Reinventing the wheel is sometimes good by moon3 · · Score: 4, Funny

    already has C-like syntax

    Why not use the C instead then, or even better C++. After all many top websites run C++ (Google,eBay,Yahoo) as it is the fastest, well memory utilizing, best threading performance and green/CPU saving solution. With the native processor exceptions used properly it is also the most robust solution.

  23. OO + Functional = CLOS by helixcode123 · · Score: 2, Interesting

    Umm... I think we were doing this a long time ago in Lisp with CLOS (and flavors).

    --

    In a band? Use WheresTheGig for free.

  24. Re:Oooooooohhhh.... by david_thornley · · Score: 2, Insightful

    Next biggest thing for the "guys with a job" crowd.

    Learn some other language that isn't C#, Java, C++, VB.NET, or in fact particularly related.

    Specifically, learn something with functional programming, or a different sort of object orientation (Common Lisp comes to mind, or Smalltalk or Objective-C), or declarative programming (like Prolog)...anything that's considerably different from any of the standard compiled OO languages.

    Learn and improve, or don't learn and become unable to earn a living in the field.

    --
    "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  25. Re:Strongly typed language? by Abcd1234 · · Score: 4, Insightful

    Most languages are strongly typed so that's not a particularly useful metric.

    Hardly. The One True Language for client-side web development, aka Javascript, is weakly typed, as is PHP, that ubiquitous server-side programming language. Perl is weakly typed. Good ol' shell script is weakly typed. Heck, even C is considered weakly typed (unless you enable -Werror, of course).

  26. Bit more on the twitter culture. by juuri · · Score: 4, Interesting

    Recently I decided to move from contracting to full time work as the job market is balls here in the Bay currently for Contracts. Twitter was one of the companies which I applied and I had the pleasure of having a "phone screen" with them for a senior unix position. Here's what this screen was, a basic unix question, that any lunix user could get. A more intermediate type question that could trick some people. And finally their *BIG SCREEN* a tricky question that was based on esoteric knowledge that had absolutely nothing to do with one's ability to perform the job.

    The person calling me was just reading these off a list, she didn't know why they were picked and was only able to write down the answers. Here's the hilarious part, I informed her that the question was silly and there's no reason anyone should really care about this sort of information except in extreme situations. That this was the question that lead me to believe they had a culture of primadonnas. She diligently wrote all this down, in case they still wanted to talk to me.

    But here's the REAL kicker, their stupid asinine esoteric question? Was wrong. They had the phrasing wrong... what they were asking and looking for in an answer were not the same things. Being a pedantic asshole, in my followup to tell them what I thought of their process I pointed this out. Never heard anything back ;) Wonder if they have fixed their question yet?

    --
    --- I do not moderate.
    1. Re:Bit more on the twitter culture. by MyLongNickName · · Score: 4, Funny

      Wow! You sure showed them!

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    2. Re:Bit more on the twitter culture. by juuri · · Score: 2, Insightful

      I was completely pleasant with the woman, we joked about the questions in fact. The simple fact was they had a stupid call screen process straight out the egotistical dot.com days, which showed much about the types of "engineers" they like to bring in.

      Thanks for assuming that I was an ass thought. :)

      --
      --- I do not moderate.
    3. Re:Bit more on the twitter culture. by twiddlingbits · · Score: 2, Insightful

      they must have some of the old Amazon.com folks there. Amazon was like that. Same type of questions, same type of mistakes in what and how they asked the question except they did it in person. I had the same reaction as you did, told them they were wrong in the specification which led to their answer being an incorrect solution. They got pissed and ended the interview. I caught an early flight back :) Plus people were on call 24x7 and worked hellacious hours for low pay and lots of worthless stock options.

    4. Re:Bit more on the twitter culture. by BitHive · · Score: 2, Funny

      Sounds to me like their bozofilter worked perfectly.

  27. Re:Strongly typed language? by StuffMaster · · Score: 2, Funny
  28. Sold on Scala by mcpotato · · Score: 4, Interesting

    I have not only seen the book but also read it (assuming you mean Programming in Scala). It is very well written and gets you started with Scala easily.

    I do not agree that the syntax is redundant. To the contrary: an important part of the language design is that Scala enables the programmer to extend the language using libraries. A good example is the way collections and iteration work in Scala vs. the way the foreach loop has been added in Java 5.

    Whether static type systems help or hinder depends on whether you work with or agaist it, and on the kind of programs you write. The Scala type system is rather advanced (in the sense of complete) such that it allows you to express more in the type system than other languages do.

    For Java style programming Scala is just much simpler and shorter to write. When you have written some code in both you can appreciate the way Scala works.

    There has already been a comment on multi-paradigm programming, I do not have to extend that.

  29. Re:Runs on Java JVM. Why bother? by Ichoran · · Score: 4, Interesting

    Those supposedly cute features are there for a reason--they make abnormally clean and maintainable code possible.

    The best Scala code I've seen is clearer (to an outside observer) than the best Java code could possibly be, since the language features allow you to focus more on what is going on rather than necessary theatrics.

    The worst Scala code is, admittedly, worse than the worst Java code could possibly be.

    So, if I had programmers who wrote nice clean code, I'd encourage them to use Scala. If I had programmers who wrote ugly tangled code, I'd force them to use Java.

  30. Re:Oooooooohhhh.... by PylonHead · · Score: 2, Interesting

    No question that anyone who wants to make a living programming probably needs to learn a business safe language like the ones you mention.

    Still, some of us really enjoy programming, even when we aren't making a buck off it. Working with a new language can make you think about programming in a new way, and can teach you lessons that you can bring back to your day to day business work.

    Let's not forget how fun masturbation can be!

    --
    # (/.);;
    - : float -> float -> float =
  31. Re:oblig by d'fim · · Score: 3, Funny

    "C++ for everything. All the other languages start off with it after all."

    Examples: Fortran, Lisp, C.....

    --
    Adherence to the truth is a form of disloyalty.
  32. Wrong, wrong, and.. wrong.. by synthesizerpatel · · Score: 2, Insightful

    >> , the rest of us either (a) remember the types of our variables

    1) Strong typing helps compilers and processors, not programmers. A weak programmer wouldn't understand the value of a strongly typed language.

    2) Any developer who says he 'remembers the types of our variables' is either lying, or inexperienced. You may remember it today, a week from today, or perhaps even a month. You will not in a year. Nobody who looks at your code will 'instantly know' unless you name your variables 'thisIsAnUnsignedInt32', which, would be pretty silly.

    3) SE Asia and India produce many fine programmers (FYI, I'm a caucasian american, so no favoritism.). because of the lower prices of programmers from India and SE Asia you're statistically likely to see _more_ of them, hence more bad programmers.

  33. Re:Strongly Typed programming languages by SoftwareArtist · · Score: 5, Insightful

    Strong typing helps _only_ weak programmers, the rest of us either (a) remember the types of our variables or (b) expect "1" + "2" -> 3, not "12".

    As a programmer with 25 years of experience, I could hardly disagree more. When developing any large project, static typing is hugely beneficial. It lets you catch far, far more errors at compile time. In a dynamic language, those would all be runtime errors that could easily slip through your testing and make it out to a customer. It makes automated refactoring possible. (Ever try doing a major restructuring of a 500k line code base written in a dynamic language? Good luck!) It enables all sorts of static analyses that let you be a more productive programmer. Try using a really good Java IDE like Intellij IDEA, then try the best Python or Ruby editor available, and you'll feel like you've gone back to the stone age. No "Find Usages"? No autocompletion? No "Go to Definition"? You simply can't do these things in a dynamic language, because the editor has no idea what the type of any variable is.

    This isn't meant to criticize dynamic languages. They definitely have their place. But 90% of the symbols in most programs should be statically typed. I don't see why more languages don't simply offer both options. In those that do (e.g. Groovy), type declarations are simply optional. If you declare a type, it gets checked at compile time. If you don't, that symbol becomes dynamically typed. It works very well.

    --
    "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."
  34. static typing != strong typing by speedtux · · Score: 2, Informative

    According to common usage, Python and Scheme are both "strongly typed" as well, since they guarantee that all type errors in programs are detected. This is in contrast to "weakly typed" languages like Perl or K&R C, in which many type errors are silently ignored. That is, all four combinations of strong/weak and static/dynamic typing are possible.

    Some people are using the term "strong typing" as a synonym for "static typing"; I wouldn't really care, except that there is no good other term to describe what "strong typing" means.

    From a practical point of view, it seems pretty clear that "strong typing" (in the first sense) is important, but I have seen little evidence that static typing is all that useful in a general purpose programming language.

    1. Re:static typing != strong typing by angel'o'sphere · · Score: 2, Insightful

      ... but I have seen little evidence that static typing is all that useful in a general purpose programming language.

      That is a matter of the way how the mind of a particular developer works.
      I have troubel with dynamic typing, and I hate it to get me my errors shown by runtime when a compiler could have detected that error. Some people don't have this trouble, so they don't need static type checking. Other people develop even the simples script in a test driven development approach and don't need static types either.

      However: even simple typos like foo.baar() // should be one a only ...
      get compiled by dynamic languages and lead to an runtime error: method baar() not found! I make such typos in the hundrets a day, if I was forced to use languages like python I would hang myself.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  35. Re:Why I Hate All Programming Languages by jbolden · · Score: 5, Insightful

    That "why i hate" is a terrible editorial. What he is saying is that he doesn't want to think carefully about what he's doing. His objection isn't to languages really it is to clarity of thought. Tinkering and right brain is great for art, it isn't the right mode for engineering.

  36. Re:Strongly Typed programming languages by speedtux · · Score: 5, Insightful

    LISP, Perl and OCaml are far more useful than C++, Java and C#

    Let's see:

    • Lisp: strongly, dynamically typed
    • Perl: weakly, dynamically typed
    • OCaml: strongly, statically typed
    • C++: strongly, statically typed (some holes in the type system)
    • Java: strongly, statically typed
    • C#: strongly, statically typed

    I'm not sure what point you're trying to make, but it doesn't seem to have anything to do with either strong typing or static typing.

    The academic idiots,

    That's as opposed to the non-academic idiots, who apparently don't even know what "strong typing" means.

  37. Re:Strongly typed language? by libkarl2 · · Score: 4, Funny

    I don't mean to sound pedantic, or borish, but C is actually "yeah baby yeah" typed, to enable pointer arithmetic, stack space exhaustion, buffer overflows, and system level development. It's not incorrect to say that it is weakly typed, per se. It's just awkward having to try to explain the direct parallels between the C type system and a 70s style love-in (where anything goes) -- to your manager.

    --
    You are where you are at the time you are there.
  38. Re:Strongly typed language? by SL+Baur · · Score: 2, Interesting

    I don't mean to sound pedantic, or borish, but C is actually "yeah baby yeah" typed, to enable pointer arithmetic, stack space exhaustion, buffer overflows, and system level development. It's not incorrect to say that it is weakly typed, per se. It's just awkward having to try to explain the direct parallels between the C type system and a 70s style love-in (where anything goes) -- to your manager.

    I hear where you're coming from, brother /.er.

    I'm rather amazed at what work has been done in the Linux kernel regarding moving the code towards the static typing model with innovations in C and GCC extensions. Much of the Linux kernel *can* be statically type checked.

    I am *so* hoping that Linus writes the Mythical Penguin Month as Fred Brooks did for O/S 360 the 3nd most important O/S, but most important at the time. For all his sometimes abrasive writing style, he has done something I didn't think could not be done. Well more than one something.

  39. Re:Why I Hate All Programming Languages by setagllib · · Score: 5, Insightful

    So who do you think will be writing the "components" for your magic system, and the infrastructure to make the system executable, designable, testable and usable? We have been progressing to increasingly high level code (and in some cases, as you say, component architectures), but the amount of code being written and maintained continues to grow, not shrink.

    So the amount of code is growing, and it does more per unit mass, and software engineering skills are increasingly valuable and applicable, and you think this is a trend towards the elimination of code and software engineers? You may want to check your water and food sources for contamination.

    --
    Sam ty sig.
  40. Re:Why I Hate All Programming Languages by jbolden · · Score: 3, Insightful

    I'm not too worried. The idea behind COBOL was that once you got rid of that mathy way of writing code anyone could do it. The fact is that taking a process and breaking it into a series of steps and dealing with all the cases takes practice. The problem is not syntax or language structure the problem is thinking through a problem that way.

    Until computers have common sense all languages are going have to look like

    Do X
    Read Y
    Y Case 1 ...
    Y Case 2...
    Y Case 3....

  41. Re:Oooooooohhhh.... by david_thornley · · Score: 2, Insightful

    Not much for professionalism, are you? I can say with about 99% certainty that the fact that you know Haskell will have absolutely no effect on your career. The fact that you learned it will have a large effect on how well you can turn problems into programs.

    The only stable asset you have is you. If you don't improve yourself, you'll get left behind, and in ten years you'll be working on legacy C# systems and not getting paid as much as the people working on the interesting stuff in whatever language is new and hot next decade.

    I've watched small computer development be dominated by BASIC, Pascal, C, C++, Java, and C# (with a lot of Visual Basic thrown in). I have absolutely no reason to suspect it all stops here. Learn or die.

    --
    "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  42. Re:Reinventing the wheel is sometimes good by mcvos · · Score: 2, Funny

    But if all you're doing is reinventing Perl with C-like syntax, it's not really a step forward.

    Any change to Perl's syntax is a step forward.

    (No idea what this has to do with Scala, though.)

  43. Re:Scalability claims are bogus by Ichoran · · Score: 2, Interesting

    The JVM scales nicely, but you can load stuff on top of it that makes it not scale nicely.

    That the Scala folks were careful to let the JVM scale nicely is a credit to them.

    (Plus, the scalability also refers to the types of modularity that are available--Scala allows good practice in that area also.)

  44. No thank you by ZmeiGorynych · · Score: 2, Interesting

    Erm, I can't think of _any_ situation in applied programming where C++ is a good idea (I design medium to high frequency automated trading algos for a major bank, well run a small team that does that). 90% of the time something like jython or matlab is fast enough and a hell of a lot easier to write and debug, and doesn't give you nearly the amount of options to cut your limbs off by chance - and the 10% of performance bottlenecks can be handled by C/Fortran snippets.

    I am aware that many coders seem to think the very messiness of C++ (several languages crunched into one, but not really in a consistent or compatible manner) is somehow an advantage (trying to call C++ DLLs from other languages, oh my god what a pain, tripled if you want it to work on both windows and Linux), but I'd rather fill my brain with domain-specific knowledge and not with language-specific trivia (eg valarray copy semantics are not compatible with STL, but the code using vector<valarray<> > only actually breaks under gcc and works under VC++; and so on and so forth - why the fuck should I care?).

    I was in the "C++ is great" camp for a couple of years and filled my head with all those stupid quirks (local typedefs in recursive templated classes, oh what fun) , but at one point realized I just couldn't be bothered. Even Java, as crippled as it is language-wise, is IMO preferable to C++, because once it compiles, you can just use the jar, no linker issues, no memory corruption - and if I do need to manage my memory in a bottleneck, a C snippet will do just fine.

    And if I can keep using the JVM but one day switch from Java to a less crippled language, maybe Scala, that's the best of all worlds.