Slashdot Mirror


Mirah Tries To Make Java Fun With Ruby Syntax

An anonymous reader writes "Java is performant, widely adopted and eminently portable, however, its syntax is largely inherited from C++ along with some of its esoteric unfriendliness. Mirah aims to place a friendly face on Java through the implementation of a syntax whose primary concern is developer friendliness (think Ruby/Python/Groovy), and route of least surprise. The result is a truly cogent alternative syntax delivering readability, expressiveness and some compelling new language features."

66 of 444 comments (clear)

  1. Looks almost as nice as JRuby, but not quite. by ron_ivi · · Score: 2

    If someone wants to invent a language, why make it so very very close to an existing popular language?

    1. Re:Looks almost as nice as JRuby, but not quite. by SanityInAnarchy · · Score: 3, Insightful

      Because it compiles down to native Java, without any of the JRuby overhead.

      --
      Don't thank God, thank a doctor!
  2. Why Mirah instead of Scala, Clojure, Groovy, JRuby by Ichoran · · Score: 5, Insightful

    Mirah looks to me so far like a waste of effort. It has somewhat nice syntax, granted, but if you really want to use Ruby syntax with the JVM, there already is something that does that: JRuby.

    If you just want simplified syntax, Groovy is just as simple and looks more familiar to Java programmers.

    If you want simplified syntax and powerful new programming tricks, Scala and Clojure do this far better. If you ignore the Scala libraries and half its features, you get everything that Mirah was designed to do.

    The language designers should do a better job explaining why this is worth paying attention to.

  3. Uh... isnt that Groovy? by Foofoobar · · Score: 3, Interesting

    Doesn't Groovy and Grails already do that? Speaking as a LAMP developer who uses Groovy/grails, I figured that WAS Java's answer cause I'm having a blast and dumping PHP like a hot potato.

    --
    This is my sig. There are many like it but this one is mine.
  4. What about Jython? by mickwd · · Score: 2

    If the goal is "to place a friendly face on Java through the implementation of a syntax whose primary concern is developer friendliness (think Ruby/Python/Groovy)", then perhaps the "route of least surprise" would be to offer some assistance to Jython (python running on Java), as it's been around for over a decade already, but seems to have been a bit neglected in the past couple of years.

    I'm pretty sure there is an existing implementation of Ruby, too.

  5. Re:Performant is not a word. by Heliologue · · Score: 2

    Actually, yes it is. It's been used in computing at least as far back as 1977.

  6. Guess it depends on how old you are by Sabalon · · Score: 3, Insightful

    well...what languages you started with. Looking at that, the c++ based code is perfectly readable, but I can't make heads or tails of the other. In fact, reminds me of perl and objectiveC - just start hitting all those shifted characters - they each signify something special.

    Am waiting for :
    Draw Pacman;
    Draw Ghosts;
    Ghosts chase pacman;
    Pacman follows joystick movement;

    1. Re:Guess it depends on how old you are by phantomfive · · Score: 3, Insightful

      Really? I mean, you're missing such basic things as do you want the ghosts to catch Pacman every time, or do you want him to be able to escape? Do you want Pacman to keep moving after the joystick is returned to center, or do you want him to stop? The problem with every simplified language I've seen so far, is that you still need to be able to express what you want precisely, and that adds complexity to your language. You have to figure out what you want the computer to do in the corner cases.

      Unless you have AI behind your language, but then it's not really the same.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:Guess it depends on how old you are by dkleinsc · · Score: 2

      In other words, the real problem of programming is usually not the language.

      The real problem tends to be that computers have to get information that's far more specific than humans do. For instance, pretend you're moving to a new apartment, and you tell your buddies who are helping you to "put the dresser over there in that corner." Simple, clear, instruction, right? But your buddies will figure out for you that they can't put it right up against the wall because there's a radiator there, that the drawers need to be facing away from the wall, that the placement of this window means that it makes more sense for the drawers to be facing west rather than north, etc etc. Even a 12-year-old with cerebral palsy is far better at understanding a situation and adapting to new information than the best computer can manage right now.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    3. Re:Guess it depends on how old you are by heathen_01 · · Score: 2

      Corner cases are no longer important. They can be filled in post release with patches.

  7. Ruby syntax is fun? by shish · · Score: 2, Interesting

    Is it just me who finds ruby even more cryptic than perl? Reading why's poignant guide, I loved the presentation of the book, and really wanted to love the language, but every time he said "read this code out loud, it makes perfect sense, doesn't it?" all I could think of was "you, my dear little cartoon foxy friend, have clearly been snorting too much of the good white stuff. I'm going back to python now" :-(

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    1. Re:Ruby syntax is fun? by cronius · · Score: 3, Insightful

      I don't remember where I read it, but I read somewhere that Ruby works as a "programming skill amplifier." As in, if you're a great programmer, Ruby allows you to write beautiful code, but if you're a poor programmer, Ruby will allow you to write the most hideous thing that your processor has ever seen.

      And I agree. For better or worse, I think it's a testimony to the power that lies in the language.

      --
      Life is Reality
  8. I prefer C++ syntax by Jorl17 · · Score: 3, Interesting

    Yes, that's right, I prefer C++ syntax and coding style. Efficient, does exactly what I tell it to and makes sense in my head. All this Python/Ruby etc just makes my head blow up. I often code in those languages and I see them as very useful (and easy to work with), but I still prefer C++ syntax.

    --
    Have you heard about SoylentNews?
    1. Re:I prefer C++ syntax by gangien · · Score: 2

      how is it a bad thing? i can look at code i'm completely unfamiliar with and get a good idea of what's going on... much harder to do without it..

  9. Re:Performant is not a word. by WrongSizeGlass · · Score: 2

    I realize that this is a bit off topic, but is there any chance you'd be willing to apply for the obviously vacant /. submission editor job?

  10. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by pavon · · Score: 4, Informative

    From what I gathered on their website, Mirah was created by one of the main JRuby developers in order to create a language that fits in better with the JVM capabilities and Java ecosystem than a strait port of Ruby. The end result should offer better performance and cleaner integration with existing Java code then JRuby, while providing nicer syntax than Java.

    Groovy is slow as snot, and I wouldn't use it for anything other than perhaps a user scripting language for a java application, and even for that I think there are better options. No clue how Mirah compares to Scala. That was my first question as well.

  11. Re:Uh... by Junior+J.+Junior+III · · Score: 2

    It seems like a perfectly cromulent word to me.

    --
    You see? You see? Your stupid minds! Stupid! Stupid!
  12. Re:Groovy? by davester666 · · Score: 2

    It's something new. It welds the hot flash-in-the-pan of today with the hot flash-in-the-pan of yesteryear.

    --
    Sleep your way to a whiter smile...date a dentist!
  13. Aiming at an existing target by Patrick+May · · Score: 2

    Eventually it will reach the perfection of Lisp.

  14. Re:what. ever. by lennier1 · · Score: 3, Funny

    Can't be helped. Every time someone takes a crap another offshoot of C seems to appear.

  15. Re:Uh... by mooingyak · · Score: 2

    Normally I'd honor that request, but the irony in this particular case got the better of me.

    (from dictionary.reference.com)

    1. convincing or believable by virtue of forcible, clear, or incisive presentation; telling.
    2. to the point; relevant; pertinent.

    --
    William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
  16. Re:Uh... by snookums · · Score: 5, Interesting

    "Prepend" isn't a word either, but technical people use it a lot because there is a specific meaning there that needs a word -- to append at the beginning. Strictly speaking you could use "prefix" as a verb, but that word has a connotation of adding a small fixed string to the beginning of one or more items. "Prefix all international phone numbers with a + symbol." "Prepend the header before sending the request."

    Similarly there is a need for a concise expression meaning "of adequate performance" without stretching to "high-performance" (especially since High Performance Computing has a specific meaning of its own). Unfortunately, in the modern language of hyperbole, terms like "adequate" and "acceptable" have negative connotations along the lines of "not really good enough but better than nothing". So, we, as an industry, have invented a jargon word "performant" to express the idea that a thing has a level of performance sufficient that you don't need to worry about it and can look for optimisations elsewhere in your system.

    --
    Be careful. People in masks cannot be trusted.
  17. Re:what. ever. by pavon · · Score: 4, Informative

    Objective-C and C++ were created at the roughly same time, with the early work done without any knowledge of each other. OPPC (the early version of Objective-C) was written around 1981-82. "C with Classes" (the early version of C++) was written around 1979-83. The first books documenting Objective C and C++ were released in 1986 and 1985 respectively.Objective-C was standardized (as part of OpenStep) in 1994, while C++ became an ISO standard in 1998.

    Apple didn't choose to use it because C++ wasn't different enough; they chose to use it because that is what the NextStep was written with back when Objective-C and C++ were both still in their infancy.

  18. Ruby and LEAST SURPRISE? by Dahamma · · Score: 4, Insightful

    This I don't get. If you want "developer friendliness" and "least surprise", use a syntax with the (relatively) minimal set of keywords/tokens to accomplish your task. Ruby has basically incorporated the syntax and conventions of every major programming language of the last 30 years...

    And I guess you could call it "developer friendliness" if you want to let people freeform program in whatever style they want, with no two developers tending to use the same syntax for the same implementation - but at this point in my career (ie having worked for half a dozen companies and realizing what you write now may exist for decades), I consider a major component of "developer friendliness" as "easily comprehensible and maintainable by the next developer".

  19. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by shutdown+-p+now · · Score: 2, Informative

    JRuby and Groovy are primarily dynamic languages.

    Scala significantly extends the Java object model. Consequently, only a few basic Scala notions map directly to Java and can be used from there. A lot of advanced stuff is not easily accessible.

    Clojure is Lisp - 'nuff said.

    Mirah seems to be mainly about syntactic sugar. Judging by the few samples on the front page, it brings Java roughly to the level of C# 4, except with a nicer syntax. But it's still strongly typed (unless you use "dynamic"), and its notions, such as classes and methods, map one-to-one to corresponding Java ones.

  20. LISP by sourcerror · · Score: 2

    I would agree with you if I hadn't seen LISP.

  21. I like C++ syntax by gatkinso · · Score: 2

    Never thought it hard to understand.

    Different strokes I guess.

    --
    I am very small, utmostly microscopic.
  22. I like the Java syntax by jfbilodeau · · Score: 4, Interesting

    I may be the only programmer in the world that is willing to admit it, but having programmed in Java since version 1.0, I really like the syntax. And yes, I do find Java a lot of fun, especially for serious enterprise development. The thing I presently hate the most about Java is that new 'Oracle' thing.

    --
    Goodbye Slashdot. You've changed.
    1. Re:I like the Java syntax by mad.frog · · Score: 4, Insightful

      Really? You really like writing

      Stop right there: it's not a question of writing, it's a question of reading.

      I spend *waaaaay* more time *reading existing code* than I do writing new code. Designing a language to optimize readability is IMHO far more important than trying to save a few keystrokes.

      In the example above, I find the Java syntax completely readable, though clearly not as terse as it could be. The second example I find readable as well, but not vastly more so than the Java example.

      If you're optimizing for coding time, you're doing it wrong.

    2. Re:I like the Java syntax by hey! · · Score: 2

      I like big brackets and I can not lie
      you Python programmers can't deny
      when a module's checked in with a bitty interface
      and a dozen different kinds of brace
      you whip out static code analysis
      and do a little logical bris...

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  23. Not even about syntax for me. (informative rant) by IBitOBear · · Score: 5, Interesting

    I am a guy who loves computer languages. I had a lot of fun with Ada for gawd's sake. I am pursuing erlang at the moment. Thought about haskell but it was just too big to play with...

    So keeping that in mind?.... Java and the JVM was a non-starter for me.

    Every time a new object oriented language comes out the purists start with "we don't need multiple inheritance" and so on, and they always end up having to hack it back in as some half-conceived junk (see "interfaces" providing, at a later date, all the much shat upon "complexity" of multiple inheritance with none of the ability to provide a default implementation, so then you add delegation which is all the default implementation with none of the inheritance etc...). "Java doesn't have pointers" my pasty white behind, every object is a pointer in java, you just can't use them properly, but they do manage to use pointers to prevent first class object copying, so then they added clone() etc.

    Then they "didn't need" proper destructor behavior, we have a finalize that would run at some time in the future, but really the code out to know when the last object reference is going out of scope so it can call a destructor manually if it wants. That was a stopper for me.

    See they coded their "every other language should have remained pure" hubris into their virtual machine, they encoded it into their hardware, from inception they designed their system to be limited and resistant to repair. So no thank you. So now Ruby fans want to take their niche language and cram it into the fundamentally flawed Java VM. Ooooohhh sign me up!

    I swear the language feels like it was designed on a dirty napkin by someone who had no grasp of scope or symmetry.

    Might as well be Python (I am old enough to remember RPG and COBOL Coding Forms, saving one apparent character, e.g. "}", (because in Python ":[newline]" is the same as "{" so what did we save again?) for the privilege of using white space, and counting tabs, as a control structure. And save the "but now we have editors to help us so that doesn't matter" tripe, we had coding forms to "help us" etc. And I suppose its okay to hack off a foot because you can alwasy get a peg-leg to help you too?

    Why is it that each new generation of "language designers" insist on reinventing the same old square-wheels of the previous generation and calling it new?

    Now get of my damn lawn... (yes, this rant makes me feel old, but come on people, imagine where we would be going if you would just stop trying to reopen the same tapped out mines...)

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  24. Developer friendly means what exactly... by Anonymous Coward · · Score: 3, Insightful

    If C/C++ were so developer un-friendly you would not find them under the hood of pretty much every new language that claims 'developer friendly,easier,etc etc etc ' that came out in the last 20 or so years. Take Java , .NET etc all have some sort of C under the hood.
    It's not that C/C++ is not developer friendly. It's that a lot of developers(apparently) are simply not that good to begin with. While Java , C#, JRuby etc etc etc make things 'easier' (according to some people at least) they ALSO hide a lot of things that a GOOD developer _should_ know in orderr to understand what is going on under the hood.

    I see and hear a lot of kids fresh out of University that never even used C/C++ (which frankly baffles me to this day) ask question like " What is a refference","Oh i thought the GC would take care of that"

    1. Re:Developer friendly means what exactly... by VortexCortex · · Score: 2

      If C/C++ were so developer un-friendly you would not find them under the hood of pretty much every new language that claims 'developer friendly,easier,etc etc etc ' that came out in the last 20 or so years. Take Java , .NET etc all have some sort of C under the hood.

      To be perfectly fair -- The first thing you do with a new chipset after you have an assembly compiler is to create a C compiler. Once you've bootstrapped the C compiler, subsequent versions of the C compiler can be written in C. Only then, do you begin building the other languages on top of C (unless you have a good cross-compiler -- in which case I suppose you can compile Ruby, Java, Perl, etc right for that chipset -- but the device drivers on that new hardware won't be written in one of these languages, so you'll still need to be able to compile assembly and C first).

      So, all the other languages are written in C because it's cross platform, and you're pretty much guaranteed to have a C compiler available for any set of hardware. The only alternative to C or C++ for language design is assembly or, Flying Spaghetti Monster forbid, machine code...

      Recently I've had the "fun" of coding up a simple OO language in assembly for x86, then adapting it to take advantage of x64 -- Were the language implemented in C I would have just recompiled it on the x64 machine. (Yes I know about LLVM, but this self-taught man likes to teach himself things like compiler design by thinking through "how would I make a compiler", then implementing the ideas, and finally reading about how others solved / optimized the task -- It's amazing how many similar solution concepts arise given the problem domain even when you have no prior knowledge of the field; Evidence that "inventions" aren't all that unique and idea monopolies are atrocious)

      Perhaps there are so many languages written in C/C++ because those are the low level languages that are commonly compiled into machine code, and are not platform dependent?

  25. Re:Dumbing down programming by IBitOBear · · Score: 3, Insightful

    He did share them... stop trying to "solve" the problem of programmers needing to know how to program by writing languages that try to cover for dummies. We have plenty of languages that dummies can use safely. The problem has been solved.

    Computer languages are like power tools. They can be "so safe, but no safer" before they start losing function. They just _don't_ make a band saw that any 12 year old can use in complete safety. Same for joiner, circular saw, planer, or just good old knife.

    Tools are _not_ supposed to be _safe_. They are only supposed to be "no more dangerous than necessary". We make cheap plastic toy versions of tools for kids to practice with, but eventually they either go away or they have to learn to use the real thing.

    I will believe in these "for dummies" versions of language the day a contractor shows up at my house with a Fischer-Price nail gun that will actually hold up sheet rock but is safe enough to hand to my neighbor's 5 year old.

    The "clever new idea" is that people don't _deserve_ to operate in fields where they are unwilling or unable to learn the skills required. This is just as true of my profession (programming etc) is it is true that my programming acumen doesn't mean that I should be able to walk into CERN and have a go at the LHC even though I know squat about high-energy physics.

    Read the signature line (v v v v v v v v), it is a truism.

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  26. Re:Uh... by Haeleth · · Score: 2

    Nothing bothers me as much as the incorrect usage [...] of works like biweekly, bimonthly, etc

    Really? You find that more offensive than genocide, pedophilia, and split infinitives put together?

    Unfortunately, years back the dictionary added these incorrect and ambiguous usages so that now these words can "officially" mean either twice per, or every two.

    I don't think you know how dictionaries work. There are many English dictionaries, none of which is "the" dictionary. The presence of a word or meaning in a dictionary does not make it "official", nor does its absence necessarily mean it isn't a "real" word. It just means that the word or meaning has or has not been spotted by the dictionary's compilers and deemed sufficiently widely used and well attested to be worth documenting.

    Two conflicting definitions makes them useless.

    Many words have two conflicting meanings. Somehow our language gets by just fine in a state where "hot" can mean "cool" and "bad" can mean "good".

    And it would make the dictionaries less useful if they omitted one of the definitions. The purpose of a dictionary is not to define language but to describe it, to help you understand what other people mean. If a dictionary did not give both definitions, when someone tried to find out what a sentence containing the word "bimonthly" meant, half the time they would get a clear, unambiguous, and completely wrong answer. It's far more helpful for a dictionary to point out that the word is ambiguous than to pretend it isn't when it is!

    For those of you who may be wondering, the proper way to say twice per X is with the prefix semi-

    That's also probably a bad idea; semi can also be a vague prefix meaning "not quite". A lot of people, including myself, would naturally interpret "semimonthly" to mean "happens once a month, but not every month".

    The best, most easily comprehensible, and only unambiguous way to say "twice per X" is to use more than one word: try "twice per X" or "twice a(n) X". Similarly, for "every two Xes", try "every two Xes" or "every other X".

  27. Java is not for scripting. by Urza9814 · · Score: 2

    This kind of syntax is great if you're doing scripting. Small programs. For anything large though, that looks absolutely horrid. I can't see myself using a language like that for anything more than a few dozen lines, and even then I'd rather use regular Java.

    Seriously, what is it with people wanting to get rid of the braces, for example? I can't tell you how many times I've been trying to debug Python code and determined that the whole damn program was failing because someone forgot a single space. Usually the compiler doesn't even complain. There's a reason C and Java and so many other languages use the braces. It's not because they wanted to piss off programmers.

  28. Re:Pry my curly brackets from my cold dead hands by PwnzerDragoon · · Score: 2

    I'm not sure you'd call this an "argument", but I do most of my coding in Python. Now that I've gotten used to its syntax, whenever I have to use a bracketed language like C++ or Javascript I get annoyed with having to deal with all these superfluous braces. Maybe it's just personal preference, but I don't miss them in Python.

  29. Re:Uh... by Capt.+Skinny · · Score: 3, Informative

    Hate to tell ya, but once the dictionary adds a definition to a word, that definition is no longer incorrect.

    Dictionary definitions reflect modern and changing language usage by the public. It's like a democratically elected office for words: members of the general public choose words based on misinformation, stubbornness, and the way their parents, friends and teachers choose their words. Dictionary editors are like the electoral college: they look at what the general public has chosen to use for words and definitions, then choose for themselves which of those make it into the dictionary. Not everyone will agree on the new word or definition, but in a few generations it will be history and no one will care. When was the last time you heard anyone bitch about Grover Cleavland being elected?

  30. Re:Uh... by ian_from_brisbane · · Score: 2

    I don't even want to know what you think bisexuality is if an interpretation based on half-ness makes sense to you...

    Bisexuality is being half homosexual and half heterosexual.

    I know a guy who is 'semisexual', but he's taking tablets for that :)

    But seriously I agree with you on 'bi' vs 'semi'.

  31. Re: Not even about syntax for me. (informative ran by SanityInAnarchy · · Score: 3, Interesting

    I don't like Java, but I do have a couple of issues here:

    Java doesn't have pointers" my pasty white behind, every object is a pointer in java,

    Every object is a reference in Java. There is a world of difference between a name which refers to some object and an integer which might refer to some object, but you can still do integer math, and the object might not even be there anymore...

    This is almost as if you're trying not to see the advantages. No more segfaults. No double-frees, no crazy-ass debugging where the wrong method gets called because your pointer is pointing to the wrong (or a corrupt) vtable, and you really have to try to get a memory leak.

    they do manage to use pointers to prevent first class object copying, so then they added clone() etc.

    And the number of times I should've just passed the original object, vs the number of times I really didn't want it to implicitly clone something? Again, I have to give this one to Java, with the caveat that the interface to clone() kind of sucks. Ruby has dup, and all objects have it by default. Implementing clone() in Java is a pain, and if an object doesn't implement it, you're SOL.

    the code out to know when the last object reference is going out of scope so it can call a destructor manually if it wants. That was a stopper for me.

    Really? This?

    Think back to all the destructors you've ever written in C++. How many of them can you count that did more than free memory? In other words, how many destructors have you ever written which aren't entirely replaced by the garbage collector?

    I can pretty much count them on one hand. Filehandles, DB handles, etc. Yes, it sucks, but having to close a filehandle vs having to free every bit of memory I ever allocate? I'll take the filehandle.

    So now Ruby fans want to take their niche language and cram it into the fundamentally flawed Java VM.

    Wait, what?

    You haven't mentioned a single issue with the JVM. Your complaints have been about the Java language. Surely you can tell the difference?

    Oh, alright, you had one other complaint: You don't like the lack of proper destructors. Guess what? Ruby doesn't have them either. Ruby has finalizers, just like Java. Of course, I don't see anything about the JVM's design that prevents a language from implementing destructors anyway.

    It's also funny how you, like most of Slashdot, seems to have missed the point: JRuby exists, and is pretty much neck and neck with the official C Ruby implementation in terms of performance. It's just as stable, and almost everything that works in one implementation works in the other -- kind of like how you can have multiple C compiles.

    This article was about Mirah, which is not Ruby, nor trying to be. It's a way to make Java suck less, at least syntactically. If your gripe isn't with the syntax, you probably won't care about Mirah.

    And for a bit of balance, here's the features I really, really miss in Java:

    • Closures
    • Better setters/getters
    • Operator overloading (or something other than the retarded handling of == vs equals)
    --
    Don't thank God, thank a doctor!
  32. I disagree utterly... by IBitOBear · · Score: 2

    Java is a waste of cpu and, if carefully optimized, it can _almost_ be nearly about as good as the same code written, unoptimized, in C++.

    And now Oracle "owns" Java and has announce Jihad on the Infidels, it will only get worse.

    Java is now, and has always been, a comfortable fur-and-satin trap for the unwary.

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
    1. Re:I disagree utterly... by angel'o'sphere · · Score: 2

      Java is a waste of cpu and, if carefully optimized, it can _almost_ be nearly about as good as the same code written, unoptimized, in C++.

      This statement is plain wrong.
      C++ is optimized per compilation unit.
      Java is optimized during execution and jit compiling.

      A simple example:
      Two classes, D1, D2 with same base class B and a virtual member function / method called f().

      In C++ the call of that member function *always* goes via the vtab.

      In Java the call is dispatched directly as soon as the JVM/JIT compiler realizes that D2 is not used int the program and all instances of B are in fact D1s.

      There are plenty of more such examples.

      Best Regards

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  33. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by Headius · · Score: 4, Informative

    The original goal of Mirah was to create a language that looked nice, compiled down to a form as direct and fast as Java, and did not require you to drag a runtime library along with you. You take Mirah code in and get JVM bytecode (in .class files) out. There's no extra dependencies; you're not shackled to an extra jar file just because you wrote "hello world".

    Mirah has much of Ruby's syntax only because we liked Ruby's syntax. The Ruby class libraries are not there, and Mirah is not Ruby. It's statically typed, with Ruby's clean syntax and some of Ruby's surface-level features (like simple iteration and closures).

    I guess you're right, we need to do a better job explaining why it's useful. I have an article coming that emphasizes that this is simply a "javac" alternative that happens to have Ruby syntax, and hope to clean up the web site too.

  34. Re:Call me a cynic, but... by Headius · · Score: 2

    Mirah is statically-typed, like Scala or Java, so there's no late binding. That was an explicit goal in designing the language. The fact that after looking at examples you didn't realize Mirah's statically typed makes me smile, since it shows the syntax truly does cover up the typing.

  35. Re:Performant is not a word. by mug+funky · · Score: 2

    i would find it easier to believe Timothy is Australian, based on the hours he posts and the fact that 80% of his stories involve Australia somehow (not complaining here, but it definitely stands out).

  36. Re:Uh... by angel'o'sphere · · Score: 2

    Well, if performant is not a word ... then I simply don't get it.

    I use performant since I speak/write english, that is perhaps 25 years. What word would you use instead if you want to say this is more performant than that? Or if you simply want to say "a" is performant?

    Perhaps we europeans "invented" that word by simply assuming it is existing in english ... as your parent pointed out, the word is not only French and Dutch, it is also German.

    Best Regards

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  37. Not that complex or unreasonable. by IBitOBear · · Score: 2

    Lets see...

    g() wont compile because "std::vector" inside g(), is not explicitly coupled to the template definition of g() so it could be anything. Add "typename" and then it is unambiguous. Might as well ask why "any car" and "every car" are not the same sentiment in English.

    struct s is in no way dependent on class T, so there would be no difference between an s and an s, so the "template " has no meaning or purpose. The fact that you have to remove the syntatic no-op noise is not that complex and every language will fail you for it. Might as well ask why "float char x;" will not compile in Java.

    Not all tools are intended for use by people unwilling to learn how to operate them correctly, in fact none are. And all tools and procedures have a "Deep end" unless thy are inherently too shallow to be useful. Not everybody should or will be happy out beyond the breakers just because some people are. That doesn't mean we should put up chain fences to keep people going out there because "the shore-huggers would be made to feel inferior when they see others exceed them".

    You can only dumb-down the planet so far before it becomes counter-productive.

    [but thanks for reminding me about typename... 8-)]

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  38. Semicolon trouble again by Animats · · Score: 2

    Mirah has semicolon trouble. It's an "you don't need semicolons, except where you do" language. Note that some of the import statements in Mirah end with semicolons. Either there's some obscure reason for that, or the code they're showing doesn't really work. How do they do multiline statements? Please, not backslashes at the end of the line again. (Or worse, a syntax where a backslash followed by invisible whitespace, then a newline, has different semantics than without the whitespace.)

    Python's indentation-based syntax seems to work out better, At least since the compiler got smart enough to understand when mixed spaces and tabs introduced visual ambiguity.

    Mirah also seems to have a "you don't need declarations, except where you do" mindset. Historically, that's a bad decision. Almost every language that started out without declarations later backed into having them. FORTRAN, BASIC, C, and Perl all started out without much in the way of declarations. Python is one of the few typed but declaration-free languages that has succeeded. Arguably, Matlab is another.

    Is Mirah really a front end to Java, or simply a dynamic language that targets the Java virtual machine? You can do something similar with .NET, running IronPython to the .NET VM.

  39. Re:Pry my curly brackets from my cold dead hands by walterbyrd · · Score: 4, Insightful

    Problem is: when I look at your python code, I don't know if I'm looking at spaces, or tabs, or some combination of both. Not without a hex dump, or something. And one invisible character out of place, and god-only-knows what sort of unexpected results I get.

    Also, I probably can not cut-and-paste your code into mine, and have it work, without substantial modification.

    Then there is the serious issue of emailing code, or cutting-and-pasting from a web-site.

    Too bad that practically everybody on slashdot thinks of BASIC as GW-BASIC. Most versions of BASIC, that are less than 30 years old, actually have it right - no curly brackets, no counting spaces and tabs either.

  40. yes, that... by IBitOBear · · Score: 3, Interesting

    I _massively_ use destructors for doing more than freeing memory, particularly in multi-threaded code.

    Iet's see...

    closing files.

    Releasing, e.g. _unlocking_ regions of files shared between applications (e.g. matching flock() calls between constructor and destructor to lock and release records at precise times).

    Terminating protocols semantically and _then_ closing sockets instead of just closing sockets.

    Issuing signals on the _last_ release of a mutex that is coupled with a condition variable instead of on every release of a nested mutex.

    Unlocking and dismissing shared object libraries (e.g. undoing dlopen()) when, but not before, the last instance of any/every object dependent on the shared object file goes out of scope.

    Preventing "Cruft" in my heap by doing "deep" memory frees of complex structures as soon as I no longer need them instead of at "some random time in the future if ever".

    Changing modes and states on devices using ioctl() etc. (e.g. when the last "raw" use of the controlling terminal goes out of scope you put the terminal back into line mode until/unless you need to bring it back into raw mode.)

    Resetting hardware on last use.

    Emulating devices and subsystems that, by definition, reset themselves on last use.

    Doing all of the above with "exception safety" without having to write a ass-ton of "finally" blocks (though I _do_ whish C++ had "finally" 8-).

    Doing all of the above in "deep structures" so that my objects are true active objects instead of just nested hunks of memory.

    You are like a blind guy asking "when was the last time you really used your eyes for anything but reading" because you have never heard of art, when you presume destructors are "really just for freeing memory" you demonstrate a horrific limitation in your understating of object, functional, and event driven programming.. Just because you don't understand the non-beginner ways to use a construct doesn't mean the construct is only used the way a beginner would use it.

    Meanwhile:

    I lived through the "P-System" and "P-Code" the shortcomings and costs overheads and raft of annoying assumptions built into the JVM are a "given" to me. Sorry for not doubling the size of my rant to make you happy. I work with too many system internals to think the JVM is a win. You go back to treating your heap as executable, and over-stressing your CPU translation look-aside buffers, and leave me alone... 8-)

    In counterpoint:

    I think closures are overrated, but I don't disparage them because I recognize that the fact that just because "they have never been particularly necessary or useful to anything I have done" doesn't mean that they are unnecessary or useless to persons other than I. Plus you can pull the same thing more or less in C and C++, for a limited number of variables, by returning a pointer to a nested function, but like eeew.... Closures do typically require an executable data segment, which I find impure, but all of java requires an executable data segment so who am I to judge. Closures are just the latest brand of secret sauce to allow people to throw memory at a problem instead of logic. 8-)

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
    1. Re:yes, that... by SanityInAnarchy · · Score: 2

      Releasing, e.g. _unlocking_ regions of files shared between applications (e.g. matching flock() calls between constructor and destructor to lock and release records at precise times).

      Fair point, though I don't know that this saves you from the problem of locking in general. For a significantly parallel app, I'd be looking at either more granularity (Erlang) or less.

      Unlocking and dismissing shared object libraries (e.g. undoing dlopen()) when, but not before, the last instance of any/every object dependent on the shared object file goes out of scope.

      This makes sense, but it also doesn't seem to match where Java is used most these days -- in a server environment, where people tend to just load everything and let it run.

      Preventing "Cruft" in my heap by doing "deep" memory frees of complex structures as soon as I no longer need them instead of at "some random time in the future if ever".

      This is the part that GC is for. If you absolutely need that memory back immediately and you have the benchmarks/profiling to back it up, then you're right, you need a language like C.

      But GC has gotten pretty damned good. Closing filehandles immediately makes sense, because the OS limits how many of those you can have open, but memory? Depending on what you're doing, GC can actually perform better than manually freeing those structures.

      Changing modes and states on devices using ioctl() etc. (e.g. when the last "raw" use of the controlling terminal goes out of scope you put the terminal back into line mode until/unless you need to bring it back into raw mode.)

      Interesting... I can't remember ever having to do that.

      Resetting hardware on last use.
      Emulating devices and subsystems that, by definition, reset themselves on last use.

      And now we're definitely beyond the realm of "application development", I would think.

      Doing all of the above with "exception safety" without having to write a ass-ton of "finally" blocks (though I _do_ whish C++ had "finally" 8-).

      Ruby developed a clever approach to this using blocks, which are effectively closures. The general pattern is:

      open 'filename' do |file|
      # ... do a bunch of stuff with "file"
      end

      This translates into, "Call the 'open' method, and pass it this block of code." That method would be defined something like:

      def open filename
      file = real_open_file filename #whatever it is, I don't remember
      begin
      yield file
      finally
      file.close if file.open?
      end
      end

      The 'yield' calls the block you passed. Effectively, you can develop an API which defines a scope in which you get to work with the file (or whatever it is), and the API handles the exceptions.

      You are like a blind guy asking "when was the last time you really used your eyes for anything but reading" because you have never heard of art,

      More like, I'm an engineer who doesn't often think of working with art, to the extent that the analogy works at all. See...

      you presume destructors are "really just for freeing memory"

      I didn't ever assume that.

      They are, however, for freeing resources, which fits very nearly every single use case you mentioned. And maybe it's just the code I worked with, but it did seem like most of the time, destructors are there to free memory.

      Hell, most of the time, a destructor was only there as a defined virtual in case any descendant classes wanted to free some memory.

      I work with too many system internals to think the JVM is a win.

      And my work tends to be too far removed from system internals to think th

      --
      Don't thank God, thank a doctor!
    2. Re:yes, that... by mmcuh · · Score: 3, Interesting

      You are like a blind guy asking "when was the last time you really used your eyes for anything but reading" because you have never heard of art, when you presume destructors are "really just for freeing memory" you demonstrate a horrific limitation in your understating of object, functional, and event driven programming.. Just because you don't understand the non-beginner ways to use a construct doesn't mean the construct is only used the way a beginner would use it.

      Also, freeing memory manually in C++ is almost always the wrong way of doing things. There are plenty of adaptable containers in the standard library, and when you want to write you own and actually do need to keep track of memory directly there are smart pointers that deallocate whatever object or array they're pointing to when they go out of scope. Raw pointers and manual deallocation are only needed in very special cases, like when you're writing lock-free data structures or have to deal with C APIs.

      C++ really isn't about manual memory management, it's about scope-based memory management. You don't have to free things manually, and yet you can be completely certain of when a certain chunk of memory is deallocated.

  41. I use straight C as well by IBitOBear · · Score: 2

    (For prospective, I learned my "C" using "cc" on Unix System Vr3...)

    I agree that most of the C++ I have seen has been pretty abysmal, but that's not the paradigm's fault, nor a fault of the language. The average professional in _any_ field is, by definition, pretty average, and tautologically therefore not "excellent".

    I can say the same thing for overly clever C programmers. There is a reason that the Obfuscated C contest is more popular than the obfuscation contests of any other language.

    The problem is, of course, that if you only have a hammer every problem looks like a nail. C++ is object oriented, but unlike other object oriented languages, it is not _limited_ to pure object oriented behavior. There is nothing C can do that C++ cannot. (It is, of course, not optimal to use the C++ compiler to compile purely straight C since it will bring along some plumbing etc, but thats not a killer if you use GCC anyway as.)

    So yea, you get a lot of people who learned languages instead of programming and you get a mess that focuses best on one limited paradigm. Knowing when to object and when not to object in C++ is a non-trivial task. Throwing away the object ability because you either are not good at it yet or have never seen it done right is just a sign of stagnation (IMHO of course).

    So I am sure we all feel safer if you stay where you are and don't over-reach your understanding. We fully wish more people woud just stop venturing out, making a mess, and then blaming their tools.

    Your disdain for "the whole object oriented thing" is quite different from my disdain of Java and the JVM for being irredeemably flawed. After all, every time you have put a function pointer inside a structure or built a set of libraries that use a specific set of structures you have been using "the object oriented thing", if only dimly in your own awareness.

    The problem with most "object oriented programmers" and their "object oriented programming sucks" counterparts is a limit of comprehension in the form of overly literal thinking. They see/hear the inevitable, and massivly flawed "car analogies" a then they roast on that spit. They try to put "drive" in "car" when they full well that cars do not drive themselves. That is the fail because they, having picked a metaphor for a block of code, fail to use that metaphor consistently. Once they violate their own designs they find themselves trapped, beached if you will, on a shore of mismatched functional domains.

    The hardest thing for an author to learn is that writers block is what happens when you write words you love that just don't fit the story. The only cure is to start hitting paragraph delete until you are back to where the story makes sense.

    The hardest thing for a programmer to learn is that you likewise have to toss out bad code instead of trying to fix it when you get to a place where the code you wrote, or inteed your object designs and functional signatures, don't properly fit the job you are tying to accomplish.

    Once I learned to delete my mistakes I became an outstanding "object oriented" programmer. Likewise for "functional programming" and "procedural programming". Its all the same skill.

    Only a poor craftsman blames his tools. Only a fool uses a tool he knows is broken. Only an idiot things those statements are in conflict.

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  42. Re:Mirah is for Pascal people that don't like C++ by FlyingGuy · · Score: 2

    Hey Fuck off! There is nothing wrong with Modern Pascal Implementations like Delphi. Its OOP Model is better then C++ or any of those other bastardized bits of cruft. If you want real OOP like it was envisioned then stick with LISP or SmallTalk, but if you want to get work done...

    --
    Hey KID! Yeah you, get the fuck off my lawn!
  43. Mirah is simple? by WaffleMonster · · Score: 2

    def length
    @length
    end

    In C I don't need to explicitly declare sections declaring things... How is this an improvement?

    puts "I got a #{a.getClass.getName} of length #{a.length}"

    Am I supposed to be impressed with this #{} cold fusion nonsense? I'll take perl string syntax over this any day of the week.

    Oh yea and best of all it compiles to crappy java bytecode.. It is not the java language that sucks it is the limitations of the JVM and the army of gross hacks that continually pile up for the sake of backwards compatibility.

  44. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by devent · · Score: 2

    "Groovy is slow as snot, and I wouldn't use it for anything other than perhaps a user scripting language for a java application, and even for that I think there are better options. No clue how Mirah compares to Scala. That was my first question as well."

    You use Groovy if you like to do some dynamic stuff. I don't think it will be faster with anything else anyway.
    If you don't want the dynamic stuff but still like Groovy, there is Groovy++.

    --
    http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
  45. Re:Uh... by omfgnosis · · Score: 2

    This is just ridiculous. "Ain't" is a word culled from common usage, and there is no way formalizing it will overcome its common usage meaning, which is [negation of] ["to be" conjugation]. The conjugation of "ain't" to any pronoun is "ain't". And if you lived anywhere that "ain't" is actually used in common speech, you would know this. "He ain't" is perfectly valid, if "ain't" is valid.

    Your explanation is reductionist, and exactly what would be expected from someone who wants English to be a "living language" but still subject to dead rules. But "ain't" is a perfect example of how languages evolve, discarding or sidestepping rules so that even a "contraction" might have none of a contraction's characteristics (which it ain't got; it's neither a combination nor elision of the original words, whichever conjugation of "to be" you pick).

    Now go'onan'gitcha some pie and quitcherbitchin'.

  46. Re:Java & Ruby: Not known for high performance by SirJorgelOfBorgel · · Score: 2

    No, it just isn't.

    I'll skip on Java being a horrible language, everybody who isn't a Java fanboy and has used a fair number of languages already knows this.

    But nearly as fast as C++ or just 10% slower ? That's not my experience, at all. Of course, first I could comment on how calling a language slow or fast is at best strange, as it often really depends on the compiler / interpreter / assembler (ok not that one), and what exactly you are trying to do with it.

    Then I could perhaps comment on other native languages, for example C(--), or Object Pascal. Both of which are still significantly faster than Java. Or perhaps assembler could be mentioned. A response could be how C is just as fast as assembler, or that its ridiculous to be hand-optimizing in assembler, or nobody remembers how to do it, etc. And sometimes that would be true, but there are various use-cases where it isn't. Most programmers just never (or rarely) encounter these use-cases.

    Perhaps we could discuss productivity. How fast is it to develop something (ie costs) vs execution speed. C# has Java easily beat if you don't need to support anything that isn't Windows. Better language, better libraries. Finding a good Java coder is more difficult (and thus costly) as well due to the huge fragmentation of toolkits and frameworks for Java. Not to mention that for C# you can use Visual Studio, which is simply the best IDE there is. Comparing for example Eclipse to Visual Studio and having Eclipse coming out on top - that just makes anybody who has used both extensively question your sanity. Eclipse is just so much slower than Visual Studio, that aside from all the great features Eclipse doesn't have, you halve your productivity just by the need to constantly wait on your IDE. Sure, it's only a second here, half a second there, but it happens several times a minute. That difference alone is easily worth the price of Visual Studio several times over. Seeing as Eclipse is also made in Java, I guess that's another hit for Java's speed as well.

    We could discuss what things you could do with the language. Let's take image manipulation as an easy example. Say I would like to perform channel auto-optimization on an image in code (without depending on an external library to do it for me). The code is straightforward enough, just a few loops and a few calculations, with millions of iterations. It can easily be the case that the C equivalent of this code runs in milliseconds, while the Java code runs in seconds (if not minutes). Quite a bit bigger difference than 10%. In my experience, in things like these, C# has Java beat speedwise as well, though not by that big a margin. And that's an example where speed matters. Of course, we could also discuss enterprise business logic. It may well be that Java is only 10% slower there, but that's a place where speed doesn't matter nearly as much as the logic isn't usually the bottleneck and it is easy to throw more hardware at it.

    Which brings me to the conclusion: nothing in your comment makes any sense at all. Java may indeed be only 10% slower than C++, but this is in instances where speed doesn't really matter in the first place. Java is certainly not the fastest thing you can get after C++ by any margin. And in the game industry the difference is far bigger than 10%, since that usually involves a lot of memory manipulation logic for high end games which is something Java is especially horrible at, and the speed difference is orders of magnitude greater than the 10% quoted. Sure, there is lots of boring business software built in Java, but I've yet to encounter the case where it was actually the best tool for the job in practise, taking into account all the other dependencies of the package. Not saying those cases don't exist, I can imagine a few of them.

  47. Re:Pry my curly brackets from my cold dead hands by SirJorgelOfBorgel · · Score: 2

    Agreed on the loops.

    As for the bracket columns, why does it really matter to you if somebody else does it ? I personally prefer the opening bracket on the end of the first line (assuming the first line is short, not long) because it saves a near-empty line, so (a) more code fits on my screen without messing with readability and (b) when glancing over code I don't mistake it for a white-line, which would usually indicate some logic break (much like paragraphs in a "real" language). I see no real problem with putting it on its own line, it's just not the way I personally prefer it.

    Proper indentation fixes the problem of code block visibility, any decent IDE has easy buttons to move blocks or "beautify", and moving the cursor over } should really highlight the corresponding {.

    Use the brackets for any logical code block including ifs and whiles, use proper indentation, use white-lines where necessary, use a decent IDE, there really is no issue with one versus the other. I could see your point as defendable when coding in notepad, but well.. ;)

  48. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by Glock27 · · Score: 2

    One "new" language (for some value of new, it's a few years old but was only recently released on a large scale) is Gosu, which has some very nice features. It is closer to C* syntax, which is nice from my perspective (I understand maybe not from others lol).

    I'm a fan of terse, maximally expressive languages as I think they maximise productivity both for development and maintenance. Gosu seems close to a sweet spot.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  49. Re:Big Picture (Open Source Trolling?) Here... 8-) by Glock27 · · Score: 2

    Do you honestly think that after taking on Goggle for the non-Java-but-Java-like innards (I forget the name... Davlik?... something like that) of Android they are gonna let cacao or any of the other JVMs slide?

    This part of your (apparently) ADD inspired rant is beside the point. Languages that run on top of the JVM are orthogonal to whether or not some particular JVM is legal. Even without open source JVMs (gasp) there will still be performant JVMs from Oracle and IBM. The world goes on. ;-)

    Most likely the Dalvik tempest in a teapot will be resolved via a typical cross-licensing arrangement between Oracle and Google.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  50. Re:what. ever. by Glock27 · · Score: 2, Insightful

    Apple didn't choose to use it because C++ wasn't different enough; they chose to use it because that is what the NextStep was written with back when Objective-C and C++ were both still in their infancy.

    There were better reasons than this. C++ is not well suited as a systems programming language. That's why there's still not a single major OS that uses the C++ object system at the system level. BeOS was the single failed experiment in this regard - remember the loveliness of "reserved slots"?

    Objective-C's dynamic features make it a much better foundation for systems programming. Its relative simplicity is also attractive.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  51. Just read a great quote a few weeks ago: by Qbertino · · Score: 2

    It's from the days when Java was all the hype and goes something like this:

    "Java is a new language that combines the clean concise and easy syntax of C with the blazing speed of Smalltalk."

    Can't remember from whom it is but it definitely is the best quote on Java I've heard so far. :-)

    --
    We suffer more in our imagination than in reality. - Seneca
  52. Re:Why Mirah instead of Scala, Clojure, Groovy, JR by e70838 · · Score: 2

    I think the main defect of Ruby is its library. This library lacks of naming consistency and suffers from confusing name aliases. The Java library is a lot better.
    The syntax of Java is poor, it is not very concise and the syntax of recent additions (generic, enumerate) is not very clear.
    I think a next step would be to write a translator from java to Mirah, to stop using jvm (either switch to dalvik or openjdk), then to say good bye to Oracle.

  53. Re:PataPata makes Java fun with JavaScript syntax by Paul+Fernhout · · Score: 2

    There are only a few, and they are not "good". Can you otherwise suggest one you think is other than a toy?

    --
    A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
  54. I just don't care anymore. by Brian+Feldman · · Score: 2

    I know, I fell in love with Ruby many years ago and I still enjoy its expressiveness and ability to let me complete an entire project rapidly. I still use it when I can do something completely stand-alone that has no performance impact on anything, but it isn't something we've adopted at work or anything, officially, as we have Java and C++. There's also plenty of entrenched C, and fellow developers know most old C is a bear compared to something modern, streamlined and extensively-peer-reviewed like an open source OS... but that was my first experience with good code and so I am utterly comfortable with only C and no OO capabilities, as well, but there is zero impetus for doing straight C over C++ outside of OS kernels.

    I do know what I enjoy working with the most. It's not all of the bizarre choices of syntax and convolution, but powerful and low-level language feature base of C++, and perhaps not Java's ultra-stringency (although not having to double-declare prototypes is wonderful, and Eclipse does make building the program scaffolding up from scratch a breeze). I can be productive writing essentially the same kind of software in C++, Java or Ruby but the last decade taught me that other than possible ridiculous amounts of boilerplate (*cough* headers for languages in the C lineage), the choice of platform is not going to end up altering the amount of time it takes to do the project other than that portion.

    I look at these examples and I do appreciate the visible elegance of more compact and expressive languages. But I also don't see any reason to not use Java on the Java VM because it is extremely capable on its own and high-level enough that an IDE can truly handle ALL of the boilerplate connections for you. It's plenty readable, and plenty writable as long as you aren't sticking with old tools that don't do code-completion. I'm not going to become much more productive by having functional programming facilities, am I? I don't even have to create my interfaces ahead of time -- the IDE handles pushing method declarations out from the class to an ancestor interface with a few clicks.

    It could be that while I do adore the Ruby syntax I don't see any particular reason to favor functional programming over procedural. Note that C++ actually supports functional programming perfectly well, however, most standard C++ APIs do not use that sort of convention, favoring only the procedural/class method system.

    --
    Brian Fundakowski Feldman