The Artima Developer Community
Sponsored Link

Weblogs Forum
Designing a Language for Library Developers

47 replies on 4 pages. Most recent reply: Oct 17, 2005 1:28 PM by Max Lybbert

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 47 replies on 4 pages [ « | 1 2 3 4 | » ]
Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Designing a Language for Library Developers Posted: Oct 11, 2005 11:45 PM
Reply to this message Reply
Advertisement
Wow!! The testostorone. Yo CDiggins, its pretty clear
that this cat is trying to knitt pick. I don't think
the artima community will knock you down or think any
less of you if you ignore psychopathic rants. Following
the discourse I get the impression that: "Yes the George
character is an extremely smart - high IQ type - experienced
developer, but anyone can gauge that his claims of being
sincere in trying to get into the mind set of what
triggered Heron's development
are a crock of shhhh.
His responses are not constituents of constructive criticism,
he clearly is trying to be as demoralizing and as destructive
as possible.

CDiggins, if I were you, I'd spend my time on more
constructive things than responding to a cat who needs
to stroke his own ego one too many times.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 3:07 AM
Reply to this message Reply
> its pretty clear
> that this cat is trying to knitt pick.

On the contrary, asking for specific examples of what will be achievable by a new language that cannot be already achieved by existing languages is perfectly reasonable.

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 4:12 AM
Reply to this message Reply
> On the contrary, asking for specific examples of what will
> be achievable by a new language that cannot be already
> achieved by existing languages is perfectly reasonable.

I totally agree with you, but can you honestly say that
this George guy's posts and responses to posts following
the dialog genuinely match what he claims to want to
know or is it more so that he wants to flash around
- and try to dig as much as possible?

If your intentions are straight there is nothing
wrong with probing, but the tone in this guy's posts
seem more so like malicious probing than anything
else.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 9:39 AM
Reply to this message Reply
I posted some comments to some of these issues <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=131502">here</a&g t;.

And I understand the value of the questions being posted here, but I agree that some of them have an unfortunate tone which could be construed as combative. This probably doesn't help Christopher see and face whatever brutal truths are really lurking under all this.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 9:40 AM
Reply to this message Reply
Oops. Let's try this:
http://www.artima.com/weblogs/viewpost.jsp?thread=131502

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 9:56 AM
Reply to this message Reply
> > its pretty clear
> > that this cat is trying to knitt pick.
>
> On the contrary, asking for specific examples of what will
> be achievable by a new language that cannot be already
> achieved by existing languages is perfectly reasonable.

I disagree, the question is not reasonable. Ignoring Heron for a moment I can't think of any language which achieves any one thing which no other existing language achieves.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 10:11 AM
Reply to this message Reply
I think if you want to motivate people to adopt a new language, they need to understand what the benefit is. If it doesn't do something that they haven't been able to achieve before, there's no motivation to change.

The problem is that these motivations can be more subtle than a discrete language feature such as, say, multimethods. A large motivation for people to move from C++ to Java, for example, came because people were experiencing a dramatic drop in development time in order to produce a working program, on the order of half. And many people experience a 10x speedup in productivity when moving from C++/Java to Python.

These productivity increases are, IMO, the prime motivators. If it takes longer to accomplish something, that's not too motivating. But it's usually a combination of features, and in Python's case, a whole world view about what software development means, that taken together increases productivity. That's where the art and craft comes in -- being able to see and balance these features and produce something elegant and valuable. And to pull it off, you must walk the razor's edge, where there are far more ways to fall off than to stay on.

Max Lybbert

Posts: 314
Nickname: mlybbert
Registered: Apr, 2005

Re: Thinking things over Posted: Oct 12, 2005 10:22 AM
Reply to this message Reply
After my post last night, I thought I should clarify where I'm coming from. I'm not saying you should just drink the Kool Aid.

Perl was the first language I learned (not counting BASIC and LOGO, that is). Java was the second, and C++ the third. Between the three languages, I prefer C++ and Perl in that order. To be honest, I learned more Computer Science terms from Perl than Java.

Over time, I realized that Java (at the time) was really good for beginning programmers, but pretty weak for most other things. I also realized a lot of people have tried their hand at making a better Java/C++, and that's where I originally cataloged Heron, and it's how I assumed you had cataloged Heron. Just another programmer's favorite sandbox.

