Slashdot Mirror


Designing And Building A New Pragmatic Language

ctrimble writes "A bunch of folks on the pragprog Yahoo! Group have banded together to design and implement a 'pragmatic' programming language. Ostensibly, the language is informed by the principles in Hunt and Thomas's well-received book, The Pragmatic Programmer: From Journeyman to Master but the purpose of the language is to help ease some of the pain of development and bridge the impedance mismatch between the academic aspects of a programming language and the discipline of software engineering. The design is still very much in flux. If you're a programmer, this might be a language you'll be using in a few years (or earlier). This is your chance to get in on the ground floor. What kind of features do you want the language to have? What are your PL pain points? Where could this language do better than existing languages?"

50 of 192 comments (clear)

  1. make the case.... by demian031 · · Score: 4, Insightful

    they should explain why ruby, python, perl, basic, java is bad.

    they should come up with some good improvements for a specific language.

    the world doesn't need an entirely new language. (we already have python).

    1. Re:make the case.... by Dr.+Photo · · Score: 3, Funny

      The world doesn't need another entirely new language, because we already have C++.

      Agreed. I certainly wouldn't wish another C++ on the world. :-)

  2. Already done by keesh · · Score: 5, Insightful
    I believe it's called Ruby. Incidentally, Hunt and Thomas also wrote the Ruby Book, where they say Ruby is pretty much what they had in mind when they wrote Pragmatic Programmer:
    As Pragmatic Programmers we've tried many, many languages in our search for tools to make our lives easier, for tools to help us do our jobs better. Until now, though, we'd always been frustrated by the languages we were using.
    1. Re:Already done by DogIsMyCoprocessor · · Score: 2, Insightful
      Ruby gives a strange impression. It combines some of Perl's choices (magic variables, regular expressions as part of the syntax rather than as a library, and variable prefixes that look like line noise) with stealing some nice stuff from Smalltalk, and oddly, using end as a block delimiter. It comes across as baroque, not beautiful.

      A pragmatic language should have mature class libraries. (That's pragmatic, isn't it?) Ruby doesn't.

      --

      "And this is my boy, Sherman. Speak, Sherman." "Hello." "Good boy."

    2. Re:Already done by Anonymous Coward · · Score: 2, Informative

      A pragmatic language should have mature class libraries
      Ruby does have mature class libraries. And the end is only if you use begin, you can use {} if you prefer.

    3. Re:Already done by Hawkins · · Score: 3, Informative

      It should be noted that some of this Perlesque is deliberate, and that much of it is simply syntax sugar on top of objects. The regexps, for example, are actually Regexp objects, and as such can be extended or inherited just as any other object would. matz decided to include the /regexp/ construct to aid those who were used to it. As for the $_, $&, and its cousins, if you don't like the look of those you can include the English mixin in the standard library that allows you to say things like $LAST_READ_LINE and $MATCH.

      I have to agree on the variable prefixes. @instance and @@class variables are hard on the eyes, but other than that you don't have to append anything to the beginning of a variable. lowerCase variables are local, Uppercase are constants or classes. If you're using globals in an OO language, may Dog have mercy on your soul.

      And as for the libraries, check out raa.ruby-lang.org. Many there, more being developed all the time.

      _dave

    4. Re:Already done by kwerle · · Score: 2, Insightful

      Sign up another disagree. I don't want to have to write a stack, queue, or quicksort - I did that in college. I don't want to write another http socket client, I did that at the end of last decade.

      Moving libraries into the language is like moving web servers, web browsers, office suites and solitaire games into the kernel. Some people will think it's cool, but others will wonder why they can no longer fit a bootdisk onto a 1.44Mb floppy.

      People who want 1.44Mb boot floppies should:
      1. Buy a real computer - one without a damn floppy.
      2. Invest in some kind of IO that supports CD booting.
      3. Write their damn kernel in C - that's all the language is good for (IMO)

  3. After thinking about it... by Nice2Cats · · Score: 3, Funny

    ... they only thing I can think of that would be missing is a compiler to turn Python into machine code, and I'm sure somebody is working on that.

    1. Re:After thinking about it... by slackergod · · Score: 3, Informative

      There's pyrex, a variant of python for writing lowlevel c-code w/o going into C.

      And there's also pysco, a specializing compiler, which generates machine code for python, and gets dramatic speed ups.

    2. Re:After thinking about it... by pnatural · · Score: 2, Informative

      And don't forget PyPy, of which the author of psyco is also a member. If any of these three projects will bear the fruit of a python-machine code compiler, it's PyPy.

  4. Need more information... by phraktyl · · Score: 3, Funny

    I'm going to have to see at least 3 years of Apocalypses and Exegesis before I can make an informed decision about this language...

    --
    Karma: Marginal (mostly due to the border around the website)
  5. Wish list by jbrandon · · Score: 2, Interesting

    Strong typing: I'm tired of seeing casting errors at runtime.

    Metacode/macros: Sometimes I would like things done at compile time, especially if they have to do with types.

    Overloading: Can be implemented with a decent macro system.

    OO/functional: So many languages miss one. So few have both (Eiffel, O'Caml)

    So many languages are so close, especially ones w/ active user communities, like perl and C++. They're just not there yet . . .

    1. Re:Wish List by smishra · · Score: 2, Insightful

      You are talking about OCaml. To your list I would like to add large set of high level standard libraries This is the only prerequisite that prevents me from using Ocaml in most of my work. R

  6. Strong emphasis from a GUI standpoint. by xagon7 · · Score: 2, Interesting

    We have PLENTY of generic memory moving, scriptable, and interpreted languages that can all perform the same command line batch processing.

    I think we need a language that not only performs those operations but is built with Cross-platform GUI design in mind. I don't know HOW or even it it is simply another part of the standard libraries, but I think you you REALLY want you rlanguage to be successful it should be able to hook into existing GUI APIs and/or implement its own with ease and consistancy. If anything a strong enphasis of a GUI library is a must have.

    Delphi (MAYBE VB) is the closest thing I have seen that allows this. Yes I know the "language" is object pascal, but the IDE allows for quick and semi-graceful GUI design.

    In addition to that if you could implement a pointerless environment with automatic garbage in a FAST way it would be helpful...but allowing for manual overrides if necessary.

    Let the elitist flames begin.

    1. Re:Strong emphasis from a GUI standpoint. by pbox · · Score: 4, Informative

      You should try wxWindows + Python.

      Pyhton: pointerless, automtic garbage coll, vary FAST if using psycho.

      wxWindows: portable, yet platform optimized. Very good tools for design.

      --
      Code poet, espresso fiend, starter upper.
    2. Re:Strong emphasis from a GUI standpoint. by Anonymous Coward · · Score: 3, Funny

      ...(MAYBE VB) is the closest thing I have seen that allows this.

      I have considered deeply what you said here, and have carefully formulated my reply:

      Noooooooooooooooo!

    3. Re:Strong emphasis from a GUI standpoint. by pbox · · Score: 2, Interesting

      Psyco is a very interesting concept for Python. It compiles python bytecode to native, but it is not JIT, rather it takes the code, analyzes it and compiles several versions, of which the optimal one is going to be chosen at runtime. You really need to check it out. It promises about 40% speedup on random py code, but about 400% speedup on algorhytmic code (that counts for scientific apps). that is almost as fast as the equivalent C code. His motto is "High-level languages are faster than low-level ones!"

      Pyrex is also interesting, where you can use C concepts within Python. And the project Weave allows you to directly write C code into Pyhton. With careful design you can convert about 5-15% of your code to C and have an app that runs as fast as a C one, with about 20% of the development time.

      --
      Code poet, espresso fiend, starter upper.
  7. Re:Pragmatic License by nicware · · Score: 3, Funny

    The local variables employed and not_dead are not initialized and we may never even enter the loop. ;)

  8. ... and for God's sake get it right this time! by crmartin · · Score: 4, Insightful

    First thing: read Tony Hoare's critique of Ada. (CAR Hoare, Hints on Programming Language Design, 1978). All the current common languages are way too complex.

    Second, make sure the language has a formal semantics from the start. This semantics needs to include concurrency and how it works. I can think of half a dozen languages (Ada, C++, Java, ...) in the last 20 years that decided this was just too hard, and eventually paid for it.

    Third, make sure that the notation either explicitly uses files, or is completely independent of files. Probably the most annoying aspect of Java is that the package structure implicitly depends on a directory hierarchy (but some OS's don't have hierarchic file systemss) but doesn't deal with package structure in anything like the way hierarchic file systems do (what does 'import java.*.event' mean?)

    Fourth, write a lot of sample programs, and test each with experienced programmers, saying 'what does this program do?' If the programmer doesn't get it approximately right, rethink the syntax.

    1. Re:... and for God's sake get it right this time! by crmartin · · Score: 2, Interesting

      Oh, just in case I misuinderstood -- there are languages which get a lot of the details right -- eg, Occam makes a pretty good job of defining a semantics for a limited model of concurrency based on Hoare's Communicating Sequential Processes.

    2. Re:... and for God's sake get it right this time! by AtrN · · Score: 2, Insightful
      Occam did reasonably well at CSP things (Rob Pike's newsqueak did it better however) but fails at almost everything else.

      I recall Inmos stating "We want to make occam the FORTRAN of parallel processing." My reply was "You have." (ref. to lack of data structuring other than fixed sized arrays).

      It wasn't until the hacked up occam 2.5 that it got some better programming language features.

    3. Re:... and for God's sake get it right this time! by jmb-d · · Score: 2, Informative
      what does 'import java.*.event' mean?

      According to the compiler, it means a syntax error:

      foo.java:1: ';' expected
      import java.*.event;
      ^
      1 error

      --
      In walking, just walk. In sitting, just sit. Above all, don't wobble.
      -- Yun-Men
    4. Re: ... and for God's sake get it right this time! by crmartin · · Score: 2, Insightful

      I thought it was in his 1981 speech, ....

      The cite could be wrong -- I was scrounging quickly on the net. In fact, thinking about it, it's almost certainly wrong, because the paper came out when I was in grad school, and I started in '83.

      Concurrency as in multitasking/multithreading? It's really easy in Ada, and it works quite well everywhere I've used it.

      The problem isn't that it works badly, necessarily -- it's that it doesn't work the same way everywhere. At least as of Ada 83, the semantics of a task were't the same from machine to machine. Made it a real bear to reason about the behavior of an Ada program.

    5. Re:... and for God's sake get it right this time! by crmartin · · Score: 2, Insightful

      You're missing the point in a couple of ways.

      First, unfortunately, the package name does not represent just a name space to the compiler. javac as distributed by Sun, and every other implementation of Java I'm aware of (with the exception of the late lamented Visual Age for Java), requires the package naming structure to correspond 1-1 with a path tree structure.

      You're misunderstanding the namespace notion a bit though: If I import java.util.Date, I'm not adding a namespace, I'm adding a name to my current namespace or scope. import java.util.* might be thought of as importing a name space, or at least adding a collection of fully qualified names to the current name space. But if we see a wildcarded import that way, why shouldn't import java.*.Date bring both names into the name space? (Answer: because they'd still have to be referred to by fully-qualified names. But then, since there is no difference, why make it a syntax error?)

      The point here is that Java purports to construct a hierarchically-organized namespace, but doesn't actually do so. (Thought experiment: what's the effective difference between import com.foo.bar.* and import com-foo-bar.*? Ans: none except that you don't have to have a directory tree four deep for your sources.)

      Oh, and as far as your ls point: don't try to teach Grandma to suck eggs, son.

    6. Re:... and for God's sake get it right this time! by crmartin · · Score: 2, Insightful

      As a database fan, I say farm concurrency off to the database...

      But, as someone or other undoubtedly said, quis custodiet ipsos databases? Someone has to write the damned things.

      (Plus, there are a lot of things other than databases which need concurrency control, eg, an operating system kernel.)

  9. Give me every feature and make it fast. by Pyromage · · Score: 2, Insightful

    Every language feature has use. Pointers, references, pointers to pointers, pointers to functions, reflection, OO, templates, multiple inheritance, interfaces, enforced contracts, garbage collection, manual resource management, virtual machine, native execution.

    All these features have uses. There is always 5 cases for every single one where it's *much* easier to implement while using it.

    Now abandon backwards compatibility and think up reasonable syntax. I don't know if it's possible to do an elegant language with all that, but if it is, I think we should have one. Every other language lacks some of the above features. I would like to see a langauge that really had everything.

  10. i've leart one thing ... by sir_cello · · Score: 2, Insightful


    that there is no "one language", there are multiple languages for multiple purposes, and the boundaries between languages are often blurred (just like everything else in life).

    in addition to making your case (as stated by other poster), also
    - what particular context/problem are you trying to solve;
    - what are the specific characteristics and issues in that context/problem;
    - how does your new language provide a better solution than other solutions;
    - how does your new language stand up on theoretical issues (looking at the science of design of languages themselves)

    if there's an existing well used language that is "close" to what you want, and such language has quite a following/momentum, then can you try to adapt/evolve it rather than creating a dud language that goes nowhere (a waste of time for everyone). do you really need a new language, or do you need to help educate on the use of an existing language (i.e. are you more about process than product).

  11. Re:What about a graphical language by crmartin · · Score: 4, Interesting

    I actually did my PhD and Masters' work with the idea originally being to develop a visual or direct-manipulation (see Ben Schneiderman's stuff if you don't know the term) programming environment. You know what happened? I went to Fred Brooks' original "No Silver Bullet" presentation (see the paper to see the details) and found that I couldn't manage to refute his arguments. (I hate it when that happens. :-)

    The basic argument is this: are the complexities of notation (language, whatever) essential or accidental aspects of the difficulties in programming? Brooks' argument is that the notation is an accidental issue -- that you can't gain, say, an order of magnitude improvement by chaning notation alone.

    This is clearly not 100 percent true 100 percent of the time -- "drawing" a GUI with something like Powerbuilder, Eclipse, or JBuilder is clearly a lot more effective than coding it, even with EMACS. On the other hand, in real industrial development, actual coding is only about 15 percent of the total time and cost invested -- so no matter how wonderful the language is, it can't possibly account for more than about a 15 percent improvement.

  12. Maybe Oz by Szplug · · Score: 3, Informative
    though Oz is a bit wilder than most mainstream languages.

    Get the book free while you can; it's gotten high praise, a real treat for getting a wide view of different styles of computer programming. It compares favorably with SICS.

    --
    Someday we'll all be negroes
  13. Just one language? by Skeme · · Score: 3, Funny

    Why stop there? We need as many languages as we can get, especially in today's economy and job market.

  14. Wish List by bwt · · Score: 2, Interesting
    I'd like a language that could run in three different modes: interactive interpreted form, highly portable runtime form, and full natvie speed optimized form. Give me common syntax for each and let them interact. For example, if you want to, you can use Jython to script java code. If you need something to be really fact, you write it in C and us the native interface. Why do I have to learn three syntaxes for this? OK, Jython is dynamically type and Java is statically typed.

    Give me both OO abstraction and powerful bit-twiddling capabilities. If I want a 29 bit variable type, dammit I want a 29 bit variable type. Give it to me and let me do all kinds of low level stuff like shift three bits and mask it and treat the first 3 bytes as a unit. Then let me encapsilate that in an object oriented lock box.

    The language MUST have these things built in: associate arrays, regular expressions, iterators, introspection, "here" documents, both static and dynamicly sized arrays.

    The language should be database savy. This means implicit SQL cursors (like in SQLJ or PL/SQL) so that I can say something like
    DBI_DRIVER.set(driver)
    DBI_DRIVER.login(dbname, user, passwd)
    for current_employee in {{
    select emp_name, salary, start_date
    from employee
    where dept_no = $department }}
    do
    {{update employee set salary = salary + $accounting.calulate_bonus}}
    end"
  15. So long as it compiles in to object code. by AxelTorvalds · · Score: 2, Insightful
    I was just marvelling at the new Mandrake compiler RPMs and how they now have C, C++, Objective-C, Ada(95), Fortran, Java and Pascal all supported in there. Very cool. I don't know why, I haven't coded a line of Pascal in over 10 years but it just feels right having a pascal compiler sitting around. There are some programs that are amazingly easy to read and write in pascal... I never seemed to have stack or buffer overflows in pascal..

    I've thought about this a bunch over the last few years. IBM has the PL series of languages. PL/S and PL/X were deamed "strategic" and as such they were never standardized outside IBM, yet IBM continued and still continues to use them for different tasks. There are reams of code written in them and REXX, another IBMism. Lucent has a dozen languages for their own use. Modula-3 started as a DEC thing before is was kind of opened to the world (damn beautiful language I might add, if only more people used it and DECpaq-Hewlet relicensed the gcc front-end code so we could integrate it..) MS has their BASICs and now C#. And numerous other companies have found it either advantageous or some engineer got it in his head that it was a good idea for them to produce their own custom langauge and that they could produce apps in it faster than by using off the shelf components. To some degree I think it's true, you'd be surprised at some of the REXX that holds the world together. I've kind of thought that it was time for an OpenSource language of sorts, there is perl, python, ruby and others but something that can be compiled in to real high performance object code and something that helps us solve the problems we run in to.

    I'll tell you what I think would be killer, in my rambling sort of way. Syntax is key just because people are picky about it, something java like would be great. Make it a front-end to gcc, this gives it a sense of credibility and support and a great optimizer and platform support. Build it so it can easily link with C code. Give it bounds checking and type checking. I thinking it will be very C like for the most part; have that light weight feel to it where you can see the opcodes that the compiler is going to produce as you write in it. Give it objects and classes, but make it light weight on the syntax, building new classes in java requires a new file, doing it in C++ can be feel like lifting the titanic some times because it's proper to add headers as well as implementations. Then with the standard class library, it needs some fundamental object classes like strings (I can't believe how long it was for a standard C++ string class to exist, i've use about a dozen different ones prior...) and sockets (make OpenSSL as close to a boolean flag as you reasonably can...) probably some others I'm not thinking of at the moment. Keep them lean and mean like they are in C but beef up the areas of weekness. Some sort of regular expression engine should be available also.

    For example, strcpy shouldn't exist or there should be some kind of type checking to verify that the inputs are indeed strings and it allocates memory. memcpy is missing several arguments, notably the source and destination sizes. I can probably list dozens of C and C++ problems are aren't language issues so much as library issues that have realworld impact and cause real problems. Now the first class objects that are passed in to strcpy or memcpy (whatever they get called in this new language) could have the missing pieces of information or the API can be built to support it. Basically, I'm suggesting that we add the few instructions it takes to do bounds checking, it's simple code to add to a c compiler. Let's get rid of buffer overflows as much as we reasonably can with the under lying language. Now if you want to do tricky shit with pointers then so be it but if you use standard language constructs (functions will have in and in-out parameters like the C++ & qualifier.) then you should be pretty safe from buffer overflows. With good type checking and such w

  16. The 100 year language by t482 · · Score: 4, Interesting

    I think that Alan Kay was way ahead of his time - getting kids to program. I think much like the spreadsheet revolutionized office work by allowing dynamic analysis of data the next big language will be one that is simple enough to allow average office workers to speed up and automate their own work. Abstraction is key.

    VBA is being used currently for a lot of that work - but it is truly horrible. Wharton has started teaching its MBA students Python.

    Check out what Paul Graham has to say about programming languages in 100 years (basically they won't change much).
    http://www.paulgraham.com/hundred.html
    And Artima had a discussion on this topic, "After Java and C# - what is next?". http://www.artima.com/weblogs/viewpost.jsp?thread= 6543

    1. Re:The 100 year language by zero_offset · · Score: 4, Insightful
      VBA is being used currently for a lot of that work - but it is truly horrible.

      VBA is isn't horrible. It's the MS Office object models that are pure cluster fucks.

      However, what's truly horrible is the code that those same self-taught average office works write. I didn't get the impression that was their target, but if it was, they'd have their work cut out for them.

      In my experience, the average office worker's explorations of VBA always follow the same path... they discover it and play with it... they build something useful with it... the useful thing is shared with other workers... it becomes a critical business tool... it fails miserably (possibly causing lots of confusion and/or costing a lot of money)... then it's thrown over the fence to IT for an emergency-fix... What does it do? "We don't know, we just have to run it every morning. It was written by that guy who quit last year. It worked until yesterday."

      If these pragmatic-language guys ever decide to tackle the non-professional-programmer experience, they REALLY have their work cut out for them -- and not even the best language in the world can solve the problem of a really badly-designed object model.

      --

      Slashdot quality declines as the number of hot grits posts decreases. - Provolt's Law, Apr-09-2005

  17. Re:What about a graphical language by Josh+Booth · · Score: 2, Informative

    ...notation is an accidental issue -- that you can't gain, say, an order of magnitude improvement by chaning notation alone.

    Sort of like how things are added to C like dynamically typed object oriented programming (GObject), namespaces (by prefixing functions with a namespace), generic lists, hash tables, UTF-8 string manipulation, etc (GLib), arbitrary precision math (GMP). They are added not by syntax, which may make things somewhat simpler, but not significantly so.

    typedef struct {
    int bar;
    } Foo

    Foo *foo_new(void);
    Foo *foo_copy(Foo *);
    void foo_delete(Foo *);

    void foo_set_bar(Foo *, int bar);
    int foo_get_bar(Foo *);
    That's not too much different from C++:
    class Foo {

    public:
    Foo();
    Foo(const Foo &);
    ~Foo();

    void setBar(int);
    int getBar();

    private:
    int bar;
    };
  18. No Need I Just Released What You Need. by monk · · Score: 2, Funny

    I offer as the pragmatic language of the future, Toadskin. It's all you need. It has all the power of BrainF**k and all the friendliness of Forth. So let's get those HR systems ported folks!

    --
    [-- Trust the Monkey --]
  19. My PL pains by Tom7 · · Score: 3, Insightful

    The worst missing features in most programming languages that I sometimes have to use:

    - lack of sum types. Languages have long offered conjunctions (structs in C, tuples in python). Disjunctions are equally useful. (With it, a function could return one of two possible types. The overuse of 'null' as "the other pointer" in C/C++/Java accounts for a tiny corner of the possibilities here.)

    - lack of higher-order, nested functions. You can do so so much with functions once they are first-class in your language. All this stuff about iterators over containers in Java and "I want SQL built into my language so I can say for each employee in query do" is subsumed by map/fold operations and higher order functions, for starters.

    - lack of safety. Man, I sure hate tracking down memory corruption bugs, and I sure hate it when there's an exploitable security hole in my or someone else's code because of them.

    I already have languages with these features and more, so I don't need recommendations. But if your new sparkling language doesn't have these features... then what are you doing?!?

    1. Re:My PL pains by Tom7 · · Score: 2, Insightful

      Indeed. With sum types you can get rid of the dreaded null pointer -- you have "real" pointer types, and then you have "optional" types like you mention with Found/NotFound. Now, not only does it force a check before using the potentially "null" pointer, but once you check it you know it really points to some object and you don't ever need to check again. It's painfully obvious once you've programmed like that, but somehow people continue to miss out on this feature because, I guess, it was never in C.

      Taking it a step further, recursive sum types like in SML can be used to define recursive data types like lists and trees, and then pattern match against them. That's so nice compared to the way you'd do it in Java or C++.

  20. Holy War by Tablizer · · Score: 2, Interesting

    I have been in a jillion language and paradigm wars over the years, (Itsa hobby of mine :-) I have come to conclude that many aspects of programming and languages are purely subjective. What floats your boat may sink mine and visa versa. People process symbols and patterns differently in their head. There is no one right language.

    It also seems that committee-designed languages usually fail because they compromise so much that they don't "sing" to any one group. You need a fan-base to get a language to take off. But, this also means catering it to specific mental types.

    That being said, I have documented a bunch of potential scripting language features and give justification for my favorites in the list:


    http://www.geocities.com/tablizer/langopts.htm

    You may not agree with my decisions, but there is plenty food for thought for anybody researching and collecting lists of language options and alternatives. (I don't cover staticly-typed languages because I don't really like them.)

  21. Enough already? by Fastball · · Score: 2, Interesting
    I don't want to learn any more languages. Are new languages necessary, or can existing languages be extended to meet our needs? Personally, I'd rather it be the latter, but then I'm a thirty year old burnout.

    Man. Anybody else tired of keeping up?

  22. Could be hard... by DarkDust · · Score: 3, Insightful

    It's sad, but I believe this will fail horribly. The past has shown that "committee" languages don't succeed (or at least only in some niches, like Ada).

    In my experience systems (like PL, applications or even OS's) are best when designed by just a small group of people: not too few and too many (I guess four to six people is a good value). Too few (just one or two) tends to include just the exclusive view of thing from the designer, while too many just makes a great mess since it's hard for a group of people to settle on one point.

    Another thing I learned while reading some of the stuff about C and its history on dmr's homepage is that languages which are defined first and implemented later often hold some promises in the form of "in theory this should be very elegant and nice, but it turns out to be annoying or very, very hard to implement".

    dmr also said one of the reasons C succeeded was because it was created to fit a need, not to make a point or as demonstration. So if there is need for some features then this project might succeed, but I don't see any striking needs any more, there is already a PL for almost every problem out there (and interestingly nearly every PL out there is very strong/elegant in solving certain problems but fails horribly in others).

    But nonetheless I wish the people participating in this project all the best, if they would come up with an interesting, useful and beautiful language that would make an improvement to the PL world this would be a very cool thing :-)

    1. Re:Could be hard... by cyberlync · · Score: 2, Informative

      I am one of the people deeply involved in this project and so far there are two people directly involved with the design. There is a third handling administration and a few others working on documention. The community comments and provides suggestions. Thats hardly a big commitee.

      On top of this the project is progressing rapidly. It may not ever take off, but it has been fun doing it and thats worth while to me.

      --
      I'm a programmer, I don't have to spell correctly; I just have to spell consistently
  23. Re:what is a pragmatic language? by turgid · · Score: 4, Insightful
    with little attention paid to consistency and orthogonality

    No, that just makes is clumsy, quirky, difficult to read and difficult to write.

    A "pragmatic" language would be one with little or no "red tape", with sensible defaults, clean syntax, easily optimised, portable, easily extended, consistent, orthogonal and easy to learn. It should be difficult to "shoot yourself in the foot."

    In my mind, PERL has its place : scripting. Serious application development should be done is somehting more "pragmatic".

  24. The role of libraries by Anonymous+Brave+Guy · · Score: 4, Insightful

    I think I understand where you're coming from, and I agree with the principle, although I don't entirely agree with exactly what you've said.

    I think the issue of how libraries are handled is crucial to the success of a modern programming language, as numerous success stories and famous failures can testify. Here are a few random thoughts; how do they match up with yours?

    Firstly, I agree that it is best to keep a small "kernel" standard library. This library should be very well designed, with as much thought put into it as the language itself. In particular, it must be readily extensible by other libraries without being overcomplicated. If you like, it should provide a framework for doing common programming tasks, without filling in too many specific cases.

    However, I don't think it's either easy or desirable to separate libraries completely from the language itself (as in syntax, grammar, etc). Your own comment about C++ is wrong, for example: you cannot ignore the standard library completely, because certain language operations (such as a failed dynamic_cast on a reference type) result in behaviour that needs library support (throwing an exception of a type defined by the standard library).

    Now, you could get around that by creating new standard types for such cases, but do they really belong in the formal grammar of the language, alongside normal exception behaviour but distinct from it? The point is, from a programmer's perspective, it doesn't matter whether that exception type is in the library or the language. It should function identically, offer the same interface, exhibit the same behaviour, either way. It shouldn't matter whether my string type is part of the language or part of the library; it should just work.

    The same goes, to a lesser degree, for other libraries. Once I've decided to use a library (or part of it), that extra functionality should just be there. I shouldn't have to care where it came from, and the only time I should have to know it's in a library is when I'm identifying the functionality I want to use. The syntax, style and function should be just like any other feature of the pure language and its standard library.

    As a final point, while I believe the standard and portable library should be compact and highly flexible, it's obvious that having a widely recognised and comprehensive library of commonly used functionality is advantageous. Look at the success of Java, for example; although many of its standard libraries suck compared to alternatives for other languages, or even replacements available for Java, that doesn't matter to many Java programmers, because they're good enough. OTOH, this results in suboptimal code due to laziness and/or lack of knowledge of alternatives on the part of many Java developers.

    The solution to this, IMHO, is to follow the path set by Perl (CPAN), TeX (CTAN), etc. The sponsors of the language -- commercial or community -- should provide a well-known and recognised central repository, into which contributers can add their own offerings. Better yet, adopt a genuine community review process, such as the C++ Boost community has, to force higher standards within the libraries in the repository.

    So, in my ideal little world, a language would have a structure such that libraries and language were indistinguishable except where identification is concerned (basically just a matter of how to specify which libraries are desired, and naming conventions to prevent clashes between them). The language should come with a standard library that provides really common features (basic math functions and string handling, for example) in flexible frameworks on which other libraries can build. The bulk of library functionality shouldn't be standard -- that's too invasive and too limiting -- but ideally should be collected in a central repository of peer-reviewed offerings, with simple, standard and widely known conventions for using those libraries in programs. This way, no-one uses substandard code by default, but you still have the comprehensive functionality base there when you want it.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  25. My thoughts by DimGeo · · Score: 2, Interesting

    I think Java is good. It fails at some points (this is by a person with 3+ years of professional Java experience):
    1) No convenient way to call methods by name. Takes quite a few try-catch constructs, etc. What about this snippet:
    Object x = ...
    call someMethod(a, b, c, d) at x;
    or something. Ok, it may throw any necessary exceptions.
    2) No standard way to access DBs. JDBC is a pain. It works, but with lots of workarounds for different dbs. One must implement class loaders, selecting the driver at runtime is terrible, parsing the CREATE statements to replace the data types is way out of bounds.
    3) Terrible with memory management, especially the GUI stuff. There just HAS to be some efficient way to deal with this. Maybe mix GC with ref count + explicit delete statement, which zeros all references to the object (possible with the current Sun JVM implementation, because the references are one step further).
    4) No way collect a few threads, name them an "application", then kill them off. Oh, there is, but you have to worry about bizarre deadlocks resulting from unsent notifications, etc.
    5) The localization is a PAIN. You must write properties files, compare locales, etc. i.e. do all the work by hand. And there is always the temptation to hardcode a string in a hurry.
    6) Nothing really to force you to avoid deadlocks. Some ideas : throw exceptions when deadlock is reached, etc.

    I love the idea of OSGI (my company, ProSyst, is a lead vendor of the OSGI framework). The idea is simple : jar files, called bundles, export and import packages, and register services (objects implementing interfaces both the user and the exporter have access to). Problems : no way to completely kill off (safely) any threads the bundle might have started when it is uninstalled.

    Some suggestions about the new language:

    1) Add call-by-name.
    2) DB support. I saw one message before this one which was very well thought out, and was on this subject.
    3) Add ref counts and explicit delete-s to the GC
    4) Borrow ideas from OSGI - easy plugins, services, etc. Runtime load/unload of components. Runtime SAFE kill-off of entire bundles. Kill their threads, close their files, free their memory. This is done (sort of - the memory freeing comes to mind) with win32 dlls, but no way to do it in Java
    5) Add localization support. For example, some library class which loads the appropriate string tables according to the locale (the easiest solution)
    6) Two ideas here : 1) force the monitor objects to be declared beforehand, and assign priorities. If someone tries to lock these objects out-of-order, throw exceptions. 2) throw exceptions when a deadlock is reached.

    more things to think about:
    - realtime support. Threads which cannot allocate memory, and can only use static memory.
    - good cross-platform gui. Swing is a great idea, I mean its programming interface, no the terrible self dead-locking, ugly implementation. Having platform-dependent look and feel (I *mean* native look and feel, not some "lightweight" blown-out implementation, which slows down to a crawl at the simplest operations). See previous thoughts about deadlocks.

    And about templates : I do not care, really (oh, the horror). Typecasts are not a problem, when you only have one or two types of objects in the same collection. I even prefer there not to be such.

    Now, about the platform:
    How about have the language compile to C or Java (make it an option). Then, make an option to disable the garbage collector (impossible for Java, but a valid options for C). If you compile to C, make sure you use a serious GC, not a conservative one which treats all your data as pointers. Use a Java-like type system. This can even compile to .NET if necessary. Thus, you can target 3 platforms with an ease.

    -- bailing out.

  26. Keeping up just sounds hard -- it isn't really by Anonymous+Brave+Guy · · Score: 2, Interesting
    Man. Anybody else tired of keeping up?

    I think the problem today is that everything seems to be moving on much faster than it actually is.

    Quite a few years ago, I learned to program in C and x86 assembler. They were useful at the time, and I learned a lot about structured programming and such while using them.

    Several years later, I learned C++, and encountered OO for the first time.

    At university, I discovered things like Java and ML. ML was new and interesting, but at the time Java was just underpowered C++ with a heavyweight standard library, and to a large extent it still is. That was when I realised that many "advances" that come along "at breakneck speed" aren't really any different to what you've already got.

    For several years at the start of my professional career, I relied on little more than standard C++ and a few very common libraries (MFC, mainly, and some in-house things). I didn't need any more.

    After a while, I got the feeling I was stagnating, and since I wanted to do a few things that weren't convenient with the C++, I went out and learned some more.

    In the past couple of years, I've learned to generate HTML with XML/XLT, I've learned to write scripts in Perl, I've learned about server side scripting and CGI, I've learned to use MySQL, and recently I've put it all together and written a pretty solid bulletin board web site for a club I help run. And this was just with a few hours now and then out of curiosity; the day job writing back-end C++ without much whizz still pays the rent.

    I guess my point is that three years ago, CGI, MySQL, Perl, XML and all the rest were just buzzwords to me. Everywhere you looked on the Internet, there were millions of pages of tutorials, mostly very bad ones, and people telling you it was the next great thing, radically different to all that's gone before, etc. You know what? I learned the basics of each of these things inside of a day, once I actually sat down, did some real homework to track down a decent tutorial and got on with it. None of this stuff is hard. Just find useful info -- which often still comes on paper, or in the form of docs from the tool provider for high calibre things like Perl, MySQL or Apache, and not from random glitzy web sites and magazines -- and do some reading.

    I reckon if you have a general knowledge of programming in procedural, OO and functional styles, a bit of experience with database design and SQL, a bit of web savvy and familiarity with mark-up, and some general knowledge of modern computers, you can learn any of the buzzword technologies in a week, maybe even a day. They're really not very clever at all; the reason they're buzzwords is that stupid people talk them up to make them sound clever.

    Keep the faith; if you've got solid basics -- as any old-timer in this industry probably does -- you're never far behind the lead edge if you choose to catch up. The only people who claim everything is advancing at lightspeed all the time are marketroids selling new buzzwords, and impressionable kids too new to the business to know any better. The rest of us can well afford to relax, keep an eye on new developments now and then, and simply learn whatever tools we need to do what we want to do, if and when we need them.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  27. Re:Haskell or Lisp by Anonymous+Brave+Guy · · Score: 2, Funny
    What could any programmer want that isn't already in Common Lisp or Haskell?

    A powerful library, a clear syntax, flexible underlying models and a wide user base?

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  28. Make it TYPEable by mhotas · · Score: 2, Insightful

    Of course READability is important; but what about writability (and in particular, typeability)? Specifically, anything which avoids the use of the Shift key or multi key combos. Maybe what I really want is a programmer's keyboard which allows underscores, parens and major operators to be available without an awkward vulcan nerve pinch.

    1. Re:Make it TYPEable by Anonymous+Brave+Guy · · Score: 2, Insightful

      Ultimately, while being easy to write does confer a small advantage, being easy to read is much more significant. As the oft-quoted motto reminds us, code is only written once, whereas it's likely to be read many times. A vanishingly small amount of a developer's time is spent typing. Most is spent in design, testing, documenting and such rather than programming, and even of what I'd call programming, only a tiny fraction of the time is spent pressing keys on a keyboard.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  29. Re:what is a pragmatic language? by turgid · · Score: 2, Interesting
    I've programmed in BASIC (several dialects), FORTH, FORTRAN-77, C (K&R and ANSI), C++, Pascal (Borland TP 7.0), Modula-2, Z80 assembler, 8086 assembler, 80386 assembler, Java and bash.

    I started coding when I was 8 years old.

    My day job involves a lot of shell scripting, Makefiles and the very odd bit of Java and C.

    For pleasure, in my own time, code in C.

    I have found C to be the most pragmatic language I've tried so far, closely followed by Turbo Pascal (I can't comment on Delphi, I stopped using Windows PCs then).

    FORTRAN is completely un-pragmatic. Like the example of PERL given above, it has a terrbile syntax and is inconsistent and unforgiving of errors.

    At the other end of the scale I've tried is Modula-2. This language is un-pragmatic in a different way. It is very orthogonal, rigid and comprehensive. Unfortunately there is so much red tape involved in writing code in this language it is very frustrating.

    C and Pascal (not straight Pascal though) represent a happy medium. I've looked at C++ over the years, read books on it, looked at people's code and tried to write my own, but it's all Greek to me. It is fiendishly complicated.

    Now, FORTH.... don't get me started on FORTH :-)