But on second (and third, and later) glance(s), I started to see some design decisions in the feature list. Those decisions seem targeted toward making correct and efficient code easier to write. So, "just last week that Heron was going to be a multi-paradigm language that fixed the performance issues and other limitations of C++" doesn't prevent it from also being a good library-writing language.

After re-reading your previous posts, I think I can see where we were seeing things differently. First, you were apparently wondering if there would some set of keywords or language features (such as Perl's shift operator that makes list processing easier) that would be optimized toward library design. Second, good libraries have good APIs (C++'s template mechanism permits good libraries to make big-O performance guarantees as well -- http://www.stlport.org/resources/StepanovUSA.html), and you were curious if there would be language support to help that. Aside from the feature list of AOP, DwC, no virtual function calls, memory/resource management, etc., there is nothing specially targeted to libraries.

The original post was just another attempt to sell correct code by listing its practical benefits.

In reference to the patterns Mr. Diggins often posts -- in that period of time that I considered Heron another Java knock-off, I came back here just to read the pattern advice. And much of that advice looked like it led to quite a lot of typing. But these patterns are coming out of automatic code generation. You can think of Heron (or HeronFront, or heron.standard as it's now called) as an interface to an automated C++ template generator. You won't be 100% correct, but you won't be terribly off, either. Maybe that explains things a little. And perhaps it explains Heron's link to generative programming, which (btw) should offer practical benefits to library writers as well.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 10:23 AM
Reply to this message Reply
> And I understand the value of the questions being posted
> here, but I agree that some of them have an unfortunate
> tone which could be construed as combative. This probably
> doesn't help Christopher see and face whatever brutal
> truths are really lurking under all this.

I just wish people would simply say what the "brutal truths" are as they see them, rather than asking leading questions which either can't be answered, or they don't care to see answered.

Since I have to to guess as to what the brutal truth to which you and others are trying to point me towards, I will venture the guess that it is as follows:

Heron will not be successful because it offers no significant improvement in the ability for a programmer to express abstractions. Programmers will not likely switch to a new untested and immature language without substantial technological advancements.

If this is correct, then my response is is this: my goal is to design a language which makes me significantly more productive first as a library developer and second as an application developer, all the while allowing me to write code which performs as efficiently and is at least as expressive as the best code that I can write in C++. Now whether this will lead to a successful language or not, is debateable. I believe it will.

I am a very knowledgeable C++ programmer, but my productivity is severely hampered in by C++ due to the inability to easily express:
- delegations
- AOP designs
- contracts
- efficient dynamic typing
- concept checking
- signature based polymorphism
- closures
- nested functions
- compile-time floating point math
- parameterized typedefs
- parameterized modules,
- compile time loops
- move semantics
- new first-class primitives
- new control structures

If I want to write code which uses those more advanced techniques (which would significantly enhance my productivity) then I have to turn to some other language. In every other language I know there is a trade-off, usually in efficiency. Or a garbage collector is forced upon me. Or I have to sacrifice imperative programming techniques. None of those sacrifices are ones that I am willing to make as a programmer, and I see no reason to. So in the end, I want something which offers the -- what I perceive to be -- benefits of C++, but enhances my productivity.

This is by its very nature an incredibly egotistical endeavour, to assume that what I want in a language will appeal to other programmers. This is where I make the leap of faith, that what I search for in a programming language, is something which will ultimately appeal to other programmers.

Max Lybbert

Posts: 314
Nickname: mlybbert
Registered: Apr, 2005

Picking a nit Posted: Oct 12, 2005 10:28 AM
Reply to this message Reply
cdiggins: Ignoring Heron for a moment I can't think of any language which achieves any one thing which no other existing language achieves.

beckel: I think if you want to motivate people to adopt a new language, they need to understand what the benefit is. If it doesn't do something that they haven't been able to achieve before, there's no motivation to change.

me: Hypertechnically speaking, you can do anything in assembly code that you can do in any other language. It's not so much that new languages make it possible to do new things, it's that they make it easier to do certain things. And a language designer's choice of what things to make it easy to do will determine if the language is a success.

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 10:31 AM
Reply to this message Reply
> I think if you want to motivate people to adopt a new
> language, they need to understand what the benefit is. If
> it doesn't do something that they haven't been able
> to achieve before, there's no motivation to change.
>
> The problem is that these motivations can be more subtle
> than a discrete language feature such as, say,
> multimethods. A large motivation for people to move from
> C++ to Java, for example, came because people were
> experiencing a dramatic drop in development time in order
> to produce a working program, on the order of half.

Yes, exactly. And Java didn't do anything that C++ didn't. In fact Java did less, which is probably why it was so successful. To quote Tim Peters: "There should be one and preferably only one obvious way to do it.". This I think is the key to Java/Python success, and the eternal struggles of C++ programmers.

We are very much on the same page then. My primary motivation is productivity (but with fewer sacrifices).

Greg Jorgensen

Posts: 65
Nickname: gregjor
Registered: Feb, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 11:28 AM
Reply to this message Reply
> I just wish people would simply say what the "brutal truths"
> are as they see them, rather than asking leading questions
> which either can't be answered, or they don't care to see answered.

I am perhaps not asking the questions you want to answer, and maybe I'm not asking them in the right way. But I wouldn't bother reading your posts or asking questions if I wasn't interested. I want to know what, if anything, Heron may offer to me as a professional programmer. And since you describe yourself as both a C++ expert and a language designer, I'm curious to know more about some of the criticisms you have of C++ and other languages, and how you intend to address the shortcomings of those languages with Heron. Are those not legitimate questions?

> my productivity is severely hampered in by C++ due to the
> inability to easily express [list of buzzwords]

You have written that several times, with various lists of things that you can't do, or can't do easily or fast enough, in C++ or other languages. As an experienced programmer myself I am curious about what kinds of applications or libraries you are working on or need to work on or can't work on because of the shortcomings of C++ et al. In over 25 years of programming I have many times found a language or a set of libraries wanting and not up to my task, and I can often think of ways that I would do things differently. But as I mentioned before, that has happened when I did not have the luxury of choosing a language. In work for hire the environment and tools are often decided for me. In your case, however, you have the apparent luxury of designing your own language to solve problems, which means you aren't constrained by a customer who has 50,000 lines of Visual Basic code to work on.

That question is perhaps none of my business, but I think it's legitimate to at least ask. Larry Wall and Guido van Rossum and Bjarne Stroustrup and James Gosling have all written, at some length, about the actual real-world problems they ran into that prompted them to design new languages. Sometimes academic interest is the driver -- Niklaus Wirth and Oberon come to mind. Maybe you don't see the point in explaining how you decided to design and build your own language, and that's OK, but I for one am (or was) sincerely interested. I have to say that now I question how serious you are about developing a real language and ecosystem around it, but there have been enough language projects in the last decade I've been interested in (PHP, Python, C#, Ruby) that I was giving you the benefit of the doubt.

I've written hundreds of thousands of lines of mostly pedestrian application code, and a few thousand lines of truly interesting code. I honestly don't know if I am really missing something because C++ doesn't have good support for AOP, contracts, concept checking, and closures. I have never missed any of those things, at least not enough to tinker around with my own preprocessor for C++. By analogy, if someone tells me that all motorcycles but Harleys are crap and they need 1,200cc minimum for the kind of riding they do, I will (as a non-Harley motorcycle rider) ask "Why not?" I can ride for days and have lots of fun on a 750cc BMW (and probably not leak as much oil). Naturally I am a little skeptical of their position, but I can still ask them to explain with real interest and accept that perhaps they have different experience and needs than I do. That's all I asked you to explain: I'm trying to find some common ground between my programming experience and yours.

I apologize for indulging in sarcasm, but I am still not satisfied by any of the answers you've given me, or posted in response to other people. For me, the "brutal truth" is my suspicion that you are more interested in promoting yourself (as your Artima profile insinuates) than you are in developing a real language. If that is true, then I feel misled and tricked. If it's not true, I will be happy to try Heron and apologize to you for questioning your motives.

Robert Parnell

Posts: 22
Nickname: robparnl
Registered: Jul, 2005

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 8:19 PM
Reply to this message Reply
Hmmm, the feature set:

inability to easily express:
- delegations
- AOP designs
- contracts
- efficient dynamic typing
- concept checking
- signature based polymorphism
- closures
- nested functions
- compile-time floating point math
- parameterized typedefs
- parameterized modules,
- compile time loops
- move semantics
- new first-class primitives
- new control structures

> I have never missed any of those things, at
> least not enough to tinker around with my own preprocessor
> for C++.

Yes, looks more like a compiler of a compiler. Or a language writing another language. Recursion in beautiful perfection.

* This is certainly becoming a heated topic. Anyhow, my two cents. So, what is the Heron environment?

How long till we can see "a runner" system? Even if, it only took your hello.hrn and altered to hello.C++. That would give us something. (Is there an extension suffix picked out?)

But, how to implement modularity. The libraries seem to be your modules. Use a hierachrcial reference mechanism? As if you have any choice. (not)

So, if there is a ML shell? Or a Scala sub-system agent. Then, you could add an AI & more?

Thats it. Rob pnl

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 9:14 PM
Reply to this message Reply
> * This is certainly becoming a heated topic. Anyhow, my
> two cents. So, what is the Heron environment?

I'm sorry I'm not sure I understand what you mean. I'm developing a Heron to C++ translator (HeronFront), and an interpreter for a subset of Heron called HeronScript. Currently these tools are being developed for Windows, but there is an effort underway to port them to Linux by an intrepid soul, Max Lybbert.

> How long till we can see "a runner" system?

There is a working but undocumented version of HeronFront already in a working prototype stage at http://www.heron-language.com along with a working compiler. The source for all is in C++, and public domain.

You have to be a pretty twisted soul to play with these things without any documentation, though the interpreter does come with an onboard tutorial. Honestly, I wouldn't advise it. There really isn't much to see at this point since the implemented feature set makes it little more than a toy or an exercise in compiler/interpreter building.

By late December the prototypes should start doing some very interesting things and some decent documentation will be available, rather than a bunch of incoherent ramblings on my blog.

> Even if, it
> only took your hello.hrn and altered to hello.C++. That
> would give us something. (Is there an extension suffix
> picked out?)

That is up to the user, I won't force that on anyone.

> But, how to implement modularity. The libraries seem to be
> your modules.

Heron libraries are broken up into modules. Modules are simply singleton classes.

> So, if there is a ML shell? Or a Scala sub-system agent.
> Then, you could add an AI & more?

Now I suspect you are simply being facetious ;-)

Sean Conner

Posts: 19
Nickname: spc476
Registered: Aug, 2005

Re: Designing a Language for Library Developers Posted: Oct 12, 2005 10:55 PM
Reply to this message Reply
But aren't you falling into the trap that C++ did? The first C++ “compiler” was nothing more than a preprocessor that converted the code into C, which was then converted into assembly, then assembled and linked. So now you are writing a “compiler” that is nothing more than a preprocessor which converts Heron into C++.

I'm not trying to be mean here, but to take just one thing from your list of features: closures. I will state up front that I know very little of C++, but I do know C very well. And frankly, I can't see doing closures in C (and by extension C++) portably. Well, actually, I can, but it would be so painful to use that I wouldn't even bother (or rather, it would be so close to an interpreted language that I might as well go that route). I can however, see how I could do closures in Assembly on several different platforms (ugly on the Intel x86, nicely (if severely limited to due memory) on the 6809, nicely on the 68K, quite sweet on the VAX, and easily on any number of RISC based machines) but it isn't portable like C.

Taking another feature—nested functions. I can see how to write a translator that can spit out C code, but with a few restrictions on function pointers.

I suspect the reason you are targeting C++ is that you don't want to write a full compiler, just a translator and leave the heavy lifting to something like g++. But I think that in the end may limit the usefulness of Heron (how much as the baggage of C hurt C++?).

But as I play around with langauge design (which is a hobby of mine since college) all my lanauges seem to evolve (or devolve, take your pick) to either Lisp or Forth, which, when you think about it, are two sides of the same coin (only Lisp and Forth don't really have the sheer number of libraries like Perl does).

Flat View: This topic has 47 replies on 4 pages [ « | 1  2  3  4 | » ]
Topic: Implicit Casting, Good or Evil? Previous Topic   Next Topic Topic: All Your Eyes Are Belong To Us

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